/* called by: entrance ctrl of the object 'track'
7 @# c8 m( O6 I" ^- A8 C# @, d1 |9 D*/* O: c4 ?& o, G2 I' O
is
3 j I* K$ O2 s5 O2 j& L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& s" H U7 a* C0 w; F% N% zdo) q) v4 v' R5 f8 |- g" R4 V
Lan := rootfolder.Internal.Tools.AOLlanguage;( m8 I9 K5 V4 I8 K
if current = @.Destination -- else return
\: w% J# e$ S( |5 Q- R1 T0 C; _ then
3 O! H, x+ Q4 k$ D/ f- t @.Destination := void;
: F# V, N4 z) E" x# |+ x+ ] if @.occupied then, t$ C$ M6 z+ W; S
part := @.cont;
" y8 s9 y# Q% `% W. N s4 T* P, Q @.transpOrder := void;7 o7 Q5 B( }4 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* C: v+ A# }8 l- s f; d
@,root.eventcontroller.simTime);+ T4 y/ h M3 I$ \2 }. h
@.HasOrder := false;9 R9 I- H/ ^% o- v3 X
@.DrivingHome := true;" k" I+ Q/ p3 E8 N
rgManager.tryToStartTransOrder;
) r' z3 y% M; B; S7 T if @.Destination = void
( ?5 [) a7 Z. W, F then -- no transport order for vehicle @1 E4 x1 M* f: O0 ^/ i+ T
@.Destination :=
% Z: g: ]" h0 B5 z- F9 } rgManager.nearestFreeStation(@,track.~);5 o8 R8 Z2 Z3 l3 ]6 l( z, u
newDirection(@); 7 f# {, D' X5 n" V: `1 d( O
if @.Destination /= void then
, T4 g2 D- ~. Q. l" { @.Destination.NumReservation :=
$ y) l- M6 ^7 O; `; W& r @.Destination.NumReservation + 1;
7 z0 }+ d6 c* w end;9 n+ o1 j1 W2 R N" x, W
@.CurrIcon := "drivingHome";4 n1 ?' r0 k7 z
@.DrivingHome := true;: W: G# f; D; {' W4 a
end;- @% H- o8 `2 }$ q3 d* b+ @, T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ G; k- g/ M+ Q: g2 Y/ j3 e
part := @.transpOrder;2 x/ K4 _6 B) j4 G; f9 p
part.move(@);-- load part9 H9 f# L* i+ G @. o( @
@.CurrIcon := "load";! ?) ]4 ]) i) A4 I
GlobalDistObj := part.globDestination;# F) H' [7 d5 j1 c e4 j1 O
assignLObj := rgmanager.rgAssignL;8 t3 E- k# \2 ?" U4 C
row := assignLObj.getRowNo(GlobalDistObj);
: R8 X {) j) f3 b$ y" B: i u if Row = -1 then -- since 70
1 ?$ v# |! f: q' _ if lan=1 then
_( U; X8 T9 D2 p* G* p8 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ l# `' G8 ?/ }/ u2 y) b5 A
to_str("in der Andockstation: \"",?.~.name,"\""));9 I. S% q. t3 }: _ U: Z
else
) P! y* m0 t, C9 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% G! Q3 R, I; E
to_str("in docking station: \"",?.~.name,"\"")); ( x1 U0 _6 ]& D6 Q# U. p
end;" w* R5 X K Z
else) m1 G. e3 r/ b! W
@.Destination := assignLObj[1,row];; h5 w% Y9 u. A' b6 [( G) t
end;
( r4 D' c7 O! }. Y, I; k5 k+ ] newDirection(@);6 j$ d' r* w/ H. D( u4 k9 a* ^
@.HasOrder := true;& w8 M9 R1 E. A! A/ Z9 E$ ^+ _" Q0 r
end;
# S0 c7 Y! v' z1 d: d& o, h end;- e- c7 v& F2 V* p
end; -- of the method
2 A5 n, b1 ?0 B7 G' r9 K |