/* called by: entrance ctrl of the object 'track'
9 {7 N* }) q6 S i5 F1 B4 O*/
4 q. F" K+ X" z% @is+ I) u/ P# }+ A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 h% k/ F9 H0 [. d: ^1 _7 c
do3 U7 S/ m& X5 s7 S+ T9 [! r2 J. ~" c# u
Lan := rootfolder.Internal.Tools.AOLlanguage;
# P) }9 M' R% y7 Y3 p* t, K if current = @.Destination -- else return7 I! T1 {- P: Q& P/ G/ K; ?
then) s4 V% n, v+ \7 Q+ g% \
@.Destination := void;
" ]7 P% A7 I+ i3 m8 _ if @.occupied then
$ f* R) O' f7 M! O; {. D part := @.cont;
- t; O- t7 L/ S6 n% a @.transpOrder := void;
* K: w2 L. H/ z5 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 [+ h4 r4 }! B @,root.eventcontroller.simTime);( `& `% P& U. i; |
@.HasOrder := false;
" G( ~0 w3 }2 g4 ?- h0 s4 J( u @.DrivingHome := true;
: Z* U/ W. I2 M* z; D3 z9 c# i! f rgManager.tryToStartTransOrder;
! n$ U* B. r) m! I: S, G if @.Destination = void$ m A$ J, J' U9 b3 ?0 n E8 M! j
then -- no transport order for vehicle @3 k8 R5 V4 D9 A
@.Destination :=5 B) ]- ~1 v! Q0 M' j; u7 n
rgManager.nearestFreeStation(@,track.~);" K2 k( r1 I, A# A$ o" l1 e
newDirection(@);
+ g$ x) x5 b; ^% R; H4 R1 G1 C if @.Destination /= void then
. X. h/ k0 V& N @.Destination.NumReservation :=
- j# k% D- O- {, G @.Destination.NumReservation + 1;
7 g5 Y5 {* d R/ J) p$ }% Q end;+ m" F: C* z; a% H
@.CurrIcon := "drivingHome";2 a5 D1 S! ~5 r% p
@.DrivingHome := true;, A6 x3 r: S8 F7 I0 e9 I
end;7 C/ s p' i( F: S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! G* Z, R, s8 }1 t- V: H/ N" t
part := @.transpOrder;, x6 b7 G5 S8 ]3 _- e
part.move(@);-- load part
5 Q- n2 _+ B" A5 c" c @.CurrIcon := "load";( a) \8 L+ a* S- |' `
GlobalDistObj := part.globDestination;# S/ @- f' s" F( D- e% r' G
assignLObj := rgmanager.rgAssignL;
* l) j8 K( q7 O. c' |7 m1 M5 l row := assignLObj.getRowNo(GlobalDistObj);0 N7 S6 o w( H- Z& ?
if Row = -1 then -- since 70
; ~) z' R ]. h, k; w+ A if lan=1 then
. D- [. b9 u H/ N* j1 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' k* K s+ T8 Z# J: v+ N; n
to_str("in der Andockstation: \"",?.~.name,"\""));' p0 L/ V; k ?! m( i) b5 h2 P; t
else
; I+ ^' C) E2 m' j X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' S4 Y8 [/ h% O& |+ ~
to_str("in docking station: \"",?.~.name,"\"")); - a5 l+ Q, n3 a
end;
, h, E) | ?$ Z4 c" Z# r else
6 _' W* E( }% R% h @.Destination := assignLObj[1,row];
c8 x. x8 q; R end;
+ |* b4 }3 ~% q8 |* e newDirection(@); ]( w7 ~3 s. w, ~2 L3 I* q
@.HasOrder := true;% W% a3 L S# D2 I
end;( W6 ^9 a+ `* s. g" x& l9 F X
end;% m P b8 a1 `6 I5 Q" t
end; -- of the method
! e5 W1 D+ S8 ]2 c* |0 ]7 }$ i |