/* called by: entrance ctrl of the object 'track'& D5 T) a7 ]- ~
*/
- _. ~( g6 ^2 {( Nis
; R8 R: ?# r; r! \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;, i4 a2 x+ m8 W& V5 ^+ U
do
4 Y) f' F' W5 C' M- ?2 R% B Lan := rootfolder.Internal.Tools.AOLlanguage;
/ P% A: h5 L' ?0 k% _8 F: F if current = @.Destination -- else return9 E2 X& Q+ }+ w- x* @& s# h" A
then
0 w6 d3 A+ S, f+ d. E; H n# Y7 ~ @.Destination := void;
, g3 l/ x2 l' E2 B; S0 O1 S if @.occupied then
5 D9 C, J9 W; ^5 W part := @.cont;
2 W0 n* s% \& k @.transpOrder := void;5 t7 k5 d6 w0 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( z f1 v+ ~6 ] E) ~2 e- s; P1 \% T @,root.eventcontroller.simTime);
+ i, x! Q# \4 A6 \$ U% I% E @.HasOrder := false;
`) j: A8 c# N$ Z& u y @.DrivingHome := true;+ Y: _1 k/ m$ L( \0 L
rgManager.tryToStartTransOrder;
3 A9 _5 u3 N3 ]$ n if @.Destination = void& D0 R9 A7 D. S9 `$ }7 S
then -- no transport order for vehicle @
6 G: Q$ I# v; h @.Destination :=
5 j' A5 g5 G" [* Z9 b4 ~ rgManager.nearestFreeStation(@,track.~);; b% T2 w T5 v. P
newDirection(@);
( x8 M; z4 R0 s% ~ if @.Destination /= void then7 B8 d- U) |% H1 Y0 V) m" t
@.Destination.NumReservation :=
& |; f/ V$ P* Q. R. S @.Destination.NumReservation + 1;5 X& B% F$ G+ H( M7 q/ h9 \
end;0 h" f1 m, J1 C: ]/ z
@.CurrIcon := "drivingHome";2 A k' _ D& |1 I* d+ i* [
@.DrivingHome := true;
& q6 i3 \0 j- c end;
* Y, f0 z4 j0 |# h; W9 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station* a3 e6 b& H7 ^+ V5 p
part := @.transpOrder;7 T6 u+ I' o, ~1 \4 g% [8 M, O' a
part.move(@);-- load part
?; M% r& z4 c9 N9 j$ F% M/ r8 \. P3 H @.CurrIcon := "load";5 X/ b2 h/ S' f' V, j* _0 ~9 F( D
GlobalDistObj := part.globDestination;
+ A3 r3 G d, [! [: i } assignLObj := rgmanager.rgAssignL;+ N2 C7 F, [$ m, \& z# F
row := assignLObj.getRowNo(GlobalDistObj);; \# a( ?* B- c5 g
if Row = -1 then -- since 70 c' }7 u1 b* ^4 M# V
if lan=1 then7 ]% r: e- m9 f- W' T$ w! G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& v# a7 i# F# o& K( I" z* M to_str("in der Andockstation: \"",?.~.name,"\""));
! x% @) G% n5 Q: |! a% I else
, Y3 X4 R ^% `; V( {, v* R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 B+ |8 ~+ j. ?3 F0 I! M8 y to_str("in docking station: \"",?.~.name,"\""));
. U1 `4 E9 c: n3 {" M& K+ H2 a end;
* A# m! t4 @6 I else; Z1 N) I8 i2 R# }0 {! P9 K
@.Destination := assignLObj[1,row];
4 y8 W, j: `/ D- X/ _5 G; P) _ end;
3 x7 V3 ^' C+ l: _; p* B- F) r newDirection(@);
) k) i3 G, N3 U3 Q; T5 n+ G @.HasOrder := true;( E# n" U/ V! y$ G2 Y1 ?! p
end;6 S( x! A% D9 Y7 q6 n4 ?
end;
# A3 q+ [& W( x+ G$ H* O& `% cend; -- of the method4 E+ r2 `" X7 w+ | M; ^
|