/* called by: entrance ctrl of the object 'track'/ o* T& i" S2 J$ c2 P, H* e
*/
9 |, E- c3 v- |7 o' {1 @is
; `# Y) |! K! o- L% z part, GlobalDistObj, assignLObj:object;row,Lan:integer;* @+ Q8 ^; a8 h
do
, ]+ B7 m2 R3 s- q! H$ b8 ^ Lan := rootfolder.Internal.Tools.AOLlanguage;* E4 ]: k+ [! S: F8 z5 J$ f7 ^ A
if current = @.Destination -- else return9 L+ R" T; T: ^; r- r
then
+ x0 L4 }4 p/ a9 a3 w/ w4 q @.Destination := void;
7 W9 D9 w3 B# d, U if @.occupied then( a' w) ?+ w( l& k
part := @.cont;
5 q5 Q: q [; z7 B e: q @.transpOrder := void;
. b2 P8 ^& z# X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: T! ~0 d0 _) d( d @,root.eventcontroller.simTime);% g9 D! i2 `$ o& @: {) A
@.HasOrder := false;
: E6 {' J+ ]+ a/ O @.DrivingHome := true;; C/ I- g! U4 o% L
rgManager.tryToStartTransOrder;
$ ]/ Z3 @9 B$ Z0 ]4 u. l if @.Destination = void3 n7 o" s2 z& R* {% J9 }& i
then -- no transport order for vehicle @7 C7 F# l" j& j# C& [
@.Destination :=
7 @9 U4 H+ ^7 V" i' F rgManager.nearestFreeStation(@,track.~);
7 b* w9 L& B" T' N newDirection(@);
7 r/ N* u( Z x) Y if @.Destination /= void then
+ u2 R$ ~4 b$ E @.Destination.NumReservation :=: n, Q% Q8 |6 u$ u8 s Q9 i. B
@.Destination.NumReservation + 1;
9 x" J- N# t( `$ V* q; [4 a end;" L7 ^9 T, p# D! s
@.CurrIcon := "drivingHome";
: W+ J0 A2 b) _% n/ @0 D @.DrivingHome := true;4 H6 I, G t& J% n/ r9 t$ S: x* N) M
end;4 d, x: o3 ~+ L1 ?! O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' T: |" Y, a3 N2 { part := @.transpOrder;2 S8 w7 l6 a s/ Q3 a3 N6 d
part.move(@);-- load part% B" {4 A$ u7 E
@.CurrIcon := "load";4 ], [0 [! p9 r r, Z u
GlobalDistObj := part.globDestination;
, W" q9 d, d: H' q assignLObj := rgmanager.rgAssignL;2 }5 V7 J3 u% f7 ]5 c# f+ ~4 R
row := assignLObj.getRowNo(GlobalDistObj);2 q1 u4 i+ }2 D% Z
if Row = -1 then -- since 701 ^# N1 s( S4 b6 q* w' }
if lan=1 then
9 |7 p6 m2 {0 B9 E4 t( p6 h# X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 J+ X, U; w8 @ to_str("in der Andockstation: \"",?.~.name,"\""));8 N- v" w0 J0 q# w/ A; X/ {
else p& m# x P) k+ I7 @8 e( x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ M4 E' [( Y% H! Z; N to_str("in docking station: \"",?.~.name,"\""));
1 U( [6 Z; {6 O2 ^4 a end;
- |; q* t% v3 @! j: C" e4 ` else" C' x& k7 o! {& } f- C
@.Destination := assignLObj[1,row];
5 C7 J- D1 j4 w- f0 m end;
0 T' l1 ]2 L* | x/ F newDirection(@);
Q# r; i+ C1 q* x, P @.HasOrder := true; C) J' o8 ^6 P7 r7 |7 B/ l
end;9 [7 [* \% p' y- \8 P/ D
end;
$ ?9 ]9 ]: K: P5 o5 Z) Eend; -- of the method
. `, ?& Q9 g7 K/ \6 b |