/* called by: entrance ctrl of the object 'track'
# h& m1 d0 t0 o% V R/ a*/" u8 S5 n/ V+ E$ p. t7 `, p7 q3 H
is
8 S6 W' w8 a: R# a3 d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* k9 o& G; Q w# Y' Ndo
|8 O9 Q4 {* q4 G4 ~5 l Lan := rootfolder.Internal.Tools.AOLlanguage;
2 M9 }5 x9 ^0 I* Z5 X# |2 |. L if current = @.Destination -- else return, L: k j+ d9 c$ ?$ x; |
then
- W; T3 w( |: ? @.Destination := void;2 e' T* ~. Z4 t2 ]5 o1 M7 H9 U
if @.occupied then. }0 @% X$ i1 O$ g0 @
part := @.cont;3 B& {) o* E- }# ^, A1 |
@.transpOrder := void;
g2 H* P& B$ d9 i/ | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ _& u R; R1 j* o/ S @,root.eventcontroller.simTime);
3 c' X$ Q# o( y$ L @.HasOrder := false;2 y$ e" x8 e* `+ g6 j
@.DrivingHome := true;& g0 c9 k; U; R1 X' x3 i* h
rgManager.tryToStartTransOrder;
0 o! v$ T m7 G/ ^ l- d& Y if @.Destination = void% ^9 X R3 J- Z1 `) H' L
then -- no transport order for vehicle @
0 l; w* B# W: a1 g @.Destination :=/ @" R4 p; W) D" o
rgManager.nearestFreeStation(@,track.~);8 y! S! Q( k; Q6 ?% K# N
newDirection(@); 6 d8 {7 G2 X6 a3 Q; ~
if @.Destination /= void then
/ |3 z# H& K: @! V: C @.Destination.NumReservation :=8 h. {; n: O* x2 W' E
@.Destination.NumReservation + 1;
: T& d2 p* U# i0 z( t6 ?% s8 `, a end;
. }: _7 b: ^! }% p6 ?- @ @.CurrIcon := "drivingHome";
( Q% l5 w, x! e" t8 i: E @.DrivingHome := true;
* J( g* z' F$ t, m0 _ ] end;. j7 v N) j; F6 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% H: d/ q m0 \, z8 Z; k
part := @.transpOrder;
0 l( S* s+ x* Q) L/ C. w part.move(@);-- load part
$ ]% R) N" {0 |& t& u @.CurrIcon := "load";2 a" Q6 h4 C% j* Y: P
GlobalDistObj := part.globDestination;
; R; t2 D) V9 E# _ assignLObj := rgmanager.rgAssignL;' { r+ h, k+ { m& \8 M/ j6 h
row := assignLObj.getRowNo(GlobalDistObj);5 N& A$ q# J8 Q3 k B3 O
if Row = -1 then -- since 70, Y4 v0 T6 h3 c' N
if lan=1 then
' f2 E% A, h2 o1 N" n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# n: U/ r% H7 ^4 U, m; e5 C B7 E6 | to_str("in der Andockstation: \"",?.~.name,"\""));
* M0 x$ K8 E3 p) x! _2 i( K else3 ^% K1 m3 u4 S6 @+ j) a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 L( k( K6 |) _* g7 h# Z4 ^
to_str("in docking station: \"",?.~.name,"\""));
( Y) X: V/ @" q) c% L end;5 o' `2 J6 R$ c% r
else
0 I1 F; ?' p* g) @& x. C0 y3 r* x J# u @.Destination := assignLObj[1,row];
: r+ Q/ Y$ i- v" j end; + r0 t7 \; N2 B
newDirection(@);- D1 [5 e& q l& F$ Q4 T3 W
@.HasOrder := true;- c% u8 u5 F8 [( v- V$ r! g
end;8 f! W& _; S( S! O
end;
( b0 k4 O; j; H7 t2 Uend; -- of the method/ g0 ]9 X& H- z* r5 r
|