/* called by: entrance ctrl of the object 'track': m- J8 j$ ~. [2 I7 H
*/
2 o( o4 L+ ]; B2 u I% |is
0 w1 k+ |, x0 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: L$ Q! @4 x2 C% P8 u6 zdo6 @! {: K8 M2 S% E" g7 g
Lan := rootfolder.Internal.Tools.AOLlanguage;/ Q5 M: S( a$ `* d- d$ e/ e
if current = @.Destination -- else return
3 X( h- L6 q, N4 ] then- H' G/ P8 j; s7 t
@.Destination := void;* B7 l) V) x0 J& c* P6 y; T" W
if @.occupied then) W* i; W5 d; k4 o# I( Y1 i0 x
part := @.cont;/ P( Y( A; \, w# }/ K; F8 l
@.transpOrder := void;4 S. t. S, Y) [5 Q8 \2 G1 Q }5 E6 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 O; U0 q* M0 r$ y4 {
@,root.eventcontroller.simTime);, c6 L$ _8 S+ Q4 V b! [
@.HasOrder := false;
/ W: ]% F) Z, A7 R; S @.DrivingHome := true;8 G8 R# D- g8 _
rgManager.tryToStartTransOrder;
+ V" K0 {0 E3 o1 d" z' v if @.Destination = void: a- y& o) S. _- F3 N
then -- no transport order for vehicle @" q7 }0 M5 W) b7 `
@.Destination :=5 {, l. l L) P3 @3 e$ E6 g
rgManager.nearestFreeStation(@,track.~);
. W. h8 O# s- m1 ^ newDirection(@); # x) R1 F. r3 [ k S8 o
if @.Destination /= void then
2 o$ R7 X7 Q5 M7 I @.Destination.NumReservation :=/ C6 d* w; [- l; j# I, H2 @
@.Destination.NumReservation + 1;- P4 t$ T. }/ U& X1 [8 A6 i9 I6 W
end;
# Z' y+ y4 q; k: l2 H @.CurrIcon := "drivingHome";) v+ Z- S% X- d
@.DrivingHome := true;* x- y. z, D. w$ u, J1 F
end;
1 b+ U- `) G1 F% ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! A2 ~6 X d9 V8 X$ z* D; n6 N part := @.transpOrder;
; \6 D* R, {2 U5 _7 h. n2 c part.move(@);-- load part% Q* q, a# x2 B
@.CurrIcon := "load";
3 w! R$ u0 Z5 L$ f GlobalDistObj := part.globDestination;
, v. D" C9 U: ? assignLObj := rgmanager.rgAssignL;
9 m% {0 H" l* H" t, ~ row := assignLObj.getRowNo(GlobalDistObj);
0 ?4 y% @( o3 |0 l1 o2 U" L if Row = -1 then -- since 707 U$ r% x3 y/ u# @5 n+ `
if lan=1 then; A9 V% V* J; e Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' U- b: `! M0 B/ p7 P1 ?
to_str("in der Andockstation: \"",?.~.name,"\""));
4 u) o* X7 Q4 L, w; P. g& w else
0 f* X) {+ L2 Q6 N: L( [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ O6 j( m: M* X8 o) a to_str("in docking station: \"",?.~.name,"\"")); . p5 t3 P6 L$ K, p
end;2 X) j# ^+ J- _( a3 G
else* e- y F3 T2 C8 p: b
@.Destination := assignLObj[1,row];
- {* u% W* s4 f5 c; g+ f end;
# ~3 e( a/ a1 ]) a newDirection(@);
( u$ h! r$ U4 \3 x$ M @.HasOrder := true;4 L" J9 t% t! u$ `, V! \7 U" H
end;
. L0 ^. ?8 x6 e0 U end;1 c3 v2 N$ ?, L; Q4 ?
end; -- of the method
) [/ @; p4 u5 t# @0 o1 k { |