/* called by: entrance ctrl of the object 'track'
, Z% Z$ ~" I3 U) s p6 [*/
2 b U' `0 s. v2 o8 S5 A: u( eis6 G; b: J4 V/ {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 _* A/ @: J8 c5 X2 a' U m; z
do4 M0 R# }" J' [8 Z n
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 L; T( `. N! Z if current = @.Destination -- else return/ i& X9 \ {5 f i
then9 p$ P! \# J* [' B9 z8 ?
@.Destination := void;
& ]/ ]3 c2 m; F# V& Y1 M if @.occupied then1 {8 @$ r ~1 t$ I6 V/ j4 o
part := @.cont;* D( y* h- N; I7 ~* r; }
@.transpOrder := void;
* Q8 T7 m* T7 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, O1 C% o3 t6 j. t6 c9 }
@,root.eventcontroller.simTime);
: @4 a) _+ D f @.HasOrder := false;. @* C2 A0 v% T4 R4 ?4 x
@.DrivingHome := true;
4 l( c- C% _3 } rgManager.tryToStartTransOrder;
0 J9 \3 v' k- z3 p" M+ e if @.Destination = void
( j" W* |# D( \ m# V( r then -- no transport order for vehicle @
1 |5 C8 v6 l( [) T% F+ L/ Q% e$ Y# d @.Destination :=
0 j$ O _$ e. W1 L7 s, j rgManager.nearestFreeStation(@,track.~);: Q3 y& z* Q! o- g. q& ^) p8 c
newDirection(@); 6 i% J) A2 s# K+ Z' Z4 u9 ?# i5 o1 Q
if @.Destination /= void then! H% G/ @4 N: O x5 _$ ^8 Z. i
@.Destination.NumReservation :=
0 ?0 v$ E: h$ A0 q0 P @.Destination.NumReservation + 1;
1 U/ O7 q. i, U/ m4 U end;* Y5 c9 Q; E) k
@.CurrIcon := "drivingHome";
5 Z% h! }" G5 I/ i5 q$ I @.DrivingHome := true; |6 [/ J9 J0 @4 _
end;1 P! |+ R) X3 v# c# E& {+ D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, L7 d5 b' p4 ~/ l8 a! N/ a7 e, f part := @.transpOrder;; W2 `, _! a! D% a
part.move(@);-- load part# X2 g- w3 C/ K X7 _: W! A
@.CurrIcon := "load";! H$ e- K, u8 L0 J4 p
GlobalDistObj := part.globDestination;
; d9 G1 D( E# ~9 Y3 M5 A assignLObj := rgmanager.rgAssignL;* |/ E. K0 U9 }3 A8 I9 h* t
row := assignLObj.getRowNo(GlobalDistObj);6 S& U- w% P( D0 [5 W3 }6 v
if Row = -1 then -- since 70
! E$ ~0 U0 t/ j# K4 m7 v$ b9 } if lan=1 then( H: u, W+ I, n" t6 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* L) v! [- f+ o, X- L' @- F, w% i to_str("in der Andockstation: \"",?.~.name,"\""));0 ?* t5 d0 v# B# Q! E
else
' k+ ] W5 _0 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 R. O( e! u4 E1 N1 {* M5 z to_str("in docking station: \"",?.~.name,"\"")); 1 |3 j- P. p, M& [) [& P
end;
# V# w1 a0 I: `# @& R, b else$ M T( B5 a- h7 L. |3 C. q: C
@.Destination := assignLObj[1,row];
* ^, J! t+ U. g6 z: E2 w$ k end;
" q1 \2 t" h. [6 T6 c; k newDirection(@);5 e' N0 o7 B% _9 ^6 l- s& c+ d
@.HasOrder := true;
, F" @0 r) L. Q8 y end;
, D; Q! U/ d$ A end;4 c. h; B+ p) @( V3 E7 J6 f
end; -- of the method9 d' S, s" }7 n/ x. k% s9 w
|