/* called by: entrance ctrl of the object 'track'0 P0 c$ D7 z% n$ }
*/
, B* M. B" a9 [( Fis
z0 e+ @2 A4 a1 m* ^$ y3 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 _, P; |6 D( H8 H/ K& Ndo
3 N- Y4 k" l6 O Lan := rootfolder.Internal.Tools.AOLlanguage;8 m! G: Z% G5 l, R- F% Q: y
if current = @.Destination -- else return
* c5 e9 g! ^; u7 a& U4 Q then
7 b/ s9 U; `" k5 y @.Destination := void;$ n. ?5 n1 K" k9 }6 m* N, J c. B' e- C
if @.occupied then3 L$ @7 E0 Y* u
part := @.cont;0 n6 Q' L' W' e0 X: {2 f- e
@.transpOrder := void;' g5 }! t& Z5 n1 ?8 J+ Y: a' k" U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ {7 X3 S4 s0 u1 Z# I) s @,root.eventcontroller.simTime);. P- E% }& }7 u* f
@.HasOrder := false;
& O3 t8 r4 _. K- N3 @ @.DrivingHome := true;
7 ^4 _. Y+ K7 K rgManager.tryToStartTransOrder;
: ~5 H$ `# M4 J# C( d if @.Destination = void$ \! O3 J" I' |* c0 Z
then -- no transport order for vehicle @+ J5 r3 r5 y N
@.Destination :=
, P2 p: R$ c+ j. ^! \0 N rgManager.nearestFreeStation(@,track.~);
) K: p# R6 F5 v! S. P' @" [0 P7 c newDirection(@);
+ H& b' E4 q, f8 B5 f if @.Destination /= void then9 ?6 C! ^% p. R- p; r' | U
@.Destination.NumReservation :=
9 G/ u, z3 h+ B! y2 F+ I @.Destination.NumReservation + 1;+ d3 O6 T% J" P% h
end;
1 B1 A; F. D4 y' z @.CurrIcon := "drivingHome";) [% `% f; j9 N* W% @' A; f
@.DrivingHome := true;# c V* {7 r% B) N. K7 o& n/ m. f
end;7 z# e# y# }4 \" y8 \7 S" r! [7 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; r- m! \/ |- r: C part := @.transpOrder;. U* F! R- L- b7 m+ h) X8 k" u
part.move(@);-- load part
2 ]+ w: s8 A4 r& h- h @.CurrIcon := "load";8 t, S0 F8 W4 a
GlobalDistObj := part.globDestination;( |: K6 F$ b" k- ~" p9 T
assignLObj := rgmanager.rgAssignL;1 a/ z2 C/ V3 u
row := assignLObj.getRowNo(GlobalDistObj);
% {, R( `! r0 M2 M$ @' O if Row = -1 then -- since 70' d3 c6 R" t( U2 I
if lan=1 then' g& B( J% |; ]. B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! u" x1 H, A' g) L to_str("in der Andockstation: \"",?.~.name,"\""));
9 G+ z+ m5 g- b* L9 M else, [+ x9 B8 j. I& a( T: m& h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& P% [! y! B, H/ ^* b$ B0 e to_str("in docking station: \"",?.~.name,"\""));
g4 O/ a4 E& h1 z% j9 i3 ~ end;" ] q( h! I9 Q* m3 R" d- a7 W
else) I+ |: H' B' |- \* V& N1 @" e5 ?, \. k
@.Destination := assignLObj[1,row];/ R% D( e$ V) i; J' y! u8 c3 L
end;
9 a7 P8 X: K' g newDirection(@);
" Y9 I. I9 M/ c9 f- r @.HasOrder := true;- u' K0 M8 m# [7 ^4 v
end;( b# i1 p- y3 a0 n5 R1 D/ ]
end;! Y9 h0 ]( D" p" F
end; -- of the method4 P; n, M( D. [; |* u
|