/* called by: entrance ctrl of the object 'track'9 ]5 f1 h9 ~' J5 }' |9 K# N/ j2 z
*/
& I+ E. F9 R, L! H$ J- g# ?8 Wis' c Q8 i2 H' I' v/ s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 M7 P: E( {. a4 [do
8 Q5 K! \6 F2 B% m; t! B Lan := rootfolder.Internal.Tools.AOLlanguage;
( a, o; N( \0 c' C. s* L if current = @.Destination -- else return+ C- t9 M# A: K, p" k9 ]
then
4 ]$ V( H8 X% C @.Destination := void;* T6 J5 d: k- Q6 M8 j+ f$ j
if @.occupied then* y0 @3 `& c- p ?
part := @.cont;5 x6 q# [* p S" N% _, u
@.transpOrder := void;
9 K% J/ h- w1 v1 w. p/ `- M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- C' W& B) s# M+ X3 q+ f' P) ^
@,root.eventcontroller.simTime);7 ]; }$ o) d( K& I
@.HasOrder := false;
3 ?' ^0 g4 b. D. s @.DrivingHome := true;
1 U& s7 w* l C rgManager.tryToStartTransOrder; b" ?* S q5 I' ~7 d, x$ U
if @.Destination = void
' _0 {6 x: M% F3 U+ K7 h then -- no transport order for vehicle @
$ c7 Y. z! ?9 i' T/ A4 E @.Destination :=/ h& s. F* O$ T E
rgManager.nearestFreeStation(@,track.~);
. [4 w! I% W% n- c% M newDirection(@); 3 E0 [# V& w. u6 a) c9 E8 Q! B+ k
if @.Destination /= void then3 o. G4 Y# @; @: z
@.Destination.NumReservation :=2 h7 N4 Q# P" D
@.Destination.NumReservation + 1;
* e: @- [1 P) l" M end;
# r" ~2 q! P- A9 Q @.CurrIcon := "drivingHome";
1 D' l- H: [4 B+ q) e4 V @.DrivingHome := true;0 k g. W7 ?5 [; ?
end;7 W# M! x% R$ }: v, N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 A1 t5 b8 L+ E. N$ i5 A1 N0 |6 [# V
part := @.transpOrder;! H4 ] e$ ?2 n9 n. Q) }- k; g1 z
part.move(@);-- load part
* ^- v: L: B2 h4 e* C) q @.CurrIcon := "load";
?: V+ g1 ?, G4 t GlobalDistObj := part.globDestination;
& x2 O% [* }1 s8 P7 y% O N% I assignLObj := rgmanager.rgAssignL;
3 h8 Y1 Y A0 {. J5 m+ e" A8 ]2 f1 X row := assignLObj.getRowNo(GlobalDistObj);
/ c* F4 `8 Q- E if Row = -1 then -- since 70. L& e8 Q% ?5 o4 A
if lan=1 then* J1 d7 O1 G; M& C: r! c% t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 x& V$ B- p4 \; ~8 Q+ E/ B
to_str("in der Andockstation: \"",?.~.name,"\""));8 A! n& u* d$ v4 @
else
8 t) Y: B: m" z8 x( C" | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 j# Z, q" i- v; S( i1 G# m0 }1 H
to_str("in docking station: \"",?.~.name,"\""));
8 B# d/ G$ M! ~8 g/ c end;4 l+ |! u, ]" |1 K
else- ~! A- @5 `" P% r
@.Destination := assignLObj[1,row];
+ s6 o# I5 F, M4 S F o end; 4 }1 W3 j( B) L* A+ V E
newDirection(@);
8 S. h6 W' H7 c0 V g @.HasOrder := true;7 ~4 C* x2 p7 I' l
end;
' G- d# j$ t+ Y/ n end;
1 a0 v: u4 P; j& Uend; -- of the method
* n& h9 G g/ o+ I3 n |