/* called by: entrance ctrl of the object 'track'
. B: u! `# I: I2 H% v1 h*/$ d* ~4 q3 F: ~5 Y6 w
is" {, Q z6 U) O
part, GlobalDistObj, assignLObj:object;row,Lan:integer; w1 Q. m) f1 b$ F- Z. ~8 n7 v0 K3 `
do
* X3 w+ F0 ` K. O+ K% g5 O Lan := rootfolder.Internal.Tools.AOLlanguage;
$ S! Y5 Q! j" I: I) X if current = @.Destination -- else return
' V) H" I' t! N. y4 } then
# s- Q7 [' _ d& f0 G1 }5 } @.Destination := void;- e, r* x( V% O0 f, G H
if @.occupied then
$ }4 l; c8 E3 } part := @.cont;& ^, K) f! ^3 j# g y8 T7 D
@.transpOrder := void;: f0 s$ t8 S! u7 u4 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ D5 |3 E2 W+ H& t1 s: t7 p @,root.eventcontroller.simTime);
y5 k- y/ Z) _5 u, X4 U @.HasOrder := false;
: [1 ^, H: h C j @.DrivingHome := true;5 H4 [9 U. t: x$ H! S* i
rgManager.tryToStartTransOrder;9 E( K% u4 X4 o( _
if @.Destination = void
( T: L( C; \. z- A8 K, m. Y then -- no transport order for vehicle @$ e1 _, ^) v2 |- w3 Q3 ?6 {
@.Destination :=
+ O- z- T9 L* @: p' Z8 t rgManager.nearestFreeStation(@,track.~);& @7 M+ f( P: F+ e
newDirection(@); p- h/ b5 N" s
if @.Destination /= void then1 ]# [. U/ W" D- \/ N' i
@.Destination.NumReservation :=' L# E& e- H4 m& N1 ~; l
@.Destination.NumReservation + 1;
* G! [2 J% X& B end;" r0 s+ `% k u5 A9 K$ ]
@.CurrIcon := "drivingHome";& h# j v4 n7 {8 ^8 F
@.DrivingHome := true;
& F: m+ M I* Q, y/ R( S2 g end;
2 L- ]; ~2 _6 ]% p% p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: N9 k1 t& e7 N B! P part := @.transpOrder;- |) k5 b& B" }& H4 g
part.move(@);-- load part
$ j: h0 U9 L- i5 E) g! d2 e' \ @.CurrIcon := "load";3 i4 z- Z* E% l5 L5 M8 ]
GlobalDistObj := part.globDestination;+ Q7 T& e! T# }. i* x% N! W
assignLObj := rgmanager.rgAssignL; @- p: D) u5 i$ z9 F1 {: A
row := assignLObj.getRowNo(GlobalDistObj);
$ y$ j8 ]8 q( B. w9 R9 N if Row = -1 then -- since 709 F" d1 f/ R, V& S# m' h7 B
if lan=1 then
) l/ }* S! C1 f+ |4 g: u/ q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ F& v0 Z8 d% Y2 X+ \
to_str("in der Andockstation: \"",?.~.name,"\""));
5 C8 C+ P* i3 J& C r/ Q; V E8 j else P4 c: }% B1 L" }8 s9 Z& k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. z0 r+ O: `& Z- J8 Z1 v! _; }1 h to_str("in docking station: \"",?.~.name,"\""));
1 K5 N+ a$ G, M8 Q0 F end;
! n/ u" ]0 {. M: {7 r, _0 _, T: f else: P8 } l' z: A7 M& h
@.Destination := assignLObj[1,row];9 w6 [& P' j8 K7 _" _/ r& `
end; 2 t1 k u& N8 o0 ^2 Z6 g; Z- m/ ~) N
newDirection(@);
. a: E3 w: l" j. c @.HasOrder := true;
! W. n f8 `) G& s l end;& S s6 V/ T7 C$ Z- e4 }
end;
$ m. E/ V$ J4 O& C! uend; -- of the method/ O+ L& X2 t" j& p
|