/* called by: entrance ctrl of the object 'track') J8 ~6 B( V" d V$ G0 t
*/
. T( v$ |5 m6 T, W* A: H/ l( C- b# h4 Mis
$ J; `1 I$ Q: W1 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. [" |' g2 x" w6 j6 Ldo6 Q; _+ ?1 X3 w9 _
Lan := rootfolder.Internal.Tools.AOLlanguage;
! w$ M, h. z- I! L if current = @.Destination -- else return) @0 X7 o- @4 K/ `
then
9 Z2 y( @: b7 S& c% f" N3 E4 c5 z @.Destination := void;" K' H7 h; X1 g# J6 @7 ]7 q
if @.occupied then
& V4 ^3 |4 v& J& y' H/ E part := @.cont;/ P8 j) S+ F, J3 T- L5 Z$ E h& L
@.transpOrder := void;
3 n2 x' J) G% b" R% b. I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 k8 B* P& m+ U d( ?% y+ C @,root.eventcontroller.simTime);
; {3 y( _ p4 L0 G; j( u( l @.HasOrder := false;: C) s( ^6 M% E `
@.DrivingHome := true;
" f3 G* i+ E T/ s. k# f) o% K3 t3 `1 g rgManager.tryToStartTransOrder;
, s \5 f/ R; D, V7 { if @.Destination = void
0 Y' j6 ~% e; M1 S9 ] then -- no transport order for vehicle @
! b; E {1 G! P6 }9 O" v! } @.Destination :=
& s7 X/ Q1 [' G rgManager.nearestFreeStation(@,track.~);
, J0 a1 l1 Y$ V7 [ n( [9 s newDirection(@);
0 z( u2 y7 f: ^( Y, o, \ if @.Destination /= void then, e2 e9 l. j' d
@.Destination.NumReservation :=
W. p9 q9 d& A" z* g- T# D @.Destination.NumReservation + 1;6 Y3 s4 T" l0 o3 F. k4 h
end;1 Z1 s1 R( x% u; z
@.CurrIcon := "drivingHome";
& i+ h) F ]0 D. j+ i$ [- V2 V- t @.DrivingHome := true;5 H3 r& D& x8 E7 i4 f4 r9 Z
end;
+ p6 W# ?3 T) c( x2 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station T. ^: b& N0 L: v5 _
part := @.transpOrder;
: m4 P9 O" q9 W, r part.move(@);-- load part6 n4 h1 I3 y, ~
@.CurrIcon := "load";
8 {( W* D/ d1 M9 ?; I( l+ M GlobalDistObj := part.globDestination;
" O' {$ s( ~, K) n l5 g. q# H assignLObj := rgmanager.rgAssignL;
' ^2 l+ S: |' t0 j row := assignLObj.getRowNo(GlobalDistObj);7 |2 J/ C6 b9 z$ O M6 J5 v
if Row = -1 then -- since 70. E" @0 _$ ]7 I% r4 p4 G) o: \/ y$ {
if lan=1 then
/ _6 {$ Y8 T7 S' y* @0 g0 N6 K9 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. r/ W J s2 k1 J, H. B6 Z) P
to_str("in der Andockstation: \"",?.~.name,"\""));" ]8 H2 h0 Z: `) n8 ?' k
else0 D. B( T/ S% H s' j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ v( w( y7 v1 u% ?: U* m2 d6 x
to_str("in docking station: \"",?.~.name,"\""));
5 \) j4 d1 ^0 S b3 \4 X end;; x! A* N% W, M1 E
else
' y3 J3 K) p8 J" t. P @.Destination := assignLObj[1,row];
, L) v( q7 M! ]' j end;
+ K! _' _) F5 l! T3 B- _% R newDirection(@);- u( ^! o$ R/ N8 c# I6 R' W, _
@.HasOrder := true;
* f( R" V* D( {! |9 C6 u end;2 N$ H3 ?) v7 j5 M) k! S" S
end;
# U% O/ Z! H0 xend; -- of the method
6 _( z1 u4 {1 ] |