/* called by: entrance ctrl of the object 'track'
4 W" N' u! I: F, e* r*/' b) E( m% K% n- D4 x
is
1 z9 `4 x9 A+ f& h/ n# Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
_4 Z1 N! k$ p) K; odo
% H6 s$ h- N7 Q Lan := rootfolder.Internal.Tools.AOLlanguage;
: z& h- m! o: E7 V if current = @.Destination -- else return2 O1 g0 _4 S" N, @% r
then# L- s( N6 I* c8 C$ L& a* }* Q# R0 T
@.Destination := void;
: O; x. I; t$ B if @.occupied then1 r6 v& i% m. D7 e9 i
part := @.cont;
7 K8 F% J8 w n& F3 `, Q @.transpOrder := void;. D0 j) S) O) W$ J& D0 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ A4 Q8 O- W b* W2 @1 K. |2 X
@,root.eventcontroller.simTime);' N T3 f7 j8 z3 `) y+ f
@.HasOrder := false;9 I1 S5 z# e+ ]
@.DrivingHome := true;6 c# P" w+ s& ]# |5 L# h
rgManager.tryToStartTransOrder;8 K+ z# m) W2 l q& C0 v* g9 o
if @.Destination = void. C ~1 d) j2 P% F& d; z e, t
then -- no transport order for vehicle @9 }* n4 z# M; P( J; f. C
@.Destination :=
0 D0 |: @# e @+ P$ d# K- U rgManager.nearestFreeStation(@,track.~);# m H9 ]0 z' t3 T0 k
newDirection(@); # G. A* x+ Y- L+ y4 L+ I9 x$ O% W
if @.Destination /= void then6 Y4 P4 T1 u4 b7 W
@.Destination.NumReservation :=- K& T- [2 e& l1 g' {0 O. F
@.Destination.NumReservation + 1;, Q* |9 y) Y4 h+ _5 F
end;0 M- z% Z3 h1 l7 m7 b) d
@.CurrIcon := "drivingHome";5 V. b( l' T7 s5 R) K: C
@.DrivingHome := true;
/ X/ T+ o$ H. M r end;3 b" d0 E% Y. g* V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 _2 M, K F; o) h/ r# t4 d3 c
part := @.transpOrder;7 d- G* {+ d' j2 \8 `/ W4 C1 u9 R
part.move(@);-- load part) o' s/ ?& z" Q/ L7 r# M
@.CurrIcon := "load";6 ^$ e2 s8 K/ B0 L9 M
GlobalDistObj := part.globDestination;
2 o4 j7 ^( x& h- }3 m assignLObj := rgmanager.rgAssignL;
, J* ~2 X% w. }2 A row := assignLObj.getRowNo(GlobalDistObj);
% Q# F7 t1 Z! u) G8 U if Row = -1 then -- since 70- J- A3 D o4 f; f" v: ^0 r. c
if lan=1 then9 S" z# y& N' |6 d! p \5 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ R! `, `+ c- I: o
to_str("in der Andockstation: \"",?.~.name,"\""));
% ^. M/ V- h6 ]3 W7 D5 f, q else- o, i; y6 R( n( H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 H& I0 a' Y0 |7 A; b i' Y: w to_str("in docking station: \"",?.~.name,"\""));
x! U& M9 j5 S8 D1 p end;: B9 [; a! G) x5 ^% l- |
else# o3 X: |% Y) f
@.Destination := assignLObj[1,row];
# {. y p( D/ S" R, ?1 p end;
; q& \$ B+ G1 F3 M newDirection(@);
; |" x! I* B# ^( k! ~ @.HasOrder := true;
$ n( u: q9 @$ ~ B end;, z$ U, p) m1 v/ [
end;
4 x! u1 C h7 K, a( @end; -- of the method' g+ v: b9 \3 Q0 D$ F
|