/* called by: entrance ctrl of the object 'track'
; | J8 l# I9 J* [+ x# I5 R*/
. a7 k4 l/ }: E# @7 ~0 Cis" N8 f4 |3 m2 L( A; t; ]8 j9 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ J9 D h. p7 M# o- m, l
do) u ~2 N/ Y9 y" |" u: B
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 p3 ]5 M/ j: Z9 v {$ m4 m9 G if current = @.Destination -- else return- \, q/ n" o- j" [* [
then2 b! H+ G+ x! n* \+ h/ N- A6 A a
@.Destination := void;
8 @* i8 X' J1 a0 i7 ? C if @.occupied then
9 R0 m8 ^' ?( n2 o7 _% C part := @.cont;
8 U, m) ^1 t5 P2 ` @.transpOrder := void;
4 }& U. _7 z! r4 V- S+ s, W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* P/ d7 s2 v9 _% N
@,root.eventcontroller.simTime);: L, S5 w4 D% R R8 S
@.HasOrder := false;1 M8 ]# T/ `0 l" k, S' i% F
@.DrivingHome := true;
# W1 t# F3 [8 W: ^8 s rgManager.tryToStartTransOrder;
0 P% W3 ^% V! B5 M1 g if @.Destination = void
! J5 T, p# \, z' W then -- no transport order for vehicle @6 n+ \* g! L) ^: u! S
@.Destination :=" ^* a n& ^8 d; t& s
rgManager.nearestFreeStation(@,track.~);
1 a2 R+ _. X* L newDirection(@); , R. w" `4 z5 M- o6 `- {# {
if @.Destination /= void then+ a* Y. g {* Q: _* W9 i$ T' `
@.Destination.NumReservation :=3 y0 s- E+ m' q; O+ |5 S
@.Destination.NumReservation + 1;
+ Z( h8 P9 n6 w4 L; G# |3 y3 R end;7 Y/ G% N. O; w% \% T6 ^
@.CurrIcon := "drivingHome";( U: _7 K) \3 I& E
@.DrivingHome := true;# j( s7 a+ C {: S
end;1 G, }5 q/ E. F' `( A6 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 {& C% v& _1 I' O$ c; ]
part := @.transpOrder;
- }8 l; c$ Q0 c part.move(@);-- load part( |; J; {" m4 {
@.CurrIcon := "load";4 L% s0 q' {( Q& \9 @3 [/ R2 @3 [
GlobalDistObj := part.globDestination;
; W) s0 W0 c. [, n( L assignLObj := rgmanager.rgAssignL;3 l: w$ l8 T1 O8 H, n+ H* r
row := assignLObj.getRowNo(GlobalDistObj);( X$ p" P4 o. q4 p
if Row = -1 then -- since 70 d$ {: Y* o$ e: [* @
if lan=1 then
x& w3 Q2 D' b, p; s T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( v' M. @) @% Z5 x' o9 E to_str("in der Andockstation: \"",?.~.name,"\""));
8 _! m, S- A& r0 Y9 n% j else
2 G& y" Y6 F) \2 ~7 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ y0 G3 G$ r% o! H( e* m( }7 x to_str("in docking station: \"",?.~.name,"\"")); s* \' D- D7 F0 m" e
end;
) h3 ~6 i4 X' o) d6 _ else
$ j- o- s* P; ?+ R @.Destination := assignLObj[1,row];
8 A E; m. ^- I! e) r end; 9 T: |9 b: g' a+ G) r& o
newDirection(@);
3 W x6 n. S: k* r& n: @, `9 a @.HasOrder := true;
& c; i3 Z/ ^5 K end;7 i8 T' u" z5 `- w0 `4 H
end;. k2 y2 F$ M; q
end; -- of the method
% }+ F# m5 t$ V7 c$ t& O, }0 @5 D |