/* called by: entrance ctrl of the object 'track'
9 p0 u; Y/ F# p% s( G$ q2 j*/
& a: z2 ?' M0 m( p- F9 Nis1 b: X: l. L$ U+ P% ^6 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ Y) ?5 T" m5 I, k2 ]
do
; W2 w' ?4 T! S, @' \- z+ f: r Lan := rootfolder.Internal.Tools.AOLlanguage;- C+ \2 W w/ q/ N2 ]/ B
if current = @.Destination -- else return
0 L; Z! T$ z* g8 n+ K then' n X1 i/ E. M/ \+ U/ m4 @
@.Destination := void;, {3 F) m; @2 {3 X4 G) {6 `8 }
if @.occupied then& p/ y7 t8 q( x4 b0 t5 r2 @$ q
part := @.cont;
) N! }8 a% N% B1 W8 t @.transpOrder := void; i5 c, G" g ]5 u- v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" h! R! _. a2 r: A% o! `6 p- J @,root.eventcontroller.simTime);
9 G' S0 i- C5 x: R1 i4 p @.HasOrder := false;
9 B; H' c3 I9 A$ P @.DrivingHome := true;
* h- |& C8 Z1 A( ^! P5 s2 L! U rgManager.tryToStartTransOrder;. z2 d) s2 |' U# y e1 S, h' |
if @.Destination = void& d n" N; W' p7 Z& P3 l1 }: ]
then -- no transport order for vehicle @
2 g$ O7 W- y O( c e+ {, D- W5 i @.Destination :=
* G3 ^$ H3 F! g+ Z1 l6 }1 _9 g& l4 p rgManager.nearestFreeStation(@,track.~);
- J3 R2 J3 z& D. N7 x7 o1 W newDirection(@); ) }* M: s4 I* p3 R. x2 v' S
if @.Destination /= void then
6 `5 Z; I0 S" |. H* H! o @.Destination.NumReservation :=
; s! b$ n9 \+ v a: r0 c+ g( g @.Destination.NumReservation + 1;
% l. f% z# p! [ ^ end;* p4 q. ] O- }2 c! d
@.CurrIcon := "drivingHome";
& y$ @7 T+ {+ ?% }* @7 U @.DrivingHome := true;
8 d6 I- M7 X3 ?$ W2 Y0 k% \+ a& b1 O' I( r end;
' \, Y/ v4 c# J else -- the vehicle @ is empty, both vehicle and part are in the same dock station% @' f8 F+ d# z3 d, M3 l
part := @.transpOrder;
+ C& a+ O5 O% I4 H part.move(@);-- load part
( ~( r3 s) H+ N3 m @.CurrIcon := "load";3 Z. O0 f2 r l' i. X
GlobalDistObj := part.globDestination;
+ B% H) j6 H8 A% k8 G5 n1 T+ m assignLObj := rgmanager.rgAssignL;+ z/ z4 U$ o6 i( e
row := assignLObj.getRowNo(GlobalDistObj);
/ ~/ a6 h# R) h3 M8 ] if Row = -1 then -- since 70
9 N3 ^% Y- ^5 F# j if lan=1 then
. Q- L+ D' c* B8 J: z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: x! r, E& K! i
to_str("in der Andockstation: \"",?.~.name,"\""));2 s$ E0 T8 F3 L
else9 J6 {' l3 H- l: U/ |9 f4 j( e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 X8 m8 H2 }4 J
to_str("in docking station: \"",?.~.name,"\""));
% W F& i( @* E end;
+ t2 q" L F& j' R- [* b else
r5 i) |3 X' R7 T$ V9 U- E. r ^$ C @.Destination := assignLObj[1,row];
& I$ z1 }+ W) `& u end;
. j3 q0 a! q8 k8 e$ c$ ]2 I6 j newDirection(@);2 R% J, t* F4 n% _+ x/ P* D
@.HasOrder := true;
9 v# X5 W; @ _! M end;$ U j) G: M; x3 K% o
end;
4 s# _6 e$ H) u0 l t, Uend; -- of the method; Y3 Z f$ O' a3 ^
|