/* called by: entrance ctrl of the object 'track'
; b) w( z. E/ @" n*/* J, \! G3 ?9 ~- i* _9 w1 L6 Z
is
5 I, F8 C9 T5 \+ g; v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
o4 @/ a; e( c' F8 F! \. Z6 ?: |do& l4 @. R+ i( i2 z/ g0 F- C
Lan := rootfolder.Internal.Tools.AOLlanguage;! R1 l6 j7 Z* \$ C. M; D! Y5 G
if current = @.Destination -- else return
" z! D6 \6 J* Y' Z then
* J: \! m2 R" k" ? @.Destination := void;7 p* a' ]- d* h, i( F# L
if @.occupied then& D8 s7 ^$ H* m; \4 q5 ]: ^0 y
part := @.cont;
9 D9 b. {2 [/ y% i _7 S @.transpOrder := void;
5 u2 u$ O, k7 c, A8 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( N0 R A6 n9 m4 h/ L. w! q @,root.eventcontroller.simTime);4 d0 Y& |+ l0 O) d
@.HasOrder := false;
# |" {1 }7 R) G3 x @.DrivingHome := true;
. o. @! s( F4 l4 S rgManager.tryToStartTransOrder;
2 M b2 }! g4 W ? if @.Destination = void
- R& I1 f, b' N. A# Y/ m+ F then -- no transport order for vehicle @
" W! e- O2 f { @.Destination :=
+ A. C5 _! u1 ~+ ?' c* `2 `: F7 { rgManager.nearestFreeStation(@,track.~);
: s* {' Q0 m& u. L y4 [' ~) p \ newDirection(@); 2 P9 O; c/ q* W$ W( ]
if @.Destination /= void then5 n* l. T3 m A4 b( Q7 K) E, Y' f
@.Destination.NumReservation :=
3 J' P) F$ }- |1 P @.Destination.NumReservation + 1;
0 X% o+ R0 F. C& Z* r end;2 K: i8 ?9 C6 y) T+ G% j0 Q
@.CurrIcon := "drivingHome";
5 e* `0 B8 {! i @.DrivingHome := true;1 b4 W, W$ F$ ]7 G8 X
end;
W4 D9 T" @) Q7 H& B% O: y else -- the vehicle @ is empty, both vehicle and part are in the same dock station* s. ?8 d4 j4 e9 i
part := @.transpOrder;
' O1 g' N" i0 U3 \5 @% x part.move(@);-- load part; \/ f$ t6 R. p/ M; F# G
@.CurrIcon := "load";6 m# P8 l; x% `; S
GlobalDistObj := part.globDestination;4 z, ~, p* \% ]0 i
assignLObj := rgmanager.rgAssignL;; Y& R2 j/ b: W$ }% z! M. E
row := assignLObj.getRowNo(GlobalDistObj);2 l) e: a7 R: W
if Row = -1 then -- since 70 J, b5 [' R+ m# b8 _/ s, e( }
if lan=1 then5 y* F, ^* [2 F9 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% q, o' O4 t5 @- j) | ] to_str("in der Andockstation: \"",?.~.name,"\""));
* |3 {3 K ]5 _: C/ U/ r' M else
) c) h) ?; C! C# R; R$ b/ O* U+ a! Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* m! z" q0 X) L( C6 Y
to_str("in docking station: \"",?.~.name,"\"")); : H1 s+ h( q6 P1 n; q/ ~% |
end;' l; W) Q: ^/ L) b \9 Z
else
# W6 ]8 ~# |( @; B @.Destination := assignLObj[1,row];( L: V$ e$ `- ?# s* d4 `2 _
end;
' l' o3 P+ i( d9 u( V9 H1 `" X newDirection(@);5 M7 Y9 A6 b/ w% k. w
@.HasOrder := true;6 T% d6 f2 j4 E2 o3 K! o8 x* i# q
end;
, H/ v5 D |0 n/ }2 `1 F end;; w$ Z1 z5 u P u
end; -- of the method
( |' T* v% e, X/ k- H1 g9 h |