/* called by: entrance ctrl of the object 'track': l9 q w% f+ L
*/
/ o+ r2 G; j. A8 I) M4 S! ^0 B, Zis/ }0 I$ s4 i$ \/ F4 M4 Y7 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& @* I4 \7 Y J4 Qdo( |# X% Q0 B% J, M0 J7 r
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Q; S& ]- Q6 Z; Y$ _5 P0 w0 _ if current = @.Destination -- else return1 F1 G4 S. R- q
then
) Y! a, b; i, z3 I @.Destination := void;' F0 C2 ~# Q: u- F( j: w) F3 L
if @.occupied then- f1 F' \4 `4 D' d; _# v
part := @.cont;
# B6 C* |# Y( x. N% \8 Z+ c @.transpOrder := void;* f% V' Z, {6 l& r7 x/ ^& A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 \0 i( s9 E" x! y6 U4 |
@,root.eventcontroller.simTime);
$ f3 u# V i( W# ]) Z @.HasOrder := false;
1 M! x. ]1 {( K2 ] @.DrivingHome := true;
% R, o- k3 w8 K" f- Z! A3 P rgManager.tryToStartTransOrder;
C9 e% J+ p8 i- W$ b7 R if @.Destination = void8 Q4 K# Q0 ]! Y9 L
then -- no transport order for vehicle @* F; a" s+ |/ n
@.Destination :=
4 O9 Z4 C2 X1 B9 T rgManager.nearestFreeStation(@,track.~);
7 `% a* J! J; L5 b newDirection(@);
6 a: u' V4 k% ?6 w; ^7 l if @.Destination /= void then8 B% i' C# d, D4 n- ?
@.Destination.NumReservation :=/ S2 V9 J+ ~. n
@.Destination.NumReservation + 1;' C- z2 |1 y! n1 e1 |' M. ?
end;& ]0 U; a. ~2 O, d0 }9 ~) \* r
@.CurrIcon := "drivingHome";8 y* f0 n$ y( ~4 B
@.DrivingHome := true;
% [+ V0 w" \" J) _* ]; J6 ]5 m/ J end;& R; D. R( [* p9 d( j4 i9 d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 n& r: l* F% ]* l7 j4 ]
part := @.transpOrder;
+ G3 w% f# T- ?5 [ part.move(@);-- load part( W. I6 i8 T3 g& a3 W/ e
@.CurrIcon := "load";0 u" U( X& y9 y# R. |
GlobalDistObj := part.globDestination;
7 b) e% A1 p! |4 \7 H assignLObj := rgmanager.rgAssignL;' c3 D5 g& E g; d/ a$ L# u
row := assignLObj.getRowNo(GlobalDistObj);
- \% P% w! c5 M5 R- P* Q( |% } if Row = -1 then -- since 70% y5 r. O& z' Y% f9 k! }8 g* T N
if lan=1 then
; R. N- W/ l" j9 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 e- x Y2 Y& o
to_str("in der Andockstation: \"",?.~.name,"\""));
0 `0 b& f( x2 @( M else
. G9 e4 L, q) l ~# Z5 w/ U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Y; V" ^8 M5 a( Y" A0 y to_str("in docking station: \"",?.~.name,"\"")); / u) b# q7 Z" T$ Y; v9 H0 R
end;7 z' A$ K3 A# [" C# x5 d0 z) ]% C; a
else
8 E( O1 n8 ^% u @.Destination := assignLObj[1,row];( A- s8 {: t* U6 ^7 m9 y6 O
end;
; s3 {- i B3 L8 O5 I newDirection(@);
- |4 B0 d8 H! Z+ B' `) M! M @.HasOrder := true;
. q r: J* x! X9 \ end;
4 Y, |8 D" n* B- E4 R end;6 W+ I6 q: e5 r
end; -- of the method
9 M) t1 e# m9 F |