/* called by: entrance ctrl of the object 'track'5 Q$ r; n: e! m9 |- P- h8 V
*/% V0 w3 P0 j9 l5 C5 Y- b" ]
is
- i/ | O1 V, v* M+ j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 l9 k) ]8 e ~, Rdo
8 _0 C) W- i$ {1 ] Lan := rootfolder.Internal.Tools.AOLlanguage;- c! y+ \* q6 B7 o5 p* W$ s: z
if current = @.Destination -- else return9 \! }* K" R7 e% q
then- ~' w; o8 @8 w" ] Z) @
@.Destination := void;- ~/ \6 G% v1 L9 \, D5 J. s
if @.occupied then
% H! T' f5 f2 X" G5 B2 f% H part := @.cont;+ G0 k6 _1 `# a4 _0 k
@.transpOrder := void;) p5 I7 B, m! q4 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ C+ O9 H! L5 C5 g8 J; s- h: H0 {0 z
@,root.eventcontroller.simTime);
c4 t- E7 J m% c1 @7 x* a @.HasOrder := false;
, z8 } F) `( V: T- b @.DrivingHome := true;! ] U" D4 J1 I# r: s* B
rgManager.tryToStartTransOrder;+ ? a6 S1 x R
if @.Destination = void1 u$ m7 ~8 b3 l8 Z( u5 j7 B7 j
then -- no transport order for vehicle @
4 K2 R2 ^7 ?2 C) v @.Destination :=
/ a: j5 d w- v0 k rgManager.nearestFreeStation(@,track.~);
& d+ e7 H; v7 |5 M: a; F3 l newDirection(@);
1 \0 R+ Q: Z4 c! a0 v9 A8 K if @.Destination /= void then$ [8 z3 {# a6 l1 Q) [
@.Destination.NumReservation :=
) F, S: r" H/ C, B, k( W2 g @.Destination.NumReservation + 1;
# w, {. p$ V" c- j* s/ j end;5 k. I! G# V9 N& h" i7 o
@.CurrIcon := "drivingHome";$ h8 d2 g, j5 c; j
@.DrivingHome := true;
; T' G. @: k' X" |/ u( M end;! r+ b u% m0 J' R4 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* T C3 @5 {% B3 u- N* e part := @.transpOrder;3 h5 [- R0 A# I4 I& s
part.move(@);-- load part6 C2 J8 F& {2 [0 j3 v* x V
@.CurrIcon := "load";
/ S6 m, p( b( ]8 X; V" c GlobalDistObj := part.globDestination;3 E" j& p1 g5 t- u- C% ]; `( X/ `
assignLObj := rgmanager.rgAssignL;
, E) s& a* k# x, G row := assignLObj.getRowNo(GlobalDistObj);, R$ s' Z% r% Z% y3 c; |$ }3 K
if Row = -1 then -- since 706 d& ~$ r$ m0 E7 ^1 Z# _
if lan=1 then+ }8 q) o) k# S" l' g& G. p. q1 f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* L; J$ I+ _, _* \, g( o+ P
to_str("in der Andockstation: \"",?.~.name,"\""));
; W. J3 u; z% T6 e else
7 N/ m3 e7 O9 O3 D- R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' `2 ]3 N( L4 G9 ]/ H% |$ `- {$ y to_str("in docking station: \"",?.~.name,"\"")); 5 A2 G6 D; p4 @+ P! K+ ^1 q
end;7 h+ w8 D5 z$ b- A1 c
else
1 U; g' { J( `' G4 [2 u* ] @.Destination := assignLObj[1,row];5 B/ z& f& j* _2 s3 ^% x
end; : q7 i1 e) v# G- U
newDirection(@);% m7 R, _8 Z4 F- @( t5 w
@.HasOrder := true;5 n1 X; O; W" w. }
end;
9 g- I1 M. s6 g5 O end;, v/ F3 s" i: J8 x
end; -- of the method0 `2 ]( W- m$ \3 P8 t6 u, m
|