/* called by: entrance ctrl of the object 'track'4 I5 [- ]$ k$ ~0 }
*/
' E9 \) h1 U* U( m* pis1 @: K: d2 {1 A4 Z2 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. ?: ^) ~" @' P9 z1 G* w1 c
do
/ X+ J5 j" J# d6 s5 q Lan := rootfolder.Internal.Tools.AOLlanguage;
^: {& \6 g4 ?- Z/ \6 c* Z if current = @.Destination -- else return
g- X4 Z7 Q& q( M9 H% k then
7 C3 `" X4 \. k! [9 ]0 m* P @.Destination := void;
- J& d( ^% }$ h0 ]5 U if @.occupied then
/ @, @: m2 S, K9 t) _7 ]; ] part := @.cont;
9 e/ Z. f7 H/ ^9 j& } @.transpOrder := void;4 `* R, G! f9 {/ }6 i" h8 _5 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) Y# S& J" E7 I5 K' `# v$ i
@,root.eventcontroller.simTime);4 M% V" Q- D6 R2 Q: v! m" ]
@.HasOrder := false;! T! r9 r6 W% K _/ E% u/ m/ r
@.DrivingHome := true;
% c/ O6 X5 ~) \. p% w3 [, F rgManager.tryToStartTransOrder;
& H" F7 ]& J8 n* g# [ if @.Destination = void
7 f# `( L1 x% `" V then -- no transport order for vehicle @
' y) r7 h, I8 v" N D2 S1 b @.Destination :=
6 J# z2 ?" N" M1 z3 n rgManager.nearestFreeStation(@,track.~);
2 O0 _) n, C5 I5 K, E8 o1 y0 M newDirection(@); ! Q0 o( K/ Y0 x# F
if @.Destination /= void then: U6 X, g' B- P- T" a0 {3 Q) a! ?
@.Destination.NumReservation :=+ |, \: _3 A2 `& F2 Q
@.Destination.NumReservation + 1;% I5 o6 Z7 e4 a4 T: N- W; C
end;; @7 w, h+ y4 B7 H8 `
@.CurrIcon := "drivingHome";
1 U8 S8 W, V# e' i3 \: P @.DrivingHome := true;2 Z7 H( d1 }5 n l: q( ~* e9 c
end;' M$ Y; V6 @7 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! M1 O& E* U- v1 |' u: Q part := @.transpOrder;
! H9 n; x2 |% a' @6 G7 P: O# {' q part.move(@);-- load part
0 s1 `/ S! m1 x @.CurrIcon := "load";. R9 S1 O# T2 J9 q3 T
GlobalDistObj := part.globDestination;# }3 z/ ] ?/ t" G
assignLObj := rgmanager.rgAssignL;5 U* j& [+ E; @2 r' v9 h* H5 v
row := assignLObj.getRowNo(GlobalDistObj); w6 Q9 N" L( I- c8 }+ y
if Row = -1 then -- since 70
. o6 S2 @3 ], a; E if lan=1 then% W+ \. D' V7 \( |% L8 D0 v3 D9 O, F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' I; X6 W3 Y3 Y+ k+ [. W to_str("in der Andockstation: \"",?.~.name,"\""));+ {" ~; D* F6 Q% L; p0 V" N
else( A/ _& g7 y! T/ n1 y1 I, k0 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 C* j) ?# m) B. k& }0 l
to_str("in docking station: \"",?.~.name,"\"")); 0 x8 x$ @% S" t
end;
[9 Z7 p" N8 d- v2 { else
7 d' I/ F7 C' T2 G3 h6 g* P @.Destination := assignLObj[1,row];
! J* A* T" O$ _9 b0 F end;
* \; M" a, Q5 p" C0 N* \4 ] newDirection(@);9 M6 L$ B- T; L7 @4 u& |
@.HasOrder := true;
- d( l" @2 A: f% ]8 p3 g7 ~) L9 C end;+ S- G7 o6 M' ]! ]9 ]
end;
* y3 B# `. A) J8 n5 I7 [8 p0 fend; -- of the method
! x6 h, m- r5 _2 P |