/* called by: entrance ctrl of the object 'track'6 P5 d5 l D$ b4 b
*/' G% {- }$ N# ~: D9 [9 P& q
is% v. A# K% A& j* {' x; t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; Z* V" K# E* d) X2 s
do. _/ I3 ^ c8 O$ X. H {' a8 `0 W# z
Lan := rootfolder.Internal.Tools.AOLlanguage;
( J" y8 ~; D. z: [# d if current = @.Destination -- else return
' c! a7 v* f/ B! [ then
# k5 A9 i. M7 j# n% c @.Destination := void;2 d8 s$ v) c4 C$ w C. A% s9 V2 Z
if @.occupied then( Y% e5 Q1 `. X: \, [1 b. R
part := @.cont;
7 Z+ F. q% X8 ^ @.transpOrder := void;
) X* K+ {8 o5 R( f7 S4 F) g# H+ B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, L( R6 C) i; l1 z
@,root.eventcontroller.simTime);
4 M/ S0 M) w2 O! j& @5 d' b, ` @.HasOrder := false;. a% t; j' D0 V4 }: S8 c
@.DrivingHome := true;
7 E, C1 N) Y, V5 y rgManager.tryToStartTransOrder;
+ s" [0 n7 [# n9 N# H2 N if @.Destination = void
5 i5 S) A4 ]- v then -- no transport order for vehicle @7 M+ ?5 H8 ~6 j# k
@.Destination :=
( B3 E- E9 ^4 C, A& { rgManager.nearestFreeStation(@,track.~);) Y; W2 ~+ O1 x! t3 J/ Y
newDirection(@);
+ }- ^( \2 l0 u if @.Destination /= void then
9 X- e- w9 O/ Q @.Destination.NumReservation :=
# m* ?" Q( {7 K0 w$ e4 i& C u H @.Destination.NumReservation + 1;
1 \/ q4 i: Z9 ]0 `8 g end;
1 ~! i/ D- R# E @.CurrIcon := "drivingHome";
$ V3 O% P q/ i/ K0 u& o4 b @.DrivingHome := true;
- `* X" a8 G2 H9 |1 \ s end;, w0 W$ m" m* g# c7 ? W- X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 l! \' y) B p8 ^
part := @.transpOrder;+ u# I+ D* w" l: P3 a
part.move(@);-- load part W8 u7 T4 w8 J: L0 c0 h; ~ w
@.CurrIcon := "load";% c6 B6 e9 k8 Y# ?
GlobalDistObj := part.globDestination;
1 j l A! g) [& ?: g assignLObj := rgmanager.rgAssignL;, o) l; E/ d0 L( T3 E7 z% ~
row := assignLObj.getRowNo(GlobalDistObj);# ^% ^4 X3 G* _( g( E3 H/ X
if Row = -1 then -- since 70
) v7 F# j" [3 L! m! j! } if lan=1 then
$ W# Q7 q ]0 t! P3 D# M' \- u* i) y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( j; t5 Q, w( y& F9 _% K- W J! i
to_str("in der Andockstation: \"",?.~.name,"\""));
, P1 u$ D$ m) X else
9 u; Y u7 X2 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 R- n6 Q7 v3 ^( d. D
to_str("in docking station: \"",?.~.name,"\""));
; I/ L2 d! e6 H9 f! D end;" ?$ |3 T1 [6 ?5 i" F$ L$ [' Y
else
; c: x( g8 r* y8 @- o @.Destination := assignLObj[1,row];
- n+ Q1 ?( O7 V% T3 ^ end;
; k$ K9 z5 {6 _# x( Y1 n newDirection(@);
# h, j' I' G I @.HasOrder := true;
9 _! M) s( G; x: y end;
. p3 Y1 C' P4 g% d end;9 J# r4 S. D0 g5 k# f
end; -- of the method
4 k/ C# j: V: ~ |