/* called by: entrance ctrl of the object 'track'
T) y$ C# m$ R- h*/1 T+ F5 D4 f+ O+ V6 f
is3 y) K" F, Q/ n6 q' ~9 J9 O2 t1 b; c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 t2 p) {% {9 e* i0 Y4 O
do; I% H7 x# E2 H# c9 N/ \- ~# v
Lan := rootfolder.Internal.Tools.AOLlanguage;: s7 S I% \6 L3 S- _7 }% P
if current = @.Destination -- else return
1 T; r7 W; ?' n$ b9 _: L! c then2 z# g2 B" M7 v0 G/ t
@.Destination := void;
0 \" C- `" z' a; } if @.occupied then
0 g- s% b* G0 _ N1 ^& D part := @.cont;, L) @/ ?6 p5 q3 t
@.transpOrder := void;" ?+ K9 G' Y" [/ r& S, I3 n4 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 y' g; X! p. H( u5 U
@,root.eventcontroller.simTime);
9 q, p8 N" c& R1 |+ w5 L$ _% p5 q3 P @.HasOrder := false;; y' A# g y. a8 }3 ^6 a6 c& a& g
@.DrivingHome := true;
8 A; Z$ i+ M( V0 ~ rgManager.tryToStartTransOrder;4 D7 O% {8 L: ~# D+ l+ {
if @.Destination = void' n% v. [9 M& g9 ]* e$ t
then -- no transport order for vehicle @' \. U; x6 `0 U5 O3 L' e
@.Destination :=& T3 ~' O5 J6 w- \8 g* ~& u: L
rgManager.nearestFreeStation(@,track.~);! v8 B7 N! p6 d
newDirection(@); ' V* w. P* @& b7 u! c4 ?
if @.Destination /= void then
! ?6 t" I- {% X @.Destination.NumReservation :=4 j6 r) h8 U9 ^. w3 J
@.Destination.NumReservation + 1;
' @ t4 a4 c) i; y: v9 U& _ end;
8 [, ]: B) X& P @.CurrIcon := "drivingHome";
9 @. _; |* |- I7 f. Q @.DrivingHome := true;9 x) \" g2 k4 F, M9 g3 `8 R
end;( o. H1 @) }! A1 o v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 S8 ^. J$ w L; K! b+ m( b" f
part := @.transpOrder;4 R- f, z) b" z$ \0 c
part.move(@);-- load part9 A4 D- S) v. U8 \+ Y; z1 [
@.CurrIcon := "load";
( i9 Y( G T* ?- _ GlobalDistObj := part.globDestination;# x& o* S! O7 V8 `
assignLObj := rgmanager.rgAssignL;! Y* g/ V. P: b4 O( ^
row := assignLObj.getRowNo(GlobalDistObj);& t! a8 X9 \& K( c
if Row = -1 then -- since 70
0 u5 ]- Y+ Y/ W- Z; U3 E& D if lan=1 then R7 R: K. r6 j3 o/ N$ l2 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. z8 c0 j$ U( ] to_str("in der Andockstation: \"",?.~.name,"\""));
D: p/ _8 |5 ]9 I9 P0 q else2 \) L6 X- H1 d1 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ Y% S! B0 E ] to_str("in docking station: \"",?.~.name,"\""));
3 E5 O% ]2 D# V/ Q8 P- P end;
, h7 {6 k) m. d8 \ else7 F& l* ]7 j8 E& u7 V
@.Destination := assignLObj[1,row];5 d$ K# \) X+ `: p, ^1 S
end;
9 M9 D/ _) n; `; {9 h$ r# ?4 Z8 B newDirection(@);; u( Q0 I4 m F0 A) q( ]
@.HasOrder := true;
' w3 r1 ]5 e; y/ F; C end;
# b4 C* b* T6 R end;+ s) w" J7 j2 v
end; -- of the method
% m( ]- }- @/ q& [! c8 [8 x |