/* called by: entrance ctrl of the object 'track'% q* r. i& l! q
*/
" c- a4 F* n% C5 R9 His
, w$ u: \: y2 D" G, Z9 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, Y/ m% Z8 W7 o! w7 tdo
. o0 ]$ Z% J+ f' h# m L. ] Lan := rootfolder.Internal.Tools.AOLlanguage;
% v4 y& a! l1 ?7 W% | if current = @.Destination -- else return
+ x* L4 {" _0 T7 \: B1 j' c then0 P* \( Q7 F6 ^
@.Destination := void;1 m' K% E m9 i2 S) k& j3 c
if @.occupied then3 H$ S: o& X$ @
part := @.cont;) E/ L3 p! c u, p' e! h% R
@.transpOrder := void;+ ~- f' |0 f4 S) Y9 B( e- C- _' i" T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) x5 E' A% c- `7 ]3 W
@,root.eventcontroller.simTime);: l8 C9 k/ ?9 V7 `; p* M" d
@.HasOrder := false;
! @7 C7 R9 E5 v# ]* t @.DrivingHome := true;5 d1 r5 F& ~; D
rgManager.tryToStartTransOrder;
: W, N7 S# k. j& I1 \& e! V if @.Destination = void
j0 M) v! U2 p then -- no transport order for vehicle @
- C' P2 b7 m$ W; m% V2 ? e @.Destination :=* E2 M6 L0 ^; p* |+ q. R
rgManager.nearestFreeStation(@,track.~);9 E5 P& m- _8 C, \3 g7 ^
newDirection(@);
; r D d' ~% o/ E if @.Destination /= void then
1 H0 c0 T8 T, S, O2 w/ f r: N- O @.Destination.NumReservation :=6 c5 b+ s0 l* K
@.Destination.NumReservation + 1; J# @) P7 Q+ w" X2 j M
end;
! g! _" A7 B8 ^3 U0 n @.CurrIcon := "drivingHome";9 s& r1 h7 g6 v, i, Y) s
@.DrivingHome := true;6 U) H0 i0 f+ P# w( `
end;) ^( Y# q$ W+ b# G/ Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" F" C6 a$ }0 J7 j, G* p& g part := @.transpOrder;
! ]3 I3 p7 G, ` part.move(@);-- load part
! q2 T5 u6 c4 @& W4 e7 x+ Q& p @.CurrIcon := "load"; v' [1 R" q; q1 J3 x# j* G: R/ F
GlobalDistObj := part.globDestination;
( i1 V( {. B% M* }: j2 B assignLObj := rgmanager.rgAssignL; u; P7 Q: W p. p. _5 }( I$ l
row := assignLObj.getRowNo(GlobalDistObj);1 b1 w# h! a0 r0 _2 m+ A9 V1 V
if Row = -1 then -- since 70
" l, @ p/ H2 A. |7 D! H2 \/ F( X if lan=1 then
6 L3 @& S+ k! a4 y" W$ p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! |/ `3 @9 Q# w% U1 M5 ?. k
to_str("in der Andockstation: \"",?.~.name,"\""));5 n* c( k3 I2 [
else
8 Z4 y+ Y0 F% e( E! |+ l: ?& K" y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( P; d! b; s. P$ r to_str("in docking station: \"",?.~.name,"\""));
1 o- |0 p8 b% c" W- g( H end;1 [- k+ ~2 O3 u+ l) z/ e7 W' P1 G
else
3 X1 R- W+ Z7 K @.Destination := assignLObj[1,row];! E7 i% b! Y7 f9 w
end; 9 a( b8 l% t6 @3 T. x- A/ I. w
newDirection(@);. a/ d1 I3 l6 b3 y }: C1 q
@.HasOrder := true;+ L3 N/ }) Q+ W1 Y" J
end;
5 ^) i+ e& g* J: `7 U end;2 z. n5 P2 I6 C
end; -- of the method1 S+ C# K* |9 e. E# d6 y
|