/* called by: entrance ctrl of the object 'track'
) W Q0 ?$ F: p$ K*/- u' s. D$ \6 N0 a' T" |# o3 _6 G
is, T0 G7 S! J7 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ E( X. i- w h( `do% A, _& L7 S3 T% v3 S* Q; x+ t, f
Lan := rootfolder.Internal.Tools.AOLlanguage;/ P& i. J N3 V* u1 |& m
if current = @.Destination -- else return' B" t; d: K. a& o( s4 A3 {
then
7 G+ @% V! C* H5 E9 m ` @.Destination := void;+ V! u& Q! J \: N3 g( e- m
if @.occupied then. a) [( A1 Q% T/ G; ^8 p% d* \
part := @.cont;, R* E2 ^; h4 D+ o6 ^: q
@.transpOrder := void;
8 Y/ d! Z+ z/ w2 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 e) ?8 X! S$ u# i; M. k9 {$ ^0 { @,root.eventcontroller.simTime);
" I9 q }) L# L7 Z: | @.HasOrder := false;
" F- U. `# o% c" ?$ u4 ^ @.DrivingHome := true;
$ l- D Z7 r' Z- V5 t' Q8 t* D rgManager.tryToStartTransOrder;
9 {. ^2 V+ m) G if @.Destination = void1 w8 I4 K8 z h# G$ c& S
then -- no transport order for vehicle @0 |' f3 ]) |3 V4 C! N' v5 C! v
@.Destination :=% Y9 ~5 k& {1 s
rgManager.nearestFreeStation(@,track.~);
* A* @- A. U, n7 M" {& q' Y" H newDirection(@); # I$ O+ D6 M( ~2 ]5 p
if @.Destination /= void then
: E0 S2 l1 @9 u @.Destination.NumReservation :=
' H9 u- o1 [5 d- _+ T% Z1 E @.Destination.NumReservation + 1;9 n p" O. S2 ^/ y. g: W7 b" V& h2 P
end;
: } Y6 J% T/ s6 J% c4 Z @.CurrIcon := "drivingHome";# q( F' _, r# Q' \
@.DrivingHome := true;
! V0 k8 R) S9 m- `0 X7 B/ B% L end;1 T& J7 p9 m6 u7 ?# }: E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' z4 K' o8 q: u8 g
part := @.transpOrder;
* P' R e7 O0 m* g part.move(@);-- load part
' `) X" Q. z7 H" Q7 r @.CurrIcon := "load";
$ R/ H/ F* @; z, W& K1 t* P GlobalDistObj := part.globDestination;0 n1 B. E& P x4 y9 K/ e' n2 Z
assignLObj := rgmanager.rgAssignL;7 o3 s: a U0 e9 R4 ?
row := assignLObj.getRowNo(GlobalDistObj);
8 O8 c% q. G6 A. t* s if Row = -1 then -- since 70
0 |2 m: w: N! c. g/ P if lan=1 then
$ ~9 ]/ j$ Z+ K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 \5 q. m( @. h! m* |: V) _4 h to_str("in der Andockstation: \"",?.~.name,"\""));$ ^* w2 }/ @7 Q5 P% W
else5 W. u3 v! g2 X2 R" a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 k4 X0 R/ |2 {. V% b
to_str("in docking station: \"",?.~.name,"\""));
$ \# s6 j0 C2 P; @ end;/ l, F4 `; x1 }. W
else& I$ U! A" T# y/ p
@.Destination := assignLObj[1,row];
" T _- m7 @# m2 b9 J end;
+ |4 M5 `" I7 K. ]% l. g0 L6 Q newDirection(@);
5 q. A8 C8 E* L; M2 q @.HasOrder := true;0 u: E, I& j D4 R
end;# T0 h) }2 W4 @: }+ g) m0 w
end;
+ T k4 E: e& W+ I5 Iend; -- of the method
& ~4 ]9 {9 N: z6 K' a5 p* T" T |