/* called by: entrance ctrl of the object 'track'
# s: O5 M) D. s*/! i+ S; J' l* ?5 X
is
% d. q" F* V; c; M3 u4 v, K3 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;) [& u4 L m) T2 J& P( M9 u
do/ |: q, n Y' G4 z! K
Lan := rootfolder.Internal.Tools.AOLlanguage;9 T- i$ L6 k/ _+ ~
if current = @.Destination -- else return% M* E! O& F& e5 W q+ P
then
5 O2 Q4 h: Q" Y) j @.Destination := void;
$ l# Z, ?$ F: o# a) K. m if @.occupied then
$ Y3 E$ i$ O+ [' L part := @.cont;
3 e7 N" w6 G9 s5 o5 s- x @.transpOrder := void;5 W1 N2 E }* ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( l! z/ W1 U4 C# t8 C' q0 ~+ M @,root.eventcontroller.simTime);
7 v+ E4 N9 x1 B0 | @.HasOrder := false;9 q3 c3 |1 r; U$ m% s! V
@.DrivingHome := true;
5 k- G) B k" B0 T6 w7 O! a7 L rgManager.tryToStartTransOrder;
# q- j( [6 z' u4 g4 j3 x8 m if @.Destination = void
* k8 b8 e, o3 n3 @1 B- P, W2 M then -- no transport order for vehicle @- p" {# o# S9 x- g# |
@.Destination :=8 q+ E) ^2 w) V
rgManager.nearestFreeStation(@,track.~);
! @$ U2 A$ K* ^ newDirection(@);
* l0 T1 l0 d/ R$ X, F if @.Destination /= void then
% o2 ~# c) E$ w7 F, w% x- Y+ H @.Destination.NumReservation :=4 ]* F3 K! e% F. T1 Q
@.Destination.NumReservation + 1;
3 {$ K1 R s% r% F/ E end;
7 l. Z* c: u/ h3 }: ~ @.CurrIcon := "drivingHome";: K, g$ T5 a0 p
@.DrivingHome := true;" ~# j1 }) d* u2 f" @
end; h6 o5 n/ @% q" B8 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) D8 x/ H9 R' n part := @.transpOrder;
" n4 G( u; l, J3 Y' [% _$ n part.move(@);-- load part7 V& G8 a/ d9 N" K
@.CurrIcon := "load";
) D/ L$ O5 R+ Q5 d GlobalDistObj := part.globDestination;( a' V8 r4 G0 Y; ?) i& E n6 N$ \) j
assignLObj := rgmanager.rgAssignL;4 u$ U* m, M( C8 W B' }5 [: {
row := assignLObj.getRowNo(GlobalDistObj);
5 T3 m& ?, }+ p6 F& S$ n' [) ]2 x8 } if Row = -1 then -- since 70
4 t- {- _% I+ F2 x/ l$ s if lan=1 then
( l! y" r/ ~* l$ }7 ]* ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ P, O/ c- l/ l3 q to_str("in der Andockstation: \"",?.~.name,"\""));
) _) T& d/ [( I7 s' D) @/ A( j else, E, R1 _6 a! ?+ x0 z8 }& Y$ }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
K$ Y6 E, q+ X+ @ to_str("in docking station: \"",?.~.name,"\""));
* q" z0 V1 P6 ~8 B9 A end;7 U- ~+ x- f9 ]+ r5 a1 m
else$ P) n. Q2 f n$ c
@.Destination := assignLObj[1,row];
p1 E: s8 d4 {. G* y$ c end;
+ X/ r* V! H+ x- x. l) P% \ newDirection(@);# V3 c5 f2 S: K! `1 T/ i8 {+ j* B! G
@.HasOrder := true;
: U$ ]5 z8 G$ X0 g end;
) Q1 d, S# O4 n& q% j8 U end;% w2 b. u2 `4 @0 _2 g$ N5 Z4 R) M4 _
end; -- of the method
; K5 b8 {! m5 n9 B, L4 f$ u |