/* called by: entrance ctrl of the object 'track'
2 {/ d. [% G: x: X5 ^*/
) Q( o9 K" a; H7 L/ `+ `, o% yis+ l* S0 \; l( u% } K0 {+ m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 ?; V2 I+ ~7 E2 z6 ~
do7 g7 w) [1 E7 r, _- }, I" q
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ]) d, a F$ J if current = @.Destination -- else return
! N1 o+ c2 Q, `; G+ f! J then
' q& ^: `. ]& G: B ? @.Destination := void;1 Y: q, i: f2 ^9 x' l7 ~, G8 q* `
if @.occupied then: d: ]' t2 @! z1 u
part := @.cont;8 ?; r7 q8 A& t' ]5 a
@.transpOrder := void;+ r: r+ d [( ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 [# M+ u5 ?/ d7 Z0 X% D& k
@,root.eventcontroller.simTime);- t4 o! x" _& o
@.HasOrder := false;9 `* {8 P$ B {8 m: o' @
@.DrivingHome := true;
: k; d4 G8 x/ y' { T2 \ rgManager.tryToStartTransOrder;
8 }3 E9 L3 K$ m3 V% M) A* f if @.Destination = void. E; h8 F3 a) W; Z
then -- no transport order for vehicle @) |% `" O; P/ I. f0 P# |
@.Destination :=& K0 d z3 R% i* c7 }* p8 ~
rgManager.nearestFreeStation(@,track.~);; C1 z* c+ e, x: s! s9 B; U8 X
newDirection(@); 0 G! m/ A% n( n& s. l, D9 P
if @.Destination /= void then6 F& _) t9 L- I) i5 K' c
@.Destination.NumReservation :=
. u# }) |4 C( B! @6 ^! k @.Destination.NumReservation + 1;' G* s5 ?! B/ G0 H3 p& ?
end;
+ ]% M& z0 M0 q- \: e8 r @.CurrIcon := "drivingHome";
( n$ A( a G$ ~- x, s @.DrivingHome := true;' }- k$ e; G7 C8 Z8 ?
end;
# \7 p& Q' r) A* M/ }4 }1 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* y h1 N# B7 s( _ part := @.transpOrder;) k9 K6 [+ w2 D# ]$ l' i$ ^
part.move(@);-- load part: ~' W: z4 \5 G+ ]: Z; p. U: n
@.CurrIcon := "load";
- |) ?- [- N* I1 B- _ GlobalDistObj := part.globDestination;
& `3 B2 p+ c1 Q% h0 b assignLObj := rgmanager.rgAssignL;
H( u9 U% q/ d5 q E row := assignLObj.getRowNo(GlobalDistObj);
2 Q9 M" g2 k: @; \5 ^ `" L, a if Row = -1 then -- since 70
W, u) E2 p, ]9 E k if lan=1 then
' I) Z' q- M. x* ^. D* k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 a' C0 y4 s, o, U! e+ [: H0 M+ y to_str("in der Andockstation: \"",?.~.name,"\""));/ w' g' | Q" `6 u/ E3 P6 P5 h4 b7 C& D- m
else
- V8 q2 M2 w( L5 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
z- f* i2 Q4 u1 p# F$ q to_str("in docking station: \"",?.~.name,"\"")); % z' ]' I2 L; K5 k
end;
. G6 @) }9 j0 W( I1 F else$ L. @; `1 P" f8 y& Z
@.Destination := assignLObj[1,row];
% a1 F- y4 S0 R% T, g) M end; / z0 d; b8 Y( ^8 _3 f' w
newDirection(@);
6 n2 K" W* Y% ~6 b2 e. _ @.HasOrder := true;
8 G- w6 {' f* Q' O1 o end;
" [, x m$ S4 A( i D end; v1 L! g+ e/ k
end; -- of the method
8 Q* @% A$ X1 Z |