/* called by: entrance ctrl of the object 'track'
" \' {& e8 ]+ l* B. S: x*/. n' y, e2 f0 l, r+ k
is( C+ z$ i' u$ y! F& t. B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; I" _$ R: m( G4 C
do
/ g* O) [) f. e Lan := rootfolder.Internal.Tools.AOLlanguage;2 m1 j- n$ o' F4 t8 u( E. T8 V
if current = @.Destination -- else return
+ f0 J% Z3 k0 q7 P1 p) H then) U; [) j' s- v) R" ?. c
@.Destination := void;
/ p" K7 m; |5 L$ S' h if @.occupied then
2 _1 z/ z7 ~: D, u, b3 k: h" R part := @.cont;
& _3 w# }* P$ ]# j$ e: q; U @.transpOrder := void;
0 ]0 u. |* `) c$ t# o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* d0 R$ Y5 E% R1 Y: A8 g7 j @,root.eventcontroller.simTime);& O' z: p; B. X& N' q4 ]
@.HasOrder := false;
4 P0 Y6 D) x' w! d+ e; y @.DrivingHome := true;
% j3 q, N- a$ f rgManager.tryToStartTransOrder; h( j/ }$ ^$ S/ ], X) k" D" Q
if @.Destination = void
1 h5 a* s! u( a# v- u then -- no transport order for vehicle @2 ?* Y8 C; H$ d* E
@.Destination :=; S" c8 c @! z+ r
rgManager.nearestFreeStation(@,track.~);
. D5 Q. Q* ~" T- Q P7 E& h2 D newDirection(@);
9 l4 K! u2 k1 E6 B4 f2 ?1 J if @.Destination /= void then7 s S. a5 Z( ~# g {# @1 B6 ~) q5 }
@.Destination.NumReservation :=
5 ^- x, |% `: z @.Destination.NumReservation + 1;
* ?7 E$ l: ?: | end; c# i7 s; H7 H1 J v
@.CurrIcon := "drivingHome";/ W: G1 e; r4 P: I
@.DrivingHome := true;
7 {7 q' V6 r# D. e% E+ C* b end;; P% w; l F& Y# I5 j' `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. R4 z O* A/ U: W part := @.transpOrder;/ K1 m8 U9 M# U) v* a5 u
part.move(@);-- load part
/ C ^! L g7 B# L- z @.CurrIcon := "load";2 U; W- b5 P8 s4 H( ~ V6 V
GlobalDistObj := part.globDestination;
% X: E, U5 ~% v9 W$ t3 k* x assignLObj := rgmanager.rgAssignL;4 L# D4 N. `0 X" j
row := assignLObj.getRowNo(GlobalDistObj);
1 F1 ^3 H: a0 C6 Y- K1 _% Q8 G; X5 i if Row = -1 then -- since 700 j/ r1 `6 Q j2 u- O- h3 n
if lan=1 then
- w b9 {# l: v9 F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, e n! C3 k% L" X1 J to_str("in der Andockstation: \"",?.~.name,"\""));6 M% N& K* Q: r% f
else
# l# s; O8 T5 I$ X" G. B$ z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: F0 g+ p# H' j: G to_str("in docking station: \"",?.~.name,"\""));
9 ?1 N: d6 A5 N& M6 Z end;
' `# Y/ l9 z+ u5 l6 v2 M* t else6 d8 y2 g* h: {7 H, Y1 X
@.Destination := assignLObj[1,row];
( @: e! I1 z/ G; ^ ]2 J end; 3 B4 B, Z3 J! Z" Q
newDirection(@);
& o3 S0 b, H- y4 ]0 `' F- @9 E4 K. X @.HasOrder := true;
/ x* I0 j2 f4 e end;& f+ M u( \8 X9 Q9 n% |6 F% O
end;
- ^! j( K! t9 U, _end; -- of the method
- d$ M l# [5 N; t+ `, c8 Z |