/* called by: entrance ctrl of the object 'track'
3 A5 n' \# e# O: _ Q0 W. O*/
% X; b, k( h8 n8 m/ Uis7 x8 \1 M$ y, d l1 j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 ?0 F* |. R8 n% x, F0 B& }* udo
, n- }7 W" b* ?/ O Lan := rootfolder.Internal.Tools.AOLlanguage;
8 J) X; }; ~5 ^0 Q; s8 c J if current = @.Destination -- else return
- q! |/ W; W1 W- Q then* C, C' [/ J" M5 I8 p
@.Destination := void;# _" Z, r( v, u/ f/ p) i
if @.occupied then* i* ~$ A& i- V K: q G
part := @.cont;
2 b% y. U- F2 g z. { @.transpOrder := void;
- ^+ E1 t* d i: X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; z3 j0 h/ _) @% L9 @- N* n @,root.eventcontroller.simTime);
0 q# @: D6 C9 H r. Q, {4 e @.HasOrder := false;
1 F4 t( @+ g I& ]( \; A @.DrivingHome := true;( u% Z3 z5 @; S. K: j5 A
rgManager.tryToStartTransOrder;& B( Y, D: Y4 S3 F1 A) I
if @.Destination = void# s& e7 N7 X5 \0 G! x
then -- no transport order for vehicle @
$ O4 d4 K I+ i! w @.Destination :=
: R9 Q6 K, k& |8 p& Q rgManager.nearestFreeStation(@,track.~);
0 h( z3 k# |2 l- k newDirection(@); 8 D5 ^) h7 ]' T7 k$ s+ F- n& I0 e
if @.Destination /= void then
# \4 j1 S# D6 d/ ^ @.Destination.NumReservation :=+ ]1 B8 u3 ~& q, \0 u3 D7 Q/ x
@.Destination.NumReservation + 1;& p7 @: A: A" E2 ]. H
end;
! U. U M5 [* i d T3 W8 a' }6 O @.CurrIcon := "drivingHome";
8 Q! V* d8 U5 Y, L( S1 b" B, \ @.DrivingHome := true;9 q5 A o! _1 b/ S
end;$ U" d. {9 M* a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' H. }! I/ y) s' S+ s+ m
part := @.transpOrder;$ q+ q* y) i6 x# n: y1 |! A; M+ K' b
part.move(@);-- load part
& }* n, ]) c; U: ]1 ]; j @.CurrIcon := "load";
2 {) r$ W) Q) L GlobalDistObj := part.globDestination;' y& [+ e4 W# V) ^- N9 Q
assignLObj := rgmanager.rgAssignL;2 P9 ^& L: d. I
row := assignLObj.getRowNo(GlobalDistObj);
* D- V7 T7 M$ J/ H+ t/ Z8 O' a if Row = -1 then -- since 70% m8 V. B" i3 G4 n6 b- A0 {
if lan=1 then
& L7 S+ I! R$ V% S- t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( i' M5 ^- j" H& R' U; t2 u to_str("in der Andockstation: \"",?.~.name,"\"")); x! a& i9 \" f4 s+ ^/ @# q; G
else
1 d+ P0 X# R! s$ n8 U0 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ Z" h; c6 N. A `% k/ m to_str("in docking station: \"",?.~.name,"\"")); + n" Y$ \' n; h8 N. B( N
end;* S; d! c/ w' C0 S" ?" k' K
else' _% m* d/ D2 ^1 j# Q; {
@.Destination := assignLObj[1,row];
`( u: b9 _3 D5 S end;
, F, X* t8 C2 {/ Z1 A/ W7 p newDirection(@);5 ^. b' w" B3 t
@.HasOrder := true;- {- }' H- a0 j9 c: f
end;
8 o7 z7 a$ ~) ?& D end;! [ J O8 i$ {! f/ k& y
end; -- of the method
0 q D4 B2 |/ `) w- H |