/* called by: entrance ctrl of the object 'track': J( r7 ^; x( I% a$ z
*/7 Z" x6 u& _3 U V' p# D
is
) }7 h' N0 S: B+ D, D/ P9 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; Z9 E6 z) Z% Wdo
$ X* G8 Z" R8 o3 s# C Lan := rootfolder.Internal.Tools.AOLlanguage;& |3 h7 J7 d+ U1 o$ I. u4 h$ S
if current = @.Destination -- else return
; D6 v0 P- ^) S6 R: R1 E& J then
+ i8 ]) I9 R2 M- z @.Destination := void;
X5 o' l u' J, Q if @.occupied then
; I" i9 @* }/ I4 q3 |: L part := @.cont;4 G, b) y* @* [5 a5 M- f, _4 b
@.transpOrder := void;" Q2 F9 s6 s2 Y- Q5 x& q. U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 \2 a0 s/ i+ |/ Z( i: N" L @,root.eventcontroller.simTime);5 Z2 s }( f# M
@.HasOrder := false;
3 U5 ^: [: y+ t @.DrivingHome := true;
; z2 i. N( ~9 b. K1 g9 n" c0 \' i rgManager.tryToStartTransOrder;
2 y6 K+ o3 @4 \- L( l) G if @.Destination = void
0 z% A8 }) R$ E2 c( S- P2 B then -- no transport order for vehicle @1 v9 P; t0 |# m7 E( |4 b
@.Destination :=
3 `) H+ i y2 F. S rgManager.nearestFreeStation(@,track.~);
" A5 G k; s4 W$ F: z% i newDirection(@); 1 `( d1 z# e, h- G/ [4 f
if @.Destination /= void then
2 m+ B' R2 q. l u @.Destination.NumReservation :=6 J6 a: X1 s% s
@.Destination.NumReservation + 1;
7 a! R; m c: m* ]3 q. G6 F, v end;+ ]$ ~0 g' B4 q/ e9 V% S7 X
@.CurrIcon := "drivingHome";
# j$ y: K0 i! E2 C: O7 `- _ @.DrivingHome := true;
6 |- e% g4 v1 b4 K- P# [% \ end;* \+ H1 n e$ L# o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% J% D6 E4 F% \! \
part := @.transpOrder;' k h; |0 g" z( m3 M# G* R
part.move(@);-- load part0 Q& n; [5 P* x4 T% p
@.CurrIcon := "load";
! M" c* z' M2 s3 d1 H4 b3 B7 S8 L" l GlobalDistObj := part.globDestination;! e' r! u* @- h
assignLObj := rgmanager.rgAssignL;
O) J3 v* V3 Y' ]! i# b row := assignLObj.getRowNo(GlobalDistObj);2 f: o: i2 m* [' z. v
if Row = -1 then -- since 70% l* N+ a* h) P) `* ^% N! D
if lan=1 then5 K, T8 ?+ J! c' Z1 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% n% u# b% V( [6 J3 Q! [: [( k
to_str("in der Andockstation: \"",?.~.name,"\""));
' J w3 `- W3 D else
" j. Q; Z; l7 E- h5 {( ^) j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- Z: H$ B6 p1 p+ |$ ^ to_str("in docking station: \"",?.~.name,"\""));
* \& L6 a0 H4 f! ]. P; `9 E end;
- Y9 a& S3 @6 |0 v, [ else
]( D2 h, a; C- v k @.Destination := assignLObj[1,row];. W0 P0 O$ f" o. Z( l
end; % f+ u+ F4 I$ k9 t/ Z( X5 o
newDirection(@); e# E. b, }) J- Z* p
@.HasOrder := true;
, d6 M# b, d+ d0 {) J end; X( J: k$ ~* Z
end;
, N" Q* J6 x/ k9 Eend; -- of the method9 n+ y% r% A$ ]: S/ Q: \
|