/* called by: entrance ctrl of the object 'track'
& @+ S7 t$ F# E9 {2 _* u& P*/3 ^! X$ i L" k* Y, h. S
is
; d, V6 N! S, q9 b0 b; L3 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 P+ n/ W+ K% |4 ?do
" b& M: H/ {, o d* U Lan := rootfolder.Internal.Tools.AOLlanguage;
" n: l% g7 t3 I; d* C1 X2 M if current = @.Destination -- else return; o+ N% c% W" D, ~$ r
then# M8 o# N1 W+ v5 b
@.Destination := void;- Y! D8 C+ Q* s
if @.occupied then
5 L, y! U5 d/ ~ part := @.cont;9 V: W4 O6 n- Z1 W6 u
@.transpOrder := void;1 Q1 w( @9 b; A% v& t# d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 `# A7 c9 z2 w- b6 z: H& l9 W! X0 J
@,root.eventcontroller.simTime);
3 _# i+ H$ U* g1 c8 N( e5 ? @.HasOrder := false;0 H7 Y/ Q, Q; T5 o) E
@.DrivingHome := true;
5 E4 c8 m9 E7 Y. T0 f0 A6 n6 S rgManager.tryToStartTransOrder;/ l7 L$ N+ N6 _/ `4 t g8 p: C
if @.Destination = void- b; p1 p" f; ?' _
then -- no transport order for vehicle @3 L& o( }, _; I e9 g
@.Destination := k: p# t! ~3 D0 M6 l* a% \
rgManager.nearestFreeStation(@,track.~);
" S# v) b5 c; n+ K! w1 F7 _8 w6 H newDirection(@); 3 v8 z; `+ {) H; A# c, D
if @.Destination /= void then
/ m8 _& S: f8 ]9 o! d0 F1 } _ @.Destination.NumReservation :=
7 Y# O+ Y" N; d) A0 f+ t @.Destination.NumReservation + 1;5 i$ H1 A# V! s& N. L' _
end;' ]( A! n v& D' o
@.CurrIcon := "drivingHome";
& l, a, H H3 D1 B @.DrivingHome := true;
6 |' z+ g% v( W/ a6 U end;
- F- q3 K( y) W" i% R else -- the vehicle @ is empty, both vehicle and part are in the same dock station" h0 \6 b1 k( ]# r. f
part := @.transpOrder;, }) Z9 y) i5 \8 N+ W5 _0 k
part.move(@);-- load part5 t' \! |* c# [' }
@.CurrIcon := "load";
( P4 k U1 f s# D GlobalDistObj := part.globDestination;7 d" T( {2 q6 ^- j
assignLObj := rgmanager.rgAssignL;
5 B P- N+ a) D" o) O9 u row := assignLObj.getRowNo(GlobalDistObj);
9 \6 M: `5 r* K) o# i. d; m if Row = -1 then -- since 70
% b) j0 w" r2 g) K6 _' V. ^ if lan=1 then
! i* x' n$ ^) N9 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# } m5 G0 ~) c; m3 o# L to_str("in der Andockstation: \"",?.~.name,"\""));; y9 I% r7 q1 Q1 R' ^3 ~& X I$ Y
else
4 Y' y$ X3 @% f4 g$ e* `9 ~; ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 m! I5 n3 ^7 q
to_str("in docking station: \"",?.~.name,"\"")); ' F, L X7 n3 ~8 c; t; A
end;% L" v. O, ^: M. X* ~8 H
else/ V2 p" Z) j& y- p1 v/ I
@.Destination := assignLObj[1,row];
, f7 |7 ^ B9 `& c2 P end;
?% v5 K0 V6 \# N1 f newDirection(@);7 b' n3 H! K% y
@.HasOrder := true;
: N$ {3 Q2 M5 g1 J! @' N: J$ [/ w+ e end;8 f6 f/ F3 g4 {# i, a
end;6 A# k; B9 ~. y; M" ]# |) p0 b
end; -- of the method
1 \+ v1 @- ^2 |/ H' W |