/* called by: entrance ctrl of the object 'track'
8 l( y! Y# S% R9 h8 S*/. J/ ?. A# t8 \3 H( O8 X' V- h
is8 G" v9 x- s0 @5 J. l) e7 h4 F- L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 i% x( M: Z' v n3 {7 Vdo$ ?3 c$ P+ E0 |2 P2 a
Lan := rootfolder.Internal.Tools.AOLlanguage;& u, D+ g& }& }% j8 x
if current = @.Destination -- else return2 w9 g( @4 a# k" o' Y# t( m( h
then: b, N5 g3 r8 f$ V9 D( u( c: M: M
@.Destination := void;) P$ \* o9 ~5 n8 ?
if @.occupied then! u* f+ T! b, q# }
part := @.cont;
& M: R6 ~! u2 j+ Z/ E @.transpOrder := void;
2 J0 ~ }7 y: Q6 z4 a6 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: l; h" x( k3 q9 |. t# U( p3 I6 J/ ~
@,root.eventcontroller.simTime);
! |3 T, U& t4 K1 T" @ @.HasOrder := false;
* [, l- n% }/ L, I @.DrivingHome := true;
4 D+ _% l& v5 A5 V rgManager.tryToStartTransOrder;+ G, V( o9 t+ ?4 g2 h3 l& U
if @.Destination = void
) F3 E j) b5 Z8 y/ ] then -- no transport order for vehicle @/ A7 ]! s8 e9 [- t# r
@.Destination :=
4 [. S& R: {" L) c0 M: v3 G1 I rgManager.nearestFreeStation(@,track.~);
8 ], |7 x+ Q, [+ I newDirection(@); ) F5 w( y( Y6 ~+ j, |4 Z% l4 k7 M# c/ S4 w
if @.Destination /= void then7 f0 ^: C/ e, R9 D" q6 Q( T8 a
@.Destination.NumReservation :=
' @- I" l* F; J: a7 {% |, y: S1 j @.Destination.NumReservation + 1;
1 E" _6 Q2 _8 }' v" I4 g5 W end;( v, ~& X4 w8 V) Z
@.CurrIcon := "drivingHome";
: M6 A) c8 {# t9 f& l @.DrivingHome := true; R; r7 j/ p- z7 l u2 `9 E
end;
4 g% _# i: _! o% T else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 Q# D a6 H& x3 } part := @.transpOrder;; L2 m5 D* K: o5 J
part.move(@);-- load part
3 z5 d8 p, O T" M, l& \$ X @.CurrIcon := "load";* y; g& T9 e) L Q& D; B; V" W
GlobalDistObj := part.globDestination;
: V' i- @+ U B6 z4 P3 J assignLObj := rgmanager.rgAssignL;4 Z9 G) E$ g0 t9 F0 i
row := assignLObj.getRowNo(GlobalDistObj);
8 B z0 {, ]6 |9 H* {! W if Row = -1 then -- since 70
; U2 i0 f1 k# u if lan=1 then" l8 q7 ]# G" {" R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 F) b5 r# D: k4 z$ n: r+ d to_str("in der Andockstation: \"",?.~.name,"\""));. E7 K0 [! ?+ S5 b0 C8 Q
else" r5 I# p4 ?- e! v+ v# q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ~8 _$ U( b/ ~, g* p5 T s: H
to_str("in docking station: \"",?.~.name,"\"")); . ?4 [2 d4 l+ u. E0 E6 z
end;
- X( g8 k k Y* k* x& u z" B) c else0 S0 A0 g9 T& W1 `3 y( b
@.Destination := assignLObj[1,row];
2 ]& S% w. h! h# y( r4 o end; # P7 p2 s1 O, B& c9 Q% C& W) O) J
newDirection(@);
! `$ \$ W' Q A/ A( P8 E8 { @.HasOrder := true;
2 G+ B( I% u7 f4 N$ w2 w o end;
' C/ K) s2 t# M0 u/ v. G end;
- j( d2 ?- u$ Y, b6 Z2 r- R5 kend; -- of the method
4 D/ G, T" `3 F r9 H |