/* called by: entrance ctrl of the object 'track'
1 P9 m d" i- e*/: Q) w9 `7 n1 p8 \ c C8 v
is5 P8 ]. c9 W7 @7 X5 Y' e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# X. v. p2 t* Y# Q# @ Y2 Y* d. d
do
8 b5 U- a6 x$ Q* [2 v, k Lan := rootfolder.Internal.Tools.AOLlanguage;
# [% g. l4 H- B if current = @.Destination -- else return; p3 }/ t4 }# M) F3 |) f6 x
then& e4 G Q5 X8 C o! v6 M
@.Destination := void;. i4 d& @5 a: o( k" d
if @.occupied then
- R. D' e- Y% [- u part := @.cont;
5 L% |) @ w- i @.transpOrder := void;
% C8 d3 d8 I- T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 s( ~1 g5 O8 `' ?; n
@,root.eventcontroller.simTime);
2 N* ]. H* g/ \5 T3 F; |0 c c5 Q @.HasOrder := false;0 A+ V3 F4 B/ w& j
@.DrivingHome := true;) s7 F. z, F% }- G) V8 U
rgManager.tryToStartTransOrder;* G; Y1 N8 Q' e
if @.Destination = void% w" l y. V- M2 \
then -- no transport order for vehicle @
1 ]* X: {7 \% u [ @.Destination :=" e+ s4 e4 a6 b6 _! `$ ]7 p
rgManager.nearestFreeStation(@,track.~);0 M: s- ~7 K7 a4 d& O9 f
newDirection(@);
s. P9 ^, s$ u% {4 o if @.Destination /= void then
& T1 u5 M2 r: d3 j' d: X @.Destination.NumReservation :=
+ ~4 Y( a% z, r/ ? @.Destination.NumReservation + 1;
. `. }! `% Q) h% \+ f/ [) ] end;7 A( P8 a" }, V5 g6 ^7 \& f2 I2 k
@.CurrIcon := "drivingHome";# b! H: ~1 ]+ d. H0 ~- o5 j( b
@.DrivingHome := true;
: M f( d; D5 n( s end;3 R1 _7 m1 U) Q' x$ F: v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 s$ i" t* Y/ Y+ b8 W part := @.transpOrder;" Q6 B% \+ V! h4 F" A5 z
part.move(@);-- load part
0 P9 f! C1 l( P* _ @.CurrIcon := "load";
4 s. r8 C3 e1 V6 n$ v2 I GlobalDistObj := part.globDestination;) @6 l$ B+ S( ^) n8 c& S/ u
assignLObj := rgmanager.rgAssignL;* b& H7 a" p7 B, T3 V8 m
row := assignLObj.getRowNo(GlobalDistObj);
6 G0 P I9 A* j- u/ k, T if Row = -1 then -- since 70
; B+ z# t+ s: V4 A. }: B6 i# V if lan=1 then
+ F- S4 M- y6 N% o3 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ~( I1 ?6 r3 Q s$ |! U0 r
to_str("in der Andockstation: \"",?.~.name,"\""));
7 B. ]. c* v9 x2 x- x; U" U else
/ Z, Y# H$ e& J( h0 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 A' x2 R# W# y; l- B
to_str("in docking station: \"",?.~.name,"\"")); 7 ^0 C B" G) D; m0 P
end;4 o8 Y B; \) o8 V
else0 i1 a# F. {. ?! w3 F
@.Destination := assignLObj[1,row];
# Y1 C2 V0 n, ~, b: o" D) E end; 4 z* _+ u' E/ n
newDirection(@);1 {# W# H6 o- A0 ~, A
@.HasOrder := true;
2 m' Y/ U# U- T( |/ Q; ? end;
" A: j! K: \6 I C& b( S. A end;
& C: `$ [: f, N- t6 r) F6 Gend; -- of the method
6 i K, q: {$ Q1 `/ { |