/* called by: entrance ctrl of the object 'track'6 b9 |, U0 X( }! l% O" F& [* L
*/; i) H* z/ c) L9 V% {: X; q
is3 c+ X. p. f1 Q( V. ?0 X8 s; v) s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! g+ h+ p" {7 y1 e4 ldo0 U" _; z3 S! u7 N- ]
Lan := rootfolder.Internal.Tools.AOLlanguage;" ]! d/ ^! ^/ r; L v6 A k" {; m" _
if current = @.Destination -- else return
2 H# \0 }3 @* t' a' ? then
E! W+ B( W. o% O @.Destination := void; Z/ n- S& M0 [% o z/ G8 U5 y
if @.occupied then. C( C0 _: J; r) k% R; w* ]4 d
part := @.cont;
# i; x* A, d0 }+ B2 k9 O. ]# d @.transpOrder := void;
+ o; |: F4 L: q* v6 j9 A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* f# `9 u6 R0 l$ x
@,root.eventcontroller.simTime);
- O e7 J% K, b" o$ x8 I+ W7 a @.HasOrder := false;& g0 o1 y7 l% w0 U( ~
@.DrivingHome := true;
& c. P1 n, k' `: E$ { rgManager.tryToStartTransOrder;
1 k K; }* H. l9 Z1 I. Q if @.Destination = void3 O, W5 ]5 e7 k- V8 E# g
then -- no transport order for vehicle @
0 B6 X R- z* N; X; I) W4 N @.Destination :=2 u# M0 ^6 y) R
rgManager.nearestFreeStation(@,track.~);
8 ~9 L! U+ l# g c/ t U- L, J newDirection(@);
3 k+ d& t5 i2 L3 R, Q2 C if @.Destination /= void then
. M- D3 w" c7 H9 T' l7 u2 r9 B1 @ @.Destination.NumReservation :=
) y0 a( `0 M- B4 ? @.Destination.NumReservation + 1;
6 z6 n" f) S7 v' d9 v) ?9 N2 W& S5 y end;2 I) f9 [' ~! K- {
@.CurrIcon := "drivingHome";! L$ q0 L/ {, h9 T" M3 x
@.DrivingHome := true;2 a$ V. Y, m6 f* u
end;' z( @, m) ^8 ~* ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 l+ [ J- o# n2 s2 E5 _ part := @.transpOrder;
, ~. m( _# j4 n$ p4 f4 e part.move(@);-- load part- v g$ |7 ^2 h* z# ` f: D( D9 y
@.CurrIcon := "load";
9 e/ b' b" C3 S( u2 L' C. T$ U GlobalDistObj := part.globDestination;
9 o) V/ a7 w' l. V3 r assignLObj := rgmanager.rgAssignL;
' ~8 |+ ~# F% B8 F2 p2 \ row := assignLObj.getRowNo(GlobalDistObj);0 f# [0 s6 q. @- L. F0 c8 F g6 O
if Row = -1 then -- since 70
. T* Z2 D- M8 z( B if lan=1 then
, e# a7 I7 y; m& i! {! O9 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 G% Q) R: U7 a2 }" C, d$ A to_str("in der Andockstation: \"",?.~.name,"\""));
+ Z4 B' l4 m* o; Q' Z- m else2 h$ b0 Q U7 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# H: z; o$ u5 n: @8 t, d
to_str("in docking station: \"",?.~.name,"\""));
! j( w9 c; J" F3 U4 t2 M end;6 D8 B9 c) T0 f% q/ J; s
else
8 d* V, E7 H) q7 j: a, [: L @.Destination := assignLObj[1,row];+ g2 z; f1 ^4 } o
end; : d- k/ D/ k5 k" j6 X
newDirection(@);
" f4 P( w" k1 f& m @.HasOrder := true;
8 e0 I2 z8 t7 ~4 [8 R6 i5 C end;
: v1 n- x+ C+ `5 u3 g end;
$ ^1 v5 B" a2 K- V: hend; -- of the method
, I+ ~7 E3 w1 ^$ m |