/* called by: entrance ctrl of the object 'track'. a% n0 J% m4 K/ ?; B/ E
*/2 ]1 b8 D* A0 x, e5 T ]
is6 L/ N. O7 P- l9 r! L4 I) J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% a6 G$ i d Ndo
# ^1 K L% i9 i9 n6 e0 s; b4 o Lan := rootfolder.Internal.Tools.AOLlanguage;) z% I) i. |$ l! _5 H& Y- ]; k
if current = @.Destination -- else return
+ K( o F# l% T( s" N then4 A, \7 P' z. r* g% J: W1 `# w
@.Destination := void;
: b0 N9 l* @& j/ {/ B if @.occupied then2 Q0 I6 j. T% H/ @6 O* p6 K
part := @.cont;: ^) {& {6 M) R2 O. ]
@.transpOrder := void;) A" ?6 P" }! I" Y7 Q1 x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( {* Q9 O. J3 k @,root.eventcontroller.simTime);6 ~: ?# x: L o; n- C3 c. w
@.HasOrder := false;9 |; c! U! m$ I# M1 e
@.DrivingHome := true;
, W% k7 z; A, Z5 \* ? rgManager.tryToStartTransOrder;2 h0 C8 b% `7 n+ B2 t G
if @.Destination = void+ n9 m% I+ ~( i: w- x
then -- no transport order for vehicle @( e8 X Q1 U3 ^! Z- E4 ^
@.Destination :=
- ~- Z0 O' o H1 e( c/ t- z, c rgManager.nearestFreeStation(@,track.~);
) L$ Q4 ]2 x0 Z$ @ newDirection(@); & M; f! J1 p: J- `7 D" p2 Z
if @.Destination /= void then; c: v6 ?% o+ m" D* _1 W
@.Destination.NumReservation :=' Y$ ]0 C* C% L, m, F
@.Destination.NumReservation + 1;
, r$ u8 v. N- x; Q end;/ G2 ]$ D+ S8 t- u" n
@.CurrIcon := "drivingHome";9 a# W" j) d' {' k8 F
@.DrivingHome := true;+ Z- n3 s0 b2 N* Z
end;
$ w" S2 | b% s5 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 c% r8 i9 A, g part := @.transpOrder;
& U7 \! C) ~, _( `9 b5 J0 J( y part.move(@);-- load part% _/ J6 u, \, R# s3 U7 a9 {. @
@.CurrIcon := "load";" {/ N* p% s4 ?0 Z5 c! R. W
GlobalDistObj := part.globDestination;/ {( W; T8 Y" E. f4 k8 @& a" w: _
assignLObj := rgmanager.rgAssignL;2 V- R! ^' i8 [5 H- Q
row := assignLObj.getRowNo(GlobalDistObj); x6 n0 d) Q7 ]; r% G; i
if Row = -1 then -- since 702 L$ f! h- m% ]3 T2 E7 {' w
if lan=1 then
8 ~8 A. B, m: G. ]8 }. X$ D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& b- E9 t k% t. \ to_str("in der Andockstation: \"",?.~.name,"\""));
/ @- w/ e/ D) m* x6 x9 F else
% Y2 }: P- \$ w3 S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, i2 t) z4 n& L* F: o1 ^ to_str("in docking station: \"",?.~.name,"\""));
. g. ` K1 ?7 g4 U0 p9 U7 H# _+ z3 N% V* | end;' s& k( B8 }" h4 }/ L
else2 n/ ^( R1 M0 }$ v' z
@.Destination := assignLObj[1,row];
* b( J, I: O( r$ p3 w6 e end; 9 }/ Q2 i* Z8 c6 D& g- P
newDirection(@);
3 ^8 ?- _# G2 c& K5 ~, t' t, W @.HasOrder := true;
, z' R2 u, q, d8 ^4 {1 S7 i end;" w+ x1 B. ^, ]8 z
end;. J" ?' G5 ?# U7 F% C
end; -- of the method
9 F" {2 Q+ M, W( b |