/* called by: entrance ctrl of the object 'track' [+ m/ j% ]4 V! k0 G# e
*/
8 h4 p! d7 U& b" O& ?" m( C" `is$ [5 D3 T; ]8 N' f. h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 ?% O$ X/ Q7 W8 K) |4 i" c8 m" @do6 {1 E" N* W8 b l; c
Lan := rootfolder.Internal.Tools.AOLlanguage;; U. g; _; q& m Z
if current = @.Destination -- else return, o7 G$ z6 |) t: U
then
3 Z/ \! n+ k% k @.Destination := void;0 E2 I2 j! H, g/ y
if @.occupied then
! ~3 E! b6 b! s/ p2 P2 V part := @.cont;5 Q$ \+ i& u# u
@.transpOrder := void;! }, d1 y4 @6 l3 \; g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ u" _% O5 z$ |. c" \ @,root.eventcontroller.simTime);, F0 E2 H/ H. k* r/ V
@.HasOrder := false;
$ K$ y4 x& s" C" q9 u) Z4 S @.DrivingHome := true;3 {. l" x7 ^! Q1 o
rgManager.tryToStartTransOrder;
# y! I6 Y; ]9 g2 q. U2 g+ x6 [ if @.Destination = void. V* T6 f# b& b
then -- no transport order for vehicle @2 Q/ b l2 X4 z& E% p% [/ A; q
@.Destination :=
P* ]7 }9 f2 d6 G* ~( s8 ^6 m rgManager.nearestFreeStation(@,track.~);1 H! x: N% B3 m, I4 [, t
newDirection(@); $ X- }4 B8 k' S
if @.Destination /= void then* m1 \8 Q/ h' U H2 @6 _
@.Destination.NumReservation :=) m$ ]( T F) K3 L) x0 O
@.Destination.NumReservation + 1;. {" L/ Y; D6 s4 q
end;1 N% ]! @, ~! C" I0 R
@.CurrIcon := "drivingHome";
* b$ Q2 ?0 u. z& K2 \! o( c @.DrivingHome := true;1 s/ S1 f1 w# Z$ D$ J
end;, l8 g% O) _( [, [ i) F+ ~7 T% O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; N$ ]8 a0 c$ ?- m- s* T8 @4 _ part := @.transpOrder;
- h% y" r4 t2 {* u/ u part.move(@);-- load part
x5 k' X$ o8 j @.CurrIcon := "load";
% v: e+ v, ^! W/ Z GlobalDistObj := part.globDestination;3 w. {3 E* W, N8 Z! O8 d% D4 S
assignLObj := rgmanager.rgAssignL;0 g9 U" r. d( M: d+ T4 I% c+ e7 _
row := assignLObj.getRowNo(GlobalDistObj);" ^5 F, V1 n' c8 p
if Row = -1 then -- since 701 O# L; s3 n; x' G; A6 V) K, j6 E
if lan=1 then
( G# g/ _8 x" V- C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ L5 F3 H) b' D% r" Y
to_str("in der Andockstation: \"",?.~.name,"\""));- j% g8 q: M0 N/ c4 Q0 G9 }9 `
else3 y) v' R5 R2 p' l" j" D% N# I' y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* r. \* y7 @9 y6 O to_str("in docking station: \"",?.~.name,"\""));
& J0 r0 C$ y" r, Q$ O1 A end;
( c+ x1 M Q- `' u; r9 a else& A# v" [4 n! o. ^1 F% x
@.Destination := assignLObj[1,row];
; j* H6 h5 ?/ u2 K& ?) l/ f end;
6 T. r4 L6 g+ _4 U! v: q6 T newDirection(@);( o( a* l9 Q/ O) K* o
@.HasOrder := true;
$ w' u8 d" f* q4 |, W end; f. P2 s( ~- y' _8 I' x
end;
7 g8 D! D \( x3 A( A8 C+ Send; -- of the method
, Z0 D" ~5 q$ I/ u |