/* called by: entrance ctrl of the object 'track'' [$ a! Z ]8 `
*/3 w2 |; r: {. J
is
- |5 \) @; e2 ~2 C/ U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" Q3 }+ R: i- I$ q2 R1 ?. j Vdo
$ i1 P5 _0 B" M Lan := rootfolder.Internal.Tools.AOLlanguage;
! o% o3 b: D& `# T if current = @.Destination -- else return7 Z' s& @& X8 Y9 m5 {3 a
then
- q% L7 i: T' ^6 T$ S7 t5 H1 Y @.Destination := void;% C. K: p5 J) J: f! Z& ]& I: k
if @.occupied then
) r& ~* J9 w7 Z part := @.cont;9 p- r8 p: T* d8 n( G! ~; h' {
@.transpOrder := void;
+ w% Z& I) K: W; V) u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# N; x% S8 h0 }; o5 D
@,root.eventcontroller.simTime);
: {% N5 i7 A+ I, P @.HasOrder := false;7 r! M3 C X3 y1 U
@.DrivingHome := true;6 h3 R. m: V% k) F$ Q" @' L4 j
rgManager.tryToStartTransOrder;; t* V v F1 `7 |' Y
if @.Destination = void
$ K, h9 ]8 |4 k% ^ then -- no transport order for vehicle @
. @0 v, G( M' m. c% R3 Q+ K @.Destination :=
; \1 U- ]$ i, \6 m' B6 ? rgManager.nearestFreeStation(@,track.~);
! W1 L' u7 J$ c! ~. z( s2 X newDirection(@);
" E) O' E: x) k9 g4 {8 T0 S- Y* N if @.Destination /= void then
% Y1 S* |' S$ L- {! e# _ @.Destination.NumReservation :=
! y, [1 u4 i( `; C6 `7 K; g" R @.Destination.NumReservation + 1;
6 C5 V' [+ {8 ]- F0 p2 P& f end;
* k' {$ q1 ^5 D @.CurrIcon := "drivingHome";: X+ {7 Y. I% S- s
@.DrivingHome := true;, `/ x1 B) O4 Y
end;
0 }( d7 j+ C) z4 M' Z& Y' U" k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 a: U% ^) o4 Y- F part := @.transpOrder;
, @& I* M9 S+ w" J5 A, {1 d; y part.move(@);-- load part
2 ^; O' D J, y4 b! \- A @.CurrIcon := "load";
6 f4 a1 u+ z1 ?7 T/ v GlobalDistObj := part.globDestination;5 n2 E1 @& t7 @6 e
assignLObj := rgmanager.rgAssignL;
" m! H1 A8 U4 @ row := assignLObj.getRowNo(GlobalDistObj);+ a) Y5 h n/ U
if Row = -1 then -- since 70; F) d, \ Q2 n' y
if lan=1 then% v4 B/ K8 k, X5 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 M$ k4 ]3 E7 n$ q& I. n
to_str("in der Andockstation: \"",?.~.name,"\""));# w0 E' u9 A+ P; r. e& C
else' ]0 h! [4 b; Q$ ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 n: ]1 ~. Y* d! o% Z$ V: C to_str("in docking station: \"",?.~.name,"\""));
$ G8 _3 o# c' n7 ]. r; j V9 p! g end;5 {! k1 B/ ~7 R
else! N4 C) _7 L! H
@.Destination := assignLObj[1,row];5 ]# o* E9 H0 _" {
end;
* |3 X) N; I1 W) F2 i newDirection(@);" Z6 P+ G1 R9 {3 x5 m. W- }
@.HasOrder := true;
% f+ ]/ e; b* i V2 P) ` end;
% U$ S& y# v1 d4 H end;1 F3 d) b0 P) G
end; -- of the method
( Z1 i% K. S2 D0 _ |