/* called by: entrance ctrl of the object 'track'
* F o+ z2 z2 P* ]7 e$ Y( \% D*/
0 I4 Z1 h" \5 c. R. O/ ~1 xis" ~+ T: I7 D2 [' S9 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ y% |& M- D, j% o! jdo
+ K% d: U9 x* s8 e; S1 H3 | Lan := rootfolder.Internal.Tools.AOLlanguage;
' H% D5 f# j+ ?2 c; x% d2 | if current = @.Destination -- else return
* u1 v! d0 @. T then: B' Y4 j- A' ^' Z
@.Destination := void;
0 f- L4 u3 g9 @+ Z if @.occupied then
. c7 Q) K& a( `( R9 q& L part := @.cont;
- ~* F' X/ W: l# I+ A$ Z1 G @.transpOrder := void;7 A( M: j* J& K- R- P% \/ h7 C" N6 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, D) D! U! k R# B* I0 g5 h
@,root.eventcontroller.simTime);
: O$ {/ |& H3 Z9 r: s& S2 O# } @.HasOrder := false;& B: Q3 s2 Y, ~5 e& j* N
@.DrivingHome := true;
5 R$ }3 H& z8 U rgManager.tryToStartTransOrder;
+ L* P8 H( X8 t4 H' R6 Y" f# e; [) T; M if @.Destination = void
9 b2 R. f, g0 _5 u then -- no transport order for vehicle @
" Y+ H2 \' Z& d! h4 f0 L. I @.Destination :=1 g" Q! s9 V% I3 Z
rgManager.nearestFreeStation(@,track.~);
' D1 e; g- {9 u/ V2 C; E+ ~4 s newDirection(@);
/ R! K) P/ D8 c$ l5 K" j if @.Destination /= void then
( x7 R- [4 \; A* ` @.Destination.NumReservation :=5 w8 [9 r! T, b& M
@.Destination.NumReservation + 1;6 x3 x* B. d5 g2 p
end;3 t# L) t: \; d- s; H6 [4 F8 v) P; ?+ ?
@.CurrIcon := "drivingHome";
, p9 }3 x& g2 F/ l) {# X8 a @.DrivingHome := true;3 m; j, F8 w( ^, M) |0 z+ X6 m
end; v5 M4 F. S& N4 e' i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 r& G2 y8 G8 B* m* s0 l. T; o
part := @.transpOrder;
% z" v3 X6 G7 q8 e" S4 n part.move(@);-- load part4 u6 T9 d8 `& w* I& o+ {' F
@.CurrIcon := "load";
0 m3 s& @0 p Y( X4 ^ GlobalDistObj := part.globDestination;
8 j, h5 D+ L1 b: v assignLObj := rgmanager.rgAssignL;" `: j7 A7 S! u3 C7 Q
row := assignLObj.getRowNo(GlobalDistObj);
7 t, z5 s, f1 } t+ }/ S D8 C. } K if Row = -1 then -- since 70! _1 W8 k t% t. K: ^& G5 U. ]4 t
if lan=1 then4 {$ N/ r; K. \) y: E6 o1 x6 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, P8 C; i1 q; N+ k+ w4 T* C) t to_str("in der Andockstation: \"",?.~.name,"\""));
6 T ^- y/ N8 j! W* L$ I" ^ else0 m8 T* u& D' O, M- I B* s. I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ {0 U9 X n) Z* P7 b to_str("in docking station: \"",?.~.name,"\""));
4 X6 F) Q' b* q& o end;( @6 J7 p1 j( W8 I; M2 F( E
else
r1 v7 \, }! z; z+ n( Q @.Destination := assignLObj[1,row];1 Y- y3 K7 E- N& a: p; @' q' J
end;
" F* x2 Q0 D) k6 Q newDirection(@);
/ L! @6 u4 j& I4 b; E @.HasOrder := true;
! T; x# ]7 _+ e3 b: }. P' J+ i end;
# L( f$ |* P! r: t* N$ U1 V, c end;
- _$ _. k6 T% X1 w: x: k w* ^* Bend; -- of the method1 w# B+ \8 U# |8 |
|