/* called by: entrance ctrl of the object 'track'
9 n6 L/ k) y! S# X*/2 s! K3 P) I% x3 n# m
is
, R$ j8 [3 j# O1 Z0 h9 e* ~: O part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 E* K# P: m! o
do+ F7 V; O w0 l! w4 F# o( K: B
Lan := rootfolder.Internal.Tools.AOLlanguage;+ {2 J# ?7 i) p# Q5 c) X
if current = @.Destination -- else return W7 }% {3 } C5 N8 H
then2 L6 e, d5 h( i4 Z9 I* C+ ?6 A5 M
@.Destination := void;
3 k) c! q2 n# }0 Q if @.occupied then4 L& `/ m9 m& j- S, t
part := @.cont;
J- l" l. m; |) W( s @.transpOrder := void;+ c% e! I7 m0 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 \1 N: W* P" {! [$ k/ K
@,root.eventcontroller.simTime);
0 y4 r, O. [# T+ T @.HasOrder := false;1 s1 r9 p, {" V6 m: `5 g( a
@.DrivingHome := true;
% a2 X6 z4 W8 {1 n8 v rgManager.tryToStartTransOrder;
* p( O3 n. l* o# Y! @& s$ w1 R6 m3 l! K if @.Destination = void
' _0 ?" n% G! \" t4 P then -- no transport order for vehicle @
# F, D; ?+ `2 a, K7 g" K @.Destination :=/ Z1 e- N5 j: |! I0 y! e, q5 Y
rgManager.nearestFreeStation(@,track.~);/ a! r0 }! i0 m/ u' j
newDirection(@);
0 e- d9 q# U0 o5 u$ ` if @.Destination /= void then
1 `) y( H8 l0 g( K @.Destination.NumReservation :=
# Q, _/ K Q6 O6 R- P* j2 W @.Destination.NumReservation + 1;
# ~ |' t. y. H C4 p* E end;
; ^+ ^; }. B. T- w4 B @.CurrIcon := "drivingHome";
$ x' G' ]% H, ^# A @.DrivingHome := true;
) u1 j; `- o# t, Q+ k& T. J' m end;
! }' k7 L$ c& j0 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ K" S5 X8 H7 Q8 @
part := @.transpOrder;/ x" R/ V3 }8 c: |
part.move(@);-- load part& f/ U( x! L9 a% I6 V, w% C
@.CurrIcon := "load";
0 ^& \1 J4 r% l, o/ K. _/ U GlobalDistObj := part.globDestination;! E! k4 s& p6 ]" t; i% @/ i1 G7 @
assignLObj := rgmanager.rgAssignL; [, h* b( ?$ [0 C, J; K# C
row := assignLObj.getRowNo(GlobalDistObj);. N" [3 V& o( m9 n- [: [. r* u0 N5 J" |
if Row = -1 then -- since 70
0 S2 z2 L3 _0 s+ e, `% ? if lan=1 then
3 [$ h& _6 @2 x u' B4 H9 Z) h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# d& t1 Z9 W" s0 D8 `+ {
to_str("in der Andockstation: \"",?.~.name,"\""));
; B' g) U, ^7 F else
& Q3 a3 R2 g+ }8 k; m* U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ u4 F& o' P5 K% d+ ]( [ to_str("in docking station: \"",?.~.name,"\""));
7 _& n) p- T. Y4 A$ f end;
3 q# D" F3 P- V0 J) \ else
: H- O9 q2 r$ U/ S( Z, q( l0 O @.Destination := assignLObj[1,row];
# e ~- r6 u- I end; 4 X6 `# _, l/ r1 ?, s0 _" [
newDirection(@);
: e# C8 y/ ^1 N7 E- a9 N- A @.HasOrder := true;
' G/ W$ n4 d( a end;
! H9 I# P2 g& C7 J' J* p4 M end;) N+ W9 {8 o4 p; M5 ]; G5 r
end; -- of the method
- F3 c4 }9 B% O) {' k* {# t% w; _ |