/* called by: entrance ctrl of the object 'track'
7 J. F) G0 e1 l. n- r' A; n*/
+ g6 l. L- m2 I" cis
; \) b6 i# }' J+ Z. b9 ~ T; ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" G( w% P( l2 r$ ]" Vdo% V# S0 R7 C A$ f6 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
' H( j1 u/ a( U0 s/ @ if current = @.Destination -- else return; d# k, @$ ]0 G0 }1 m" o6 t
then6 z8 B$ q% p6 H, d
@.Destination := void;
1 z% T, R$ z! {7 ? if @.occupied then+ i5 n2 y- X- C# d
part := @.cont;. C& T `2 x, H/ `; i9 [2 e. v' `
@.transpOrder := void;2 S3 a1 q. [" Z( S8 q( k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 d" P) f/ Q- B% |/ P1 H; L9 t @,root.eventcontroller.simTime);, H5 t0 l' o# o* h) ?, R3 G( V
@.HasOrder := false;4 m+ c8 ^2 l" a" f/ T
@.DrivingHome := true;
. {0 T$ B/ }; z1 n rgManager.tryToStartTransOrder;
" J A9 g! V6 b4 F if @.Destination = void) J0 h# c0 V' I) W+ s# V; H* E1 s
then -- no transport order for vehicle @
$ R) d# B; M, H/ ]& a& H @.Destination :=5 v! r6 ~6 E' z! z) ?, E: g
rgManager.nearestFreeStation(@,track.~);4 R' ?& e6 F" T, Q1 D2 T
newDirection(@); # j Z- |$ ^6 z0 t2 Y
if @.Destination /= void then4 Z/ R! h, U5 R+ R* Z) ^2 @: V2 G
@.Destination.NumReservation :=* i) i/ f& E9 `: K, O
@.Destination.NumReservation + 1;
, b2 Q" M; Q5 F+ n end;) v' e4 x, w* P+ y
@.CurrIcon := "drivingHome";
9 T4 ], [2 f$ b1 j& a3 n" o9 J8 n @.DrivingHome := true;+ H; A' [# B$ U
end;
5 g! v' E+ T a( S$ y- H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 x) }' J8 S, U' J7 X, B4 P& z part := @.transpOrder;- {& M) n" h" V4 Q
part.move(@);-- load part
* B, X; m* d9 H# P% [( g2 I @.CurrIcon := "load";
3 ^5 H- ]% z" z& G GlobalDistObj := part.globDestination;
5 L* ~4 z( `4 o& v1 r; R5 _4 \5 f! R assignLObj := rgmanager.rgAssignL;* f8 D5 [+ B1 N. ]* W7 N
row := assignLObj.getRowNo(GlobalDistObj);9 k) J7 R. W3 Z" i( {. ^* E
if Row = -1 then -- since 70% n* @3 f" J* _/ u k! `; q
if lan=1 then
! ^0 d9 x i( N& m1 b! r" [$ L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' F; k8 ^! r% @5 O* b$ z; l9 r6 P9 `
to_str("in der Andockstation: \"",?.~.name,"\""));/ d+ C+ I/ ~# ^" ~9 z `. _
else% Y& T, | G+ E |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ H& @ @* g! b
to_str("in docking station: \"",?.~.name,"\""));
1 j' @0 V6 X1 W, S. x; t) U6 J" r& N end;
e# ]) P' m; r0 W$ f else# W3 l. n! |3 M- G( e8 C. ?
@.Destination := assignLObj[1,row];9 b% l: q; y1 \6 m( R
end;
9 e* L8 D4 R9 M- R v6 M. o newDirection(@);
, M0 D" U2 M+ k. a @.HasOrder := true;6 O+ Q, I1 y! g/ Q6 ^8 ~+ @
end;
1 z' z3 ], y. s% I! t9 } end;2 m# j6 Z: e; S
end; -- of the method
/ d x# @. `: F |