/* called by: entrance ctrl of the object 'track'$ {2 m" }) F2 v0 r8 \; P* N2 W
*/* G- q# t, f- M5 R# Q
is1 ?4 j( m: |& A& o) b' c* G4 K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ L0 m- Y0 R; q! K: u, Mdo) z7 j/ B: s8 w' P+ p2 w
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ K( D, B0 I" ~ d if current = @.Destination -- else return/ v; j) W O' ~+ n6 u. w& \
then
2 b" s3 t% k$ _2 H% o @.Destination := void;! k" y% }; v! y- e6 S: H
if @.occupied then
& W% n! l, R! ~, B5 C @* t part := @.cont;8 G/ M8 d( O" i9 ]% c
@.transpOrder := void;
7 Q7 E8 J( c& j) n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# c. ^5 D1 Z, p4 N4 V: n @,root.eventcontroller.simTime);7 K9 k | E# K3 ~. z4 J2 {# Y, i
@.HasOrder := false;. ]5 t% i0 M. B d U4 x
@.DrivingHome := true;
\% H- j% m# \! ^7 L7 V$ w4 F) | rgManager.tryToStartTransOrder;
, K i' q7 o4 _8 H [+ ^ if @.Destination = void9 _" x1 h# W% P9 n3 S* X
then -- no transport order for vehicle @
' g, W: X0 ?" E4 k, o* C @.Destination :=' |) p* N9 L$ l) u- i5 m
rgManager.nearestFreeStation(@,track.~);& e* Z) A: G" ~' s8 r
newDirection(@);
6 V$ f% o- ~3 S1 t" Z if @.Destination /= void then
) f5 t6 V2 r2 O3 g* Z$ ^' C9 V @.Destination.NumReservation :=
! u I* c7 p* X" M @.Destination.NumReservation + 1;
9 }5 w* |9 o1 u end;
/ u7 a1 t( b& T* d: j8 G8 } @.CurrIcon := "drivingHome";
/ Q1 D7 W5 S$ A Q s3 U6 x @.DrivingHome := true;1 i7 F4 M4 ^3 a
end;5 K4 @: @1 F# g) B$ L6 e$ q6 X+ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 o: i/ ^( A. ~4 T6 b part := @.transpOrder;
1 M0 D, O% s) y! E part.move(@);-- load part8 g% Q3 j m$ ]
@.CurrIcon := "load";5 o- h$ X3 _- g+ e% H0 k
GlobalDistObj := part.globDestination;# v8 U, x* X1 T% B3 [
assignLObj := rgmanager.rgAssignL;
6 z8 P: a/ J0 @2 b: Y row := assignLObj.getRowNo(GlobalDistObj);
. [) n( [4 K- [0 C; }/ B# C! | if Row = -1 then -- since 70. }! n e% _. i6 U T3 r
if lan=1 then
& j4 A3 U9 u" h3 V/ y& X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# y8 N: S9 J% o" A' v
to_str("in der Andockstation: \"",?.~.name,"\""));" j, e. C6 t, r# t7 }+ l+ L; z
else5 A. ~8 W) o% u- s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: ` x6 `+ L/ W1 A; Z' J( [! ?& F( w to_str("in docking station: \"",?.~.name,"\"")); ! o1 V! P+ f2 R8 P. _. n
end;/ y) `8 @- \" N1 o+ ^( W5 g; R v
else
: \/ M' A8 ?' y V @.Destination := assignLObj[1,row];! T" D. K7 I( _& C. U- [7 s! a
end;
; z) f! e4 r" v4 l% B4 U newDirection(@);4 Z+ Q4 Q3 R* H( D' x) ?
@.HasOrder := true;
0 T5 z" L0 `8 p$ T3 l }6 L end;& o9 D# n6 q& C; p* w$ t3 M
end;
0 Q$ H C# r2 ^* Bend; -- of the method
( i M0 d+ S4 X# T |