/* called by: entrance ctrl of the object 'track'
1 Z3 t: X, e1 S6 P* Z/ n*/! a# F1 X1 Z8 s' l$ ]0 s! V% ]
is
Q) n# l1 ?7 H3 e; I9 f+ [9 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;* v% t- g" r0 t
do
; k' e1 R' z7 r& k5 l$ M8 W* e Lan := rootfolder.Internal.Tools.AOLlanguage;
2 O) ?1 D! f( ]3 m% x if current = @.Destination -- else return) u Q" Y! m! L6 [" U' t6 a
then
{' q2 {$ O, k) W @.Destination := void;! @$ x6 \/ ^+ T8 F* A
if @.occupied then8 k7 \) R* m$ ^* w+ A$ {& ~# ^* q
part := @.cont;
7 }1 X2 Y4 d. B6 d, g @.transpOrder := void;
% F5 P4 `) D% Q, M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 N! o1 ?, F% L% C l h
@,root.eventcontroller.simTime);
. q3 n& m* [# t, z7 G H @.HasOrder := false; S6 p9 S( q* y% ?8 F. y4 {2 J
@.DrivingHome := true;: D/ b {6 r; z4 G
rgManager.tryToStartTransOrder;* V4 w- o' U( l! [% ?$ U: P& c
if @.Destination = void
2 I2 c a( a2 o then -- no transport order for vehicle @& i6 r/ s4 R8 R
@.Destination :=; f/ d8 O/ Z P) f/ O: N+ J
rgManager.nearestFreeStation(@,track.~);
# ]0 R0 W+ A1 {" K+ a8 q% i newDirection(@);
4 c3 P/ \) H$ R4 \, w) z if @.Destination /= void then
( C3 ]7 Z: G. n6 m @.Destination.NumReservation :=
) r% L3 [7 x5 a0 E8 E1 M0 K s7 H- o/ E @.Destination.NumReservation + 1;7 d5 X% o) b8 f' M8 E
end;
$ ^% y3 d5 {& `, t: U0 o: ^2 I @.CurrIcon := "drivingHome";
) c. y D; E- F3 R( J; }. {% S @.DrivingHome := true; i4 Y0 c/ s+ j- h' O
end;
) z4 v$ w! k$ t else -- the vehicle @ is empty, both vehicle and part are in the same dock station, v2 N$ M' K' `, ?& w; G
part := @.transpOrder;
4 n( y w N9 W part.move(@);-- load part2 F/ E2 m6 ]( v3 ~
@.CurrIcon := "load";
/ L7 W6 t: Z# Z: ^' F GlobalDistObj := part.globDestination;
# g* T. z5 x; P7 Q* V* G1 J assignLObj := rgmanager.rgAssignL;
5 ~1 L! \ q+ A, p, h row := assignLObj.getRowNo(GlobalDistObj);& E+ h+ f- G* w; {7 Z
if Row = -1 then -- since 70
$ u3 {! H8 `( R+ L1 T if lan=1 then. _5 P( i/ F7 k; c8 J" K, O+ A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: H( K; s' H5 z1 B+ R1 R( @ to_str("in der Andockstation: \"",?.~.name,"\""));
6 U5 e+ |; ^1 x; G" G' y. \* n" O else6 W/ O9 C% N( C; N) `6 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 A: l1 M: ~+ _/ K* A: C: z. B9 Z
to_str("in docking station: \"",?.~.name,"\""));
* _; g3 c: k! T end;5 @- ^$ D2 \+ G! I7 n3 X
else- \: j, R8 ~& W' W( e
@.Destination := assignLObj[1,row];
" R1 m7 G% a3 t8 R3 n end; 0 C4 a2 q! U- w# y' \" Y- D* u2 E
newDirection(@);, ]5 P# w# q" j* Q( u4 C) b4 q: u2 J8 J
@.HasOrder := true;
% r7 ]% u8 E9 w/ _7 o% h) u v end;
1 u7 M! `' G) u7 m" R2 C end;9 b; B4 H' i$ l* l
end; -- of the method
$ X4 V- v1 E8 F |