/* called by: entrance ctrl of the object 'track'( ^) o0 B' k$ j" R1 I
*/
' @/ M2 A, `5 @' cis9 ]$ v7 h2 v. h$ h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: c5 D3 l1 C- s1 F' A* }# ]
do
' F4 P! g8 [! Z; R* [9 ? Lan := rootfolder.Internal.Tools.AOLlanguage;# G5 R+ P( c8 q8 M9 H$ e
if current = @.Destination -- else return" l8 B3 k3 k$ S# ?$ U
then
3 W J0 G, p' L, S# z) Q @.Destination := void;
2 y, S/ |) X; x* M) x$ m* g if @.occupied then% b, ~! H1 Y+ L
part := @.cont;7 _; f2 z* v& j Q6 s, |1 ~* k9 U
@.transpOrder := void;7 z) M: k$ I5 i; j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% P2 o" J- w3 \/ @# A& q/ j) N
@,root.eventcontroller.simTime);" Y# W* W; c* M$ T
@.HasOrder := false;' E; ]' O1 S& p
@.DrivingHome := true;& ~1 h8 d5 _: W& J8 }" i
rgManager.tryToStartTransOrder;
0 {% i s$ i- s if @.Destination = void
1 y/ e3 L3 l/ a' u# Y7 ~ then -- no transport order for vehicle @" B" a D& Z% y; P% T
@.Destination :=
: U; t3 A+ l& J3 \' F# y rgManager.nearestFreeStation(@,track.~);. K2 B- p, n" x: W% s
newDirection(@); 6 {: o9 @; j) }7 N- V) {
if @.Destination /= void then$ F, H; D' U5 q8 }' T! |$ t# k5 O+ o
@.Destination.NumReservation :=
, r) E* n+ z/ _' s ]) \) t @.Destination.NumReservation + 1;
- X( Q' p) q A+ Z+ ^ end;
, `, M6 f ^$ p' i$ D# @ @.CurrIcon := "drivingHome";. \1 ^ k1 g: O8 f
@.DrivingHome := true;
, i' ^' z9 T( y/ M% S* M3 K end;4 j# M# G: Y( k: d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ q3 |; o" Q' K9 }) Z Z) W
part := @.transpOrder;" G, g( O7 b& h B x
part.move(@);-- load part
1 d1 x# v/ {* h' X6 P @.CurrIcon := "load";1 i1 H/ e( n, w: S( ^
GlobalDistObj := part.globDestination;
8 l. W" U5 l v$ c6 w assignLObj := rgmanager.rgAssignL;# ^7 j# w2 A/ Q
row := assignLObj.getRowNo(GlobalDistObj);2 v, g8 g) X% [- x l# _
if Row = -1 then -- since 70
5 q$ e( [; j% J if lan=1 then- v6 H& p6 Z' \& A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 x6 \, W- N% n! K# @
to_str("in der Andockstation: \"",?.~.name,"\""));
* k( K/ ], b4 ~* i8 Y else+ t) u7 q P1 n; t4 t+ t# z$ D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' R) Z& @8 n7 b0 M% i! r to_str("in docking station: \"",?.~.name,"\"")); $ }# m/ S+ I% b+ T$ ] P) m% @
end;0 m- v R- W% `8 E6 v
else" P W. R/ b7 c$ i+ R
@.Destination := assignLObj[1,row];
! w( c' C! C. e. R end; ) j9 n, [: ~9 S J: y
newDirection(@);& [- J$ ?- h: O* V) \% b
@.HasOrder := true;1 a& ^. G5 q+ R5 `! g; o
end;7 w' @* E$ `+ [8 P1 k/ Y, i3 h: I
end;' Y& e( v% G7 e1 `% t- u
end; -- of the method8 n! @3 B" h! ~5 B" G v
|