/* called by: entrance ctrl of the object 'track'# V, y: g& `$ o" ~ s0 y
*/- d( p5 `! c, Z# I( p: u* M: t
is
1 O ~0 D _5 n! P& D& ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ m( |, D& X: n: F+ c& H8 G
do/ Z, g A: J. B1 m
Lan := rootfolder.Internal.Tools.AOLlanguage;2 h/ L3 n1 y& s% z* k$ F$ D
if current = @.Destination -- else return
) K2 u! [) D" M+ r( h then; G9 I0 X/ W$ B6 @% i
@.Destination := void;( |) Q/ g, O* |7 x8 K+ H+ c; D
if @.occupied then: i5 a6 u" w4 d( i5 q
part := @.cont;
: }" H. w: L; l4 X$ v4 o. p9 [ @.transpOrder := void;5 z r# I$ T- E5 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," ?1 d/ {$ d ]8 H" j. ]% {
@,root.eventcontroller.simTime);) p; S6 V. p7 F! q& Q
@.HasOrder := false;
6 h2 P; A, v0 L; e8 _5 O6 W% h) h7 y @.DrivingHome := true;. w' @' ?7 v9 ~1 m" F. E% h
rgManager.tryToStartTransOrder;! T0 ^- y) G. T. L- z
if @.Destination = void) ^4 h, c- S3 s: Z5 n
then -- no transport order for vehicle @
; t9 o; R3 u; c% Q @.Destination := \* P# d9 ]! T, k, I) y$ z
rgManager.nearestFreeStation(@,track.~);1 {1 j; |8 ~# L7 z
newDirection(@); . W7 b8 A# p+ ?+ w' A
if @.Destination /= void then4 Z! s; ? N) C( `% \
@.Destination.NumReservation :=
# \* F8 [. r5 I/ C4 ~/ P" u. e) b @.Destination.NumReservation + 1;
! D: X; q9 ^$ K; o end;5 l P, o; M" I9 W( [, ~3 O4 S
@.CurrIcon := "drivingHome";- H" I( g. S" \0 S* U0 b/ S
@.DrivingHome := true;/ H" }' c$ V: d
end;
& C. I/ z* Z) {' W) ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 s T8 X. O! Y) |, Y
part := @.transpOrder;6 S1 C: m2 @# z7 h% h3 }+ G
part.move(@);-- load part
$ t" s+ n! I2 H/ F$ y3 t @.CurrIcon := "load";
0 V4 p9 k0 C! |; Y1 y- U GlobalDistObj := part.globDestination;1 x: @! N# F% |9 t' ]) M+ \8 f
assignLObj := rgmanager.rgAssignL;, U, K6 j% D$ a$ V
row := assignLObj.getRowNo(GlobalDistObj);
* I: F9 F7 i! g4 J) Z, \ if Row = -1 then -- since 70% Q' J9 L2 \( Q- G, a: ~$ d4 u; V
if lan=1 then6 j: {! S" S. h' D0 S7 d* b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 G/ t2 f% @' ?/ I9 j) \, y
to_str("in der Andockstation: \"",?.~.name,"\""));" q" Z4 [1 F; ]
else5 m! s1 Y/ d4 x6 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), l. Z# V# ~6 C- Y7 I& J
to_str("in docking station: \"",?.~.name,"\""));
* u* F+ [+ n$ r( f end;
& Z3 p7 }& i$ F! s& u0 x( t else
9 U6 ? b+ n% p4 s7 {2 E* S @.Destination := assignLObj[1,row];8 F8 V+ T( G, P1 j- [3 |
end; ; N& c9 ^+ F7 @3 j
newDirection(@);
6 _5 Z! F, I" i; |9 m9 _ @.HasOrder := true;
$ G( L" H8 q: b' H* q0 e* b end;, s, H% S, z& G6 m& V5 k
end;; w6 Z1 Q1 L& Y" ?; G. l6 C$ j
end; -- of the method
, C+ ], o! C% L- n- C3 W/ J/ t |