/* called by: entrance ctrl of the object 'track', i) V L, f8 e0 X- Q1 {/ U
*/
& X0 ^4 p# R1 J/ [* \is0 t1 ?: p% ?% \( L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" y( C* Y% ?* P, J7 s( t
do, a0 n( `# l( S+ g' e1 j. p
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ u* E5 l% H9 F& h$ w+ f if current = @.Destination -- else return
" u% @% o @: O/ ^. s$ W9 ]- o then7 J) F h+ ?' Z* D
@.Destination := void;1 Y& F: D( B& R5 c3 }8 p/ ~$ W
if @.occupied then
, n4 ~% @1 y6 ]2 \6 |6 a part := @.cont;
- K: e* {, W" f @.transpOrder := void;$ I+ F' _ e; J3 S2 f- b0 |$ Q. X5 s$ Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 c6 n& `2 V& D5 G* I
@,root.eventcontroller.simTime);7 d% v5 w; [# h2 b6 G
@.HasOrder := false;+ z* v) R$ I0 k+ _$ |- y+ B
@.DrivingHome := true;
" A% i/ ^! ~' i rgManager.tryToStartTransOrder;
# l$ g( X8 N. U+ \& T if @.Destination = void. k0 |" j: R8 P! v7 J7 I
then -- no transport order for vehicle @
2 _, E! u1 o: F+ \2 R9 m: j @.Destination :=
+ j% i1 @& ?% `! ]4 ]: m1 n rgManager.nearestFreeStation(@,track.~);
7 ?" ]1 B* G5 S$ r& O- b newDirection(@);
: z/ K, `, K# J4 b' }) W if @.Destination /= void then1 H0 }6 c* g; g
@.Destination.NumReservation :=
$ m% |9 ^; m% a6 c. I @.Destination.NumReservation + 1;5 T5 n. C7 X' |
end;4 `! F0 L8 z! h! V0 H' E
@.CurrIcon := "drivingHome";
) Y1 p' k+ |6 k7 i' s+ { @.DrivingHome := true;" E% C1 y* i) ~
end;
5 T; ^, I8 O/ H& x4 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 L* h8 ^' i$ N+ R- N part := @.transpOrder;
5 T9 o4 L. \ g2 @' a part.move(@);-- load part
5 Y8 ^1 @$ t: A* ~, r& o @.CurrIcon := "load";- H4 T$ } _$ [, i& ^$ a
GlobalDistObj := part.globDestination;3 z$ e9 T L/ `7 E R6 D
assignLObj := rgmanager.rgAssignL;; { n' A2 Z3 U- V( C4 K8 o" Y
row := assignLObj.getRowNo(GlobalDistObj);
' j# k: _/ p2 N1 i3 a if Row = -1 then -- since 701 d$ A/ |" p2 |
if lan=1 then
" I7 e- V8 I& v8 h. E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 i* ~& `; V+ _$ E$ l( G% \ to_str("in der Andockstation: \"",?.~.name,"\""));5 b; D1 V. R5 d4 e: h7 w
else
; o8 f0 u: T# k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ?- \" Y4 x6 D7 u" z. l: x
to_str("in docking station: \"",?.~.name,"\"")); 6 o, j# Y7 _0 f) ~6 l: X& S0 m6 ^, G
end;
6 M- E: G, r1 j5 t else
" K* x% r) {' I& @. S5 z @.Destination := assignLObj[1,row];+ g/ Q) Z% @8 V' E8 U: D. `
end; 5 H/ O: q# |/ X" V; t3 F4 U
newDirection(@);) u9 i, d! o& x6 V4 {4 y7 m
@.HasOrder := true;
4 ~+ C% Y5 @7 ] end;% B2 z- k! G* G9 T
end;
8 \' X# S& y) L- z8 aend; -- of the method
2 ~; G" i# h( I- ^ |