/* called by: entrance ctrl of the object 'track'9 z. x c* D( U8 q
*/
, o1 F) I+ ]5 L6 uis
5 |0 u3 F( E0 ?% |4 P+ ` A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* N0 @: [8 [4 J( V8 Ddo
7 ^9 i" P" r3 M8 G( k3 r: E Lan := rootfolder.Internal.Tools.AOLlanguage;; V: o R3 j& c1 @
if current = @.Destination -- else return
5 a7 U& C* J" S! X then. P) t% R. ?7 ~
@.Destination := void;
6 I3 [$ K" I& \* f0 i! ~ if @.occupied then
7 H9 v6 z8 H! M8 p3 z/ { part := @.cont;
1 Y8 d; ?% J- ^- d @.transpOrder := void;
: g$ g- u8 j/ C( b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' O: X8 U0 ?) o* s0 s @,root.eventcontroller.simTime);
9 h) w. {0 t' D- O4 p @.HasOrder := false;1 @" z* f9 `/ C7 `4 w
@.DrivingHome := true;/ W h$ }* @. g8 @$ g: f% [
rgManager.tryToStartTransOrder;
4 M0 K1 k" M' H& `% \/ \2 F3 V( G$ O if @.Destination = void9 o: C/ m/ d7 {) V7 J3 Y: b
then -- no transport order for vehicle @! |8 |, R& S' s
@.Destination :=) ^' ] I L4 A% u. X7 t' A
rgManager.nearestFreeStation(@,track.~);. g; d* d& m* f2 A
newDirection(@);
8 H* B3 s: p, I if @.Destination /= void then6 b [1 a5 Y2 i
@.Destination.NumReservation :=
4 k/ S- D* M7 q& F1 { @.Destination.NumReservation + 1;& T9 K$ C* _) L& m. e" c' [/ D0 E5 W
end;
2 I; L- h8 O, Q+ f& S* N( V @.CurrIcon := "drivingHome";6 x7 L# U [( O" U1 F! a# ^( O9 K; W
@.DrivingHome := true;
4 p* [: O9 c; E5 A y7 ~( E end;
' U: j6 Q6 ]1 Q5 ^0 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 S1 S9 ]2 Q. U# S/ M) v
part := @.transpOrder;
! h- e4 e' A! C: ~& K part.move(@);-- load part0 J/ ]8 O: @" B
@.CurrIcon := "load";
* q/ V2 P; V5 w t* F GlobalDistObj := part.globDestination;
! i* K& {4 \3 A: N; e! h: H, B! U assignLObj := rgmanager.rgAssignL;9 s9 L- H# S2 x' v/ T
row := assignLObj.getRowNo(GlobalDistObj);1 W. L5 [1 _8 K3 u
if Row = -1 then -- since 70/ O7 C& w) c* C. v# [: G
if lan=1 then
0 h# _; y0 u+ N. C) L3 u3 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& w* k+ Z5 Q( d: S3 B
to_str("in der Andockstation: \"",?.~.name,"\""));& o9 p2 F8 @/ C. t0 Y: V3 V4 l
else
1 h$ r4 M* W. O( n; e# n3 a. s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 Y. i9 K3 n; k8 X
to_str("in docking station: \"",?.~.name,"\"")); ( ]4 H$ W( C( L1 T
end;, R" N4 i( K0 t# O7 }- u
else
# _+ H" K9 c% R2 t @.Destination := assignLObj[1,row];4 j# h2 P! D/ z0 A4 o, w
end; ' f% `# v+ n" P0 ?( w% k$ G
newDirection(@);6 x. @. r* w# P+ @% z1 Q: D4 y0 h
@.HasOrder := true;& T, G" u+ s% q( r$ Y* O# T4 d$ P4 |9 c
end;9 N' R4 n6 ?5 D$ S6 A
end; n0 d6 R/ }; y* ]8 \
end; -- of the method
3 e9 C" V: J% n G: p4 E6 x |