/* called by: entrance ctrl of the object 'track'
/ V; X# G# q$ `5 ^0 } `8 G. l*/) a1 C2 A; Q$ i+ A* }
is) K3 S4 r b" q5 z9 \3 }7 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. m+ W5 r2 S/ W; u8 u; w6 X4 T! Z y
do3 z) k# e2 j8 V+ h( \
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ s" q k6 p4 d$ p; \4 {3 O if current = @.Destination -- else return
4 b; ^4 R" G% m9 O then' ]0 M0 } E& A
@.Destination := void;( i0 Y1 O0 s4 T0 K. i2 c
if @.occupied then
9 N: t: l! {6 q8 T- I* N( I) e! ^ part := @.cont; s+ g3 h- T( k6 ?
@.transpOrder := void;+ L: W: ]" W; U) M* M3 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ A- J6 Q- i4 l8 J+ ~
@,root.eventcontroller.simTime);
d2 ^; O1 r% s @.HasOrder := false;# w* G. b/ I; {4 R' n& \
@.DrivingHome := true;
( Y1 \3 b9 j1 ]9 b( m8 n1 \ rgManager.tryToStartTransOrder;
7 G9 l4 H" R% n& W' Y# e. m if @.Destination = void
7 n$ }! g. b- C+ n4 q5 H then -- no transport order for vehicle @. e( k$ K+ O0 Q5 B
@.Destination :=: j- M6 i! L. e N( s3 ]
rgManager.nearestFreeStation(@,track.~);2 i0 ]3 z! D9 c3 G
newDirection(@); 4 z0 _0 w1 c' j
if @.Destination /= void then
& j' s& r& I V. ^' _ @.Destination.NumReservation :=* D3 D% U3 Z: z6 `% E
@.Destination.NumReservation + 1;
+ a- O& A2 u) g% B$ a) I; b end;
6 {& g9 @* U) D$ H: |/ O @.CurrIcon := "drivingHome";1 j0 ?* ~8 q0 _
@.DrivingHome := true;3 V* |+ W0 B2 o$ r. G+ ]' }
end;1 O8 N" m; @9 L/ M( X1 Q/ X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 x: k! d1 U7 @6 `) {7 H, E
part := @.transpOrder;
' `: G3 q) F8 P8 k' p, a part.move(@);-- load part
- e/ L4 }9 r2 l# w/ m @.CurrIcon := "load";! l5 M) g% Z" b. z( Q
GlobalDistObj := part.globDestination;3 s: i) G- z$ q& p/ f1 {
assignLObj := rgmanager.rgAssignL;
0 E& w H+ [# G) U3 _3 R1 [ row := assignLObj.getRowNo(GlobalDistObj);
8 w# u! L3 v, c6 G% Q if Row = -1 then -- since 70, h! E. l A" E" G- u# ` Z
if lan=1 then% a0 ]$ `9 |2 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 E9 u; E* i4 L: i& R" A2 K
to_str("in der Andockstation: \"",?.~.name,"\"")); u: N" n$ y/ _' L6 q
else0 Q5 q5 }3 C9 b/ ^5 w/ w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& g' B) H: E' P% H to_str("in docking station: \"",?.~.name,"\""));
& M7 e2 o/ c4 B0 @" Q end; ~/ w% f }. g. h: g
else5 D6 d' @: q2 `8 |, i$ F
@.Destination := assignLObj[1,row];$ ^/ T$ W4 E8 ]6 i. v9 a. C
end;
# Y( z1 N( l0 M! i8 K7 E newDirection(@);
% M- ]7 ?( Z; S @.HasOrder := true;2 W( P$ J6 Y! u8 r
end;% V6 ^% Y, H5 y8 O/ U o
end;5 K$ {$ D/ e" C- A" C, l5 k
end; -- of the method3 f8 W h9 x. d% @" B5 X
|