/* called by: entrance ctrl of the object 'track'! m; `/ A, B/ Z+ K* j( Q8 x; m
*/, L. s4 \2 e/ z& \* S
is
" T) ~& u( \$ R# z5 [: a part, GlobalDistObj, assignLObj:object;row,Lan:integer;: t6 A/ e( i w& @3 B/ T
do1 @0 z7 R9 x# F% S2 \
Lan := rootfolder.Internal.Tools.AOLlanguage;! @ y' F! F2 b" P; }$ f. l
if current = @.Destination -- else return
- q( z( V, p0 _ x( x# _ then8 k& p) E5 ~( x
@.Destination := void;- b0 s, h6 a$ U ]1 Q4 b( d
if @.occupied then) J! M) u, x( |9 R- R
part := @.cont;
7 I& L" H' o A! l* @5 |8 r4 _ @.transpOrder := void;0 N. L/ r4 N7 i) \7 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 \- ~) z0 F* C* _. D @,root.eventcontroller.simTime);7 Y( }8 i* o9 N1 S. A H1 z5 [) E A
@.HasOrder := false;" O4 \3 l& r% r& s4 p
@.DrivingHome := true;. l* ]' F! F! X
rgManager.tryToStartTransOrder;5 a) ^+ Z8 ~: u, t" w0 V& T3 Q
if @.Destination = void
/ Y4 w( x1 D! e P' q; T then -- no transport order for vehicle @$ I$ H7 ] \7 ~# S
@.Destination :=
8 B! Z* ]1 `: C rgManager.nearestFreeStation(@,track.~);6 _4 C0 [, B8 r
newDirection(@); 3 l8 o6 r/ |8 w" V
if @.Destination /= void then
5 z; X b( v) o9 U; G @.Destination.NumReservation :=
- g1 R K/ b$ a" n' Z3 }- v& Z9 n @.Destination.NumReservation + 1;2 y: F, \" |! q( k6 T% ~ G$ J
end;
( i3 M% z& \" W5 v3 d7 u+ E @.CurrIcon := "drivingHome";: f, |6 r @# K3 n: U6 Z5 c4 Q6 }( y
@.DrivingHome := true;% G7 n0 X9 `# I9 C
end;% W* T! E; v8 F$ L& X* n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 i0 b3 | L* P" s- E
part := @.transpOrder;8 w' p& K. i1 N$ x9 x) \* |
part.move(@);-- load part
8 U9 ~4 R* y) ^8 @2 L @.CurrIcon := "load";
. f) i) r' x8 |' y# K: ?9 ` GlobalDistObj := part.globDestination;2 l# D4 X$ v9 l0 f7 P
assignLObj := rgmanager.rgAssignL;: k2 _6 A# F, r7 q$ ]/ M2 r! [
row := assignLObj.getRowNo(GlobalDistObj);
0 v( k) Q4 o3 ~7 [8 Y if Row = -1 then -- since 70
: h/ `8 B: l+ |: l. b if lan=1 then& b/ b* C! s8 b2 N/ t1 Q" R5 _2 L ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 D+ j# \6 o- i* o
to_str("in der Andockstation: \"",?.~.name,"\""));4 }/ B% S+ V/ g; _. x- ]$ @2 H
else% u( L( B2 h8 L+ \( \1 ^3 Z) K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 Z* y& M; r6 y2 D8 d) Q to_str("in docking station: \"",?.~.name,"\""));
4 C' Y* [) E {7 v y0 t end;7 @; t5 q2 K$ r3 [1 ~
else
0 O" h- o2 K; M T2 u7 p8 Y; m @.Destination := assignLObj[1,row];- \1 d6 |! U* C5 F8 l' H1 Y8 c
end;
* P# [: n! o$ S/ H newDirection(@);
/ h" m) d. C( W' T+ }% d- p9 h @.HasOrder := true;
. Z+ P8 h8 N. b$ C8 ?7 c6 E& m! i end;; u) ~( [$ M' f
end;
* q# p; ]9 f8 ]1 l7 F, M, ^end; -- of the method) } q- l) h- C8 [" U6 w4 m% D
|