/* called by: entrance ctrl of the object 'track'
- E, l- M* {9 S" P2 f' A8 v*/
/ t3 N6 q D( V( D6 k! d; dis
+ P, D4 @1 l8 Q- G" t7 ]: B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ]$ O: u* U# a/ P1 u5 _# fdo, [2 Q' B: T; r: a4 W
Lan := rootfolder.Internal.Tools.AOLlanguage;3 _4 F" a: H! s0 l: T7 I3 t
if current = @.Destination -- else return3 z' v' W E. \4 r) {
then* ?. W/ I& @0 I1 f& K% C; V+ I
@.Destination := void;. ^7 I' c/ c9 t# ?# B
if @.occupied then
7 i" y3 m6 \! ?; T part := @.cont;
2 z* l8 `( C4 B' o( ?: i/ p @.transpOrder := void; `$ K9 d2 o. h, |8 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% U W: D! X$ U! u! d
@,root.eventcontroller.simTime);
1 J! \) _. D0 w8 ^/ {0 w! U; q @.HasOrder := false;
3 g6 \# L6 N3 W9 [ @.DrivingHome := true;
, t& z; y3 }! {0 y; L' J rgManager.tryToStartTransOrder;9 L5 n' ~( A7 A* ]* l) u# ]) D
if @.Destination = void. c g: b6 Z+ Y4 Z! ^, Q+ @
then -- no transport order for vehicle @
* ~8 O& a9 O' F7 G7 q- { @.Destination :=
- O7 X) q- ~* h+ O2 K& C rgManager.nearestFreeStation(@,track.~);+ R; {/ r( @0 l% v0 H
newDirection(@); ) K0 d0 N8 ]) x# @1 `+ l
if @.Destination /= void then% Q3 x" h' U+ ~# [
@.Destination.NumReservation :=- `5 z7 M6 r% n+ p; k
@.Destination.NumReservation + 1;
1 d* I- y# z2 l p" w8 R5 z( z end;
5 }+ c; k+ a; {& b' d2 K/ ~$ \4 K @.CurrIcon := "drivingHome";/ ?0 n/ N* t9 {! a8 P
@.DrivingHome := true;" |; Z3 b: D, C
end;) W) m7 ^, ^, k5 Y; g q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& ?0 D& e1 z; j- I part := @.transpOrder;- e# j7 D0 G& A5 @
part.move(@);-- load part
5 {0 v; B, N# l$ n4 b @.CurrIcon := "load";! a. @/ _) w% B0 P- P3 x1 Z u
GlobalDistObj := part.globDestination;7 o$ j1 y- h* \9 _0 b' l1 R3 z
assignLObj := rgmanager.rgAssignL;
3 e4 W- z) W2 ?: M4 l; r row := assignLObj.getRowNo(GlobalDistObj);
( N8 [6 e. I. L8 n if Row = -1 then -- since 70
6 V$ ~* o3 [9 _0 ^ if lan=1 then9 C9 p7 u9 T( l" H9 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: \, q) G$ W/ s( A to_str("in der Andockstation: \"",?.~.name,"\""));
8 L$ Y4 v& K& ~ x+ h/ ~1 H/ W else
( s: b0 J' r$ |/ }, ~& q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! t, \! k7 o5 V9 F
to_str("in docking station: \"",?.~.name,"\"")); ! a% @: i( A5 ~. `
end;
* p5 [( V0 U% f, z, Y2 }8 P else5 e& J( l8 i* ?# o' ^: s
@.Destination := assignLObj[1,row];
4 ^! C; B0 U5 }0 c2 E E; U end; 0 p# E7 j( H! r8 |) y4 T2 o3 M
newDirection(@);0 H/ Q0 C1 u. I2 ?" q
@.HasOrder := true;! a( l; O& j# i s
end;# `) A5 T' M6 c$ h9 S
end;
. K0 A4 ?7 R& T$ u$ send; -- of the method# p2 t8 J% f" n9 ~4 i# Q" |
|