/* called by: entrance ctrl of the object 'track'
& q9 z P1 }. ^' Q" ?9 }% u$ Z*/
- `2 h0 j5 w# c: D1 A7 y: J1 Z( pis
2 q( l* j3 k8 k( A0 ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 B9 U/ P9 v. V2 [" ~6 V# n6 m3 K2 ydo
4 S' X1 x6 X" m; n0 l L Lan := rootfolder.Internal.Tools.AOLlanguage;
& c* j# X5 D; I) v) f if current = @.Destination -- else return! Q0 U. v( T6 `, U
then
7 @$ ^) P: v8 M/ v' d& C { @.Destination := void;) x" S8 q @3 Z: N! b
if @.occupied then
9 U! H$ A6 M' f0 O# v9 c& h" q part := @.cont;% v' ~: Y7 B6 x9 M0 i
@.transpOrder := void;& c% [* J1 x5 h, ?( v) C2 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 P' f$ m$ \; x3 R3 m/ M$ ^ @,root.eventcontroller.simTime);0 }% ?, k6 Y! i0 k8 p/ U- e
@.HasOrder := false;, C0 G- r$ g1 V9 I
@.DrivingHome := true;/ U, ?, \2 r& }; {# V2 r. V
rgManager.tryToStartTransOrder;
! ^! |$ w& q( z( N! ]8 l if @.Destination = void: N) E$ o* G" X! Z5 r6 x4 ~9 T
then -- no transport order for vehicle @0 y0 G; v/ H+ S
@.Destination :=
: L3 u4 u% Z9 Y6 i rgManager.nearestFreeStation(@,track.~);
; k( e+ D0 }, F( t1 \6 r" a newDirection(@);
. P7 [, ~# q6 q! k$ t+ g/ z: p: v' G if @.Destination /= void then
+ T) q2 Y, E/ H5 @ h @.Destination.NumReservation :=: n' c" m! X' ]8 G
@.Destination.NumReservation + 1;' P) \+ W9 W& P1 @- r- c
end;
) q; I9 S& u' X1 p @.CurrIcon := "drivingHome";4 R( _, G( v; C3 S9 i9 q4 [- v4 ]
@.DrivingHome := true;0 G& x' Z8 [ t1 W; M$ Q
end;6 U) V% J6 u0 X' d" E8 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( ^) G7 T ` i* W7 T1 \+ Z part := @.transpOrder;
2 n3 l7 J- g u9 ~- u! A$ R/ `; O part.move(@);-- load part
! D. ~3 S6 `% k, y v @.CurrIcon := "load";6 s0 W5 `+ I# B3 v- h/ j* i- D
GlobalDistObj := part.globDestination;* k9 M, d& e X |" u1 g+ U/ n
assignLObj := rgmanager.rgAssignL;
# U) f7 V) s& \9 i' O2 e3 Y row := assignLObj.getRowNo(GlobalDistObj);4 j$ y' o' U6 R( c& C' n; s" r& P
if Row = -1 then -- since 70
/ i' ^9 E& p6 j if lan=1 then2 ^! w, }, W' Z: N" E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, |: z4 z0 v% `
to_str("in der Andockstation: \"",?.~.name,"\""));
$ ?! o1 R8 x, R: e/ w+ `" @! G else% U# {3 q' A2 E4 I% N# X. e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' z+ G8 I5 N& c/ F5 h, a/ H to_str("in docking station: \"",?.~.name,"\""));
; {( D T4 x3 a! y" o end;
$ ] {. ~" L& [9 `3 O8 q9 z. _ else: f( g* ?" r. o0 A, O
@.Destination := assignLObj[1,row];
$ u$ S9 G$ n! Z q1 @- n$ T end; 3 S7 m# [! S& K
newDirection(@);9 [0 K5 Q! G2 r" w- v7 J0 E
@.HasOrder := true;
2 E$ n- J1 u1 O/ i, k. l, t0 B end;2 g6 Y. D. T) W
end;
* g$ z8 P+ x4 T8 S% Pend; -- of the method
" M, c6 b- L2 H! t |