/* called by: entrance ctrl of the object 'track'1 o' }+ e. y( }3 e# {
*/6 A( }' E/ H6 s* g. X7 D2 z7 q
is
3 j4 K# V+ m6 M8 E% w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 Z5 K( _1 Z; ido1 i) D" Z9 Z9 C8 x) B: n" a. U5 M
Lan := rootfolder.Internal.Tools.AOLlanguage;$ k: ?% I ~+ T+ d7 F0 U0 g
if current = @.Destination -- else return
! C# B( _* k# {# k/ X8 y then4 p4 c/ D" @# E; \, }
@.Destination := void;# @/ M0 m6 K6 _7 u" z& k% L
if @.occupied then* V% t& o2 o) f1 B/ N) w/ ?. w
part := @.cont;3 j+ f1 ?& c' l6 x- k9 J
@.transpOrder := void;
2 a# s* y" y- H: _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, b! i1 h0 U6 v; L: F* m6 B
@,root.eventcontroller.simTime);
' H4 j: @% |; p8 z2 x- A4 E @.HasOrder := false;
5 s% U9 x) q1 |0 _) M1 k @.DrivingHome := true;, J$ U" q3 Z' `2 W) {- |: w
rgManager.tryToStartTransOrder;
2 q# g; h7 _- M, v- _ if @.Destination = void
@/ a1 o7 r5 }5 W4 g% ~, t+ ? then -- no transport order for vehicle @
# f9 [1 ~1 J5 r$ C @.Destination :=9 C5 N" m. \8 _1 i1 }3 R B: M- T
rgManager.nearestFreeStation(@,track.~);% z/ k Z: P- K A- w
newDirection(@); , M9 u T! G1 N( w& f
if @.Destination /= void then- P/ ^- Q" ^1 |+ Q1 E f) O( U
@.Destination.NumReservation :=
% h# l+ u. | F, C+ N) t5 K8 y @.Destination.NumReservation + 1;& n$ U0 ` G7 q7 w8 R
end;
. x1 d5 p: J# Q" b4 f, r @.CurrIcon := "drivingHome";+ i2 g! U6 t' ~" [: @- J
@.DrivingHome := true;" D/ C8 m8 S: Z8 I' P3 ~' t
end;
8 E0 \- o0 ^1 Z* e) L else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 Q+ m/ ]7 [* c
part := @.transpOrder;# H" i- @. x& L' N5 I- i
part.move(@);-- load part
, ~6 s. p1 R: q& ^1 r @.CurrIcon := "load";
# _5 W0 [1 F; T, u. a GlobalDistObj := part.globDestination;
8 H0 X) S* u1 C) I4 ? assignLObj := rgmanager.rgAssignL;
% ^- P8 X2 \$ T3 H" Z: G5 _ row := assignLObj.getRowNo(GlobalDistObj);
! Q$ Q3 b! ?$ u+ v/ I if Row = -1 then -- since 70* \: u/ a0 E, m8 f2 H( l( L- G
if lan=1 then
; q8 Z- z7 w( ?8 ]. G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 \& K' u/ }/ [+ ?4 a3 y) y to_str("in der Andockstation: \"",?.~.name,"\""));8 g/ C. A0 U. E6 n& z
else: y( ^, O" w% L+ X6 b# P. D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; u. W/ _* M; @8 Q4 q/ G" `
to_str("in docking station: \"",?.~.name,"\""));
' |) Z1 {$ q2 z$ f/ [0 { end;! @% U7 [. V6 p0 D* h; J4 x
else) u* Y. S, `1 b8 M! b
@.Destination := assignLObj[1,row];4 H- ], X9 H- i2 d
end; ) X; R7 ~9 e+ v% v1 q P
newDirection(@);
+ i+ B) d; R7 A @.HasOrder := true;/ L+ K5 E! X* b( y1 u7 ?5 |7 U
end;' P3 N- u J( f0 F! y
end;
- f( q- n" p$ j+ [; G" M% ]end; -- of the method
8 C8 Q$ w) K) g( d3 c/ Y |