/* called by: entrance ctrl of the object 'track'
; m$ F$ a: q) b& S: t, ?3 [*/0 d9 l- ~: b- e' i" a# a( u+ r
is! V' z3 ^) s* s- F) G3 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: V& w+ c% ?8 Rdo; W1 @/ ~; l) g ?, x* P
Lan := rootfolder.Internal.Tools.AOLlanguage;2 t) g+ n' A. i1 \- ?* v" ?
if current = @.Destination -- else return
# U, @; f: K* O# ~. @ then+ a2 w" c! P& O5 h% k
@.Destination := void;
0 d5 O9 v0 K; c0 D+ b' P* O: ] if @.occupied then" h* D5 o& C$ J3 d' R
part := @.cont;
$ n4 h9 y( o( G3 v/ h @.transpOrder := void;
8 ~. R8 k4 ~* C9 ^$ C) i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( s# `6 A) C5 j9 O @,root.eventcontroller.simTime);
3 d* c# E G8 _) O+ f! b+ V @.HasOrder := false;
5 Z2 E1 U/ Y. ^' Z* Z" U! Q @.DrivingHome := true;* K/ S6 e, z% p; \( b
rgManager.tryToStartTransOrder;8 Q6 y$ v8 [( ^! z6 C; q o
if @.Destination = void
& f& i% v, z) U3 b" @+ k then -- no transport order for vehicle @
, a9 @: u! H2 L @.Destination :=
/ L) e+ o6 A' ~5 O rgManager.nearestFreeStation(@,track.~);8 G' N' m+ X) s" G3 J' E
newDirection(@); 7 t( Q9 M4 d/ b" V
if @.Destination /= void then
8 S" j. S; Z) o t9 l @.Destination.NumReservation :=* a5 `$ ^8 z) z$ l
@.Destination.NumReservation + 1; N* \- Q" w3 z$ j7 a+ k8 z
end;
3 B& f. l4 ` Z* b9 E* K @.CurrIcon := "drivingHome";
+ S$ {; T. [2 l" S+ |5 b @.DrivingHome := true;
: q0 @* `8 K1 Q+ Q end;1 Q: e7 |9 d6 ]9 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' N# I" v; k3 u) q* f; n
part := @.transpOrder;" Y2 E- Q2 a% j3 H, [4 q
part.move(@);-- load part
3 E" H1 N( ]( w( C& g @.CurrIcon := "load";6 c3 w z" o' u9 z2 f3 ~
GlobalDistObj := part.globDestination;9 r8 x5 D; M7 Q& `
assignLObj := rgmanager.rgAssignL;
4 P6 _/ Q( @7 C v6 G. T row := assignLObj.getRowNo(GlobalDistObj);9 \1 [" Z' B, r2 a. |2 ~ H- r
if Row = -1 then -- since 70
& S0 l& \! o" h5 O7 h1 | if lan=1 then0 g1 j% c' K. @' @' \ [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 l) X9 ^* c7 C' X% i7 ^6 p to_str("in der Andockstation: \"",?.~.name,"\""));
0 a% l' p3 U* R/ W5 W1 K else A1 V( M8 h: O' _8 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: U2 q8 z* w! |6 T
to_str("in docking station: \"",?.~.name,"\"")); . n+ p* M8 J' g) f. X' ?' v
end;# }# I' F6 v V, ]. D* G$ }# l Z. X
else& @9 h- n6 ^- H+ ]+ r8 `1 ^
@.Destination := assignLObj[1,row];* a7 g# y$ q/ u6 Y0 } `7 E, c' u0 T
end; 3 R+ v2 \* X! G) s- F: H
newDirection(@);
- t; o$ `' i& g' ?' `2 C @.HasOrder := true;' C6 ~9 Q+ f2 m5 y' p
end;- w, J; ]+ w y* X: n; g9 T
end; E& |1 E# V# Y. O
end; -- of the method
" ?5 [2 r& t! E# L |