/* called by: entrance ctrl of the object 'track'
7 w ~/ J; A' G/ l*/
: \+ b% K2 W5 ~8 ~is$ s8 P: u1 z; G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 D1 J3 N; a' [, M
do
1 A/ ^8 f D ~+ e Lan := rootfolder.Internal.Tools.AOLlanguage;
. M" @; Z8 O$ b5 j+ ]4 `: A if current = @.Destination -- else return
& Z2 o- G* X# r e* Z" [7 P then5 O; y2 M4 i9 G9 }; G
@.Destination := void;
?5 s" T# B5 j* g9 [ if @.occupied then* l. g) I' Q4 f1 g
part := @.cont;
$ a! B# l; {" c7 C7 y @.transpOrder := void;, k: v6 M2 J- _% f6 Z* Y% H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& }# F' a% n2 ^5 F+ N3 B- T
@,root.eventcontroller.simTime);
4 h7 J, s9 Q1 h" ^" _2 a$ I @.HasOrder := false;
0 O- _) F2 `3 j2 N @.DrivingHome := true;
9 P2 X; w: n( l. H. ^( O; e rgManager.tryToStartTransOrder;' p& d3 ~# N- X: U" u
if @.Destination = void
3 g0 {. o2 @ V* w# g/ i then -- no transport order for vehicle @
' t& P- V2 I9 G' O2 T @.Destination :=
9 A6 x( c) }; S" w- ~ rgManager.nearestFreeStation(@,track.~);
& D: Y6 M/ G3 l/ R* c8 L8 f2 {% {, _ newDirection(@);
' ~+ f8 M6 U! u3 d. A) y6 j; a% S if @.Destination /= void then
, S9 b7 A9 Y; h$ c- H# h @.Destination.NumReservation :=4 v6 N4 _' Y: u
@.Destination.NumReservation + 1;; N; d- K2 Z0 O1 `5 g) D
end;
2 @9 P _, {# d% G- h @.CurrIcon := "drivingHome";+ z8 T( p: B& d) z3 K
@.DrivingHome := true;
' R8 |, U9 B5 d( K/ k: C end;
& a, l" ]9 R2 ~6 P. N; { else -- the vehicle @ is empty, both vehicle and part are in the same dock station. R/ V3 |' V9 L, N
part := @.transpOrder;0 f" V3 B5 L$ x( X
part.move(@);-- load part1 [% a7 T ^+ j1 q9 n2 O- E# B
@.CurrIcon := "load";9 W3 D5 ?1 f" G& D
GlobalDistObj := part.globDestination;+ u$ z! c' ?0 c& |
assignLObj := rgmanager.rgAssignL;3 ~4 n- p. M* S @3 ~
row := assignLObj.getRowNo(GlobalDistObj);
' I" N' i- Q+ w if Row = -1 then -- since 70
3 x' u, E* D# ~! v! B if lan=1 then
: P! q' p+ Y+ ~0 J- Q" x! | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 W3 I' v4 ~% z0 G4 o2 ?
to_str("in der Andockstation: \"",?.~.name,"\""));
" m- `3 g; c) p$ t" f" w# o else! K" F' `. x. F" B4 C4 N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 o3 |% \! P* k2 [ to_str("in docking station: \"",?.~.name,"\"")); - {6 p% {7 t6 V, [5 \/ B$ i! Y
end;! e _; P5 e7 y# d; L$ }( }9 ~8 B
else
+ J6 Z* G) x* e' P! o; r- ~2 X @.Destination := assignLObj[1,row];5 q+ r8 x9 }. W, o: z* u0 _! X' M
end;
/ w, q( W7 \4 A+ N( \; g newDirection(@);
. T+ [* H6 n7 [ @.HasOrder := true;# D: Z+ g6 |5 g
end;
/ ^8 s/ a4 W4 B% m; p S$ Q end;
' H7 P" m G: oend; -- of the method4 k+ n! c! ?( O& D. a9 {
|