/* called by: entrance ctrl of the object 'track'
4 ]4 h( ^- U; T) ^/ p1 z*/2 J/ p; A' t2 e2 ]; P7 i
is' |. g3 g' O. u& ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( b* f; h7 C" b3 F# Y2 y$ Y3 P
do
$ M9 F- N9 t: E3 i$ F5 R. z Lan := rootfolder.Internal.Tools.AOLlanguage;! A; [+ b8 T) P6 w: d: }' t6 T# k
if current = @.Destination -- else return
+ s5 o, B& z6 t# A3 a then" Z1 V* y+ s2 q2 _( y2 u! e/ B! J$ ^ W
@.Destination := void;
8 I" T! t3 |5 i if @.occupied then7 ?. ?9 z( z# R- d
part := @.cont;
0 G4 K' T, Z" q! B @.transpOrder := void;# ~/ E8 z4 q) l# N% u5 w" @; f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 H' N% i( g# }$ Z! a( {2 E, }1 L
@,root.eventcontroller.simTime);: f/ }2 L8 E8 c }+ P9 R
@.HasOrder := false;
. T/ k. y1 u$ ?) m2 u @.DrivingHome := true;
" Q' \8 b! k( Y. B rgManager.tryToStartTransOrder;% P' t6 p' q% w2 L- r
if @.Destination = void7 e8 d; B. H. Z6 n6 E" w$ r' ~
then -- no transport order for vehicle @
) A1 l. ?% \* Q @.Destination :=
/ e. B1 z* k \% Z rgManager.nearestFreeStation(@,track.~);
8 Q' x, N, o$ `2 B1 y8 h+ j newDirection(@); $ ?/ a$ k3 D' y8 m
if @.Destination /= void then, m$ i7 z( S9 [9 B' b6 s2 h" o
@.Destination.NumReservation :=- B+ w- g4 p& y! }
@.Destination.NumReservation + 1;+ D; l( B: U$ G6 u$ e2 {6 }
end;
+ f; ]# o% h& c- G v* o' W @.CurrIcon := "drivingHome";, B. d9 P' w! D; u( p: @
@.DrivingHome := true;
: V5 \! T# T: g$ m8 N7 f% D' G end;6 M; e. M8 w+ \' y1 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ ]4 |0 H8 t# U3 x
part := @.transpOrder;
8 S; W, P9 ?( } part.move(@);-- load part! ]1 H8 p5 U3 @8 ?
@.CurrIcon := "load";
/ T# R& L2 P d7 X* J& {. y+ A( S GlobalDistObj := part.globDestination;
. y3 ?7 @" K1 {5 R; e& [, _; t* l assignLObj := rgmanager.rgAssignL;
b1 k9 q9 ~) l2 m1 w row := assignLObj.getRowNo(GlobalDistObj);
0 {( P2 b; t) |% }( L4 b if Row = -1 then -- since 703 a; j& ^1 e& I% W v% ~0 _, r
if lan=1 then( }; w3 a, d% C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( y/ e3 x& c% ?5 f2 L+ X
to_str("in der Andockstation: \"",?.~.name,"\""));; H: [4 L+ W4 a9 }5 ]
else
) H9 q# H, z z% _" K, M6 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) f0 D$ P V$ z; H8 E
to_str("in docking station: \"",?.~.name,"\""));
4 R% q8 a! a4 y4 ]/ c end;. V) I- U+ M! |
else+ t# [( z4 _7 }7 d
@.Destination := assignLObj[1,row];
# h$ b* n, w9 j& Q4 M' B3 R end;
8 x% h' c9 `) S# k" c newDirection(@);
5 |- d$ G4 w+ e$ W0 q @.HasOrder := true;% b$ y' u r s6 j8 J
end;
* q) ?& f0 O5 S, _, Y end;
6 {% y4 b8 ?% v# g) _end; -- of the method
3 d& S7 t; ?- p9 v+ L/ V0 p% E |