/* called by: entrance ctrl of the object 'track'
: G7 H& \7 Q, d/ m7 M$ ?, A*/
4 E5 r- n8 K3 r+ y3 ]' [* Ois. K9 |1 G3 A4 M- |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% ]: N0 x2 _# y" ?: v: A
do" E; q& V+ b5 B2 h
Lan := rootfolder.Internal.Tools.AOLlanguage;+ J/ X$ v0 @; H$ t
if current = @.Destination -- else return( h8 D' A2 g" V! Y. N: I
then
/ D: x2 |( L" ^( M @.Destination := void;1 P0 S$ @: P+ A% U8 k9 B
if @.occupied then3 n5 z3 `* a9 B
part := @.cont;
& z2 Q3 ^6 C% F7 E" x- y% _ @.transpOrder := void;
1 w0 W- U f) G" n+ I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 F; Z1 v" i- F4 k) p: E e9 f
@,root.eventcontroller.simTime);, v$ \, e; \% b3 u7 [# ?7 Y$ Y
@.HasOrder := false;
) ^6 `4 h- n# [$ T4 J @.DrivingHome := true;
3 o8 J1 |( s4 O6 b rgManager.tryToStartTransOrder;
7 ~1 M: f6 @' K" D3 |: t# P if @.Destination = void- O1 u6 ~# Q8 Q
then -- no transport order for vehicle @
/ i# c5 \/ w+ F, ?3 x: Y @.Destination :=
9 \2 M/ ]& z" ^" q* U rgManager.nearestFreeStation(@,track.~);1 L2 P7 }% _0 v t4 @4 `8 M
newDirection(@);
! Z1 e. V: K6 f' W, M if @.Destination /= void then9 r/ J3 V) H) g
@.Destination.NumReservation :=! \* l. V. O( g9 k/ Q8 P
@.Destination.NumReservation + 1;; b( ]/ o! h6 ~+ J
end;
, P; [: f$ z2 l @.CurrIcon := "drivingHome";
* z1 E5 {: U7 c" J- ~ @.DrivingHome := true;
- s1 @: _( T, P: B! q end;) q C0 R" E4 B: ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& `; H# K' q/ _% ?9 f
part := @.transpOrder;8 a1 g; s" q" B. o
part.move(@);-- load part) K9 j! F% i7 S) {' V8 X
@.CurrIcon := "load";4 o+ N8 i4 x4 P: M% _! K
GlobalDistObj := part.globDestination;4 g/ X5 f( z; n
assignLObj := rgmanager.rgAssignL;
# J S( a' e! Z$ n0 N2 i4 O row := assignLObj.getRowNo(GlobalDistObj);% M* V( u j: q4 e0 @* `
if Row = -1 then -- since 70* G4 K- h: k& }2 U( I
if lan=1 then: n* o, M2 D3 h: w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* Z+ V( t- Q+ y to_str("in der Andockstation: \"",?.~.name,"\""));3 Y3 I" X: C* p- O+ e8 _. ?
else" s3 `0 d( |8 y! P6 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," e7 x: g, q2 d( c. W2 F2 J- B
to_str("in docking station: \"",?.~.name,"\""));
+ _, v3 m V& x( n5 j+ i& _ end;
( F( S0 S. r3 p else! D8 o7 _* p9 t. S( X/ S8 ~
@.Destination := assignLObj[1,row];3 E% N; e8 ?) u E
end; 4 v7 c5 j; O3 T& `. i0 u. S
newDirection(@);
3 D. S. x0 Q7 J6 o( b @.HasOrder := true;" G9 n+ ?7 T9 x$ x; s' ?4 j8 `
end;9 ?( W7 ~$ Z: n, a H
end;8 Y1 ]- R, Q0 @" n% D. W$ _8 y9 R
end; -- of the method2 n) n6 A7 ~3 d( a6 m
|