/* called by: entrance ctrl of the object 'track'
, }7 U+ h& b( R" x*/: i! G: q7 B2 f- r/ H) e3 `
is3 U9 q/ @6 _. `0 i- h* s8 D8 @/ t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ Y) K0 t1 }, Ddo' H K4 G: Q9 t* Z; z1 [
Lan := rootfolder.Internal.Tools.AOLlanguage;/ t6 @* u- D9 Q% T
if current = @.Destination -- else return
1 A& {" V. m/ w4 n: a. i6 e then
- o& W: p4 p( e- `# G2 r) ]- d9 F @.Destination := void;2 l4 {8 Z& Y( P( w
if @.occupied then# W- n8 \, d2 K
part := @.cont;
# D# D3 h. m" S+ q- B6 c: z0 q! ~ @.transpOrder := void;
9 V/ Q5 b w& Y6 Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( e% @5 @! Q# e* _# N( k @,root.eventcontroller.simTime);
1 A3 M2 I: w- t1 g' A @.HasOrder := false;0 @& N; J+ P" K0 L! z9 f
@.DrivingHome := true;
5 `+ R, m4 D2 ^; i+ Y3 o% E rgManager.tryToStartTransOrder;' ~, Q; {3 I" e9 m' L1 @ P% N
if @.Destination = void
4 I" _9 e' t0 r6 V+ L' N9 w then -- no transport order for vehicle @9 F' E0 ^5 @# M0 C) g d4 G3 o+ ?
@.Destination :=
g+ z& O, B8 ~) c1 \& ?" k rgManager.nearestFreeStation(@,track.~);+ W! Z' H x; b" _0 D
newDirection(@); . A, n% [. t/ B/ o8 }
if @.Destination /= void then
% x0 Q6 q6 ~- K/ r, Q) H2 ` @.Destination.NumReservation :=
1 [# j- d2 o* d' W* T% z: W3 Z8 @% G @.Destination.NumReservation + 1;
. E: I& q8 W* ^% [ end;
n4 z* P5 w; ^8 p: R @.CurrIcon := "drivingHome"; @) X( @; |) l6 s0 f
@.DrivingHome := true;
/ X9 n' R O. ]$ q9 n end;
' _* V8 R8 R4 p$ j- @5 V2 ]5 K8 Y. w else -- the vehicle @ is empty, both vehicle and part are in the same dock station& k3 c: i! A# s% d$ V9 p
part := @.transpOrder;
) A6 I" n/ n9 l& ? part.move(@);-- load part- ]* z! t7 H) a' _4 y# W! O
@.CurrIcon := "load"; }: [; } `$ f2 b+ \
GlobalDistObj := part.globDestination;6 h; R U! E8 h, C; O
assignLObj := rgmanager.rgAssignL;8 ]0 A& g! h' d; s* D7 X
row := assignLObj.getRowNo(GlobalDistObj);# ]5 h& Z. N ^9 ~/ ~
if Row = -1 then -- since 70) d+ x/ r$ z% K: q0 y1 R# \/ u/ k# l
if lan=1 then
6 F* N' J; W5 w5 K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" g3 C+ P) `) E, L to_str("in der Andockstation: \"",?.~.name,"\""));0 D" K9 k9 V# |% s A, S
else
' A) v3 U5 y! p# h2 l, i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; M) f# I& m$ T. e! K# m
to_str("in docking station: \"",?.~.name,"\""));
$ t" z4 l; ]9 V# J8 j/ z end;
) N6 \$ Y8 _6 X l else1 j" ^. \$ R2 g6 } u4 u8 w& d- Z
@.Destination := assignLObj[1,row];) H0 x$ z- l2 e
end;
2 f, a8 a. X: z& @" I* C* H$ }8 b; { newDirection(@);6 D6 ^: _4 I) R" H+ m% u, n/ H
@.HasOrder := true;
& g; o% R2 Z2 \$ m8 v8 ~+ v0 l end;0 T2 @, p; z) |" a
end;- D4 b. z1 b: P, s
end; -- of the method0 \& n, Y8 h: W- H8 Y
|