/* called by: entrance ctrl of the object 'track'$ P- U0 u) D1 f) t( r* ` @: E' [3 h
*/
5 a0 P2 F q* Z7 v& Eis1 s- D. [& ?2 G4 [. e: f% G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 Z; O; A9 r8 S6 ^* i. \
do9 j- e V/ b5 B; v! c6 p* V
Lan := rootfolder.Internal.Tools.AOLlanguage;( f4 _9 g$ }, ]! A& c* T/ z
if current = @.Destination -- else return
6 M- L% n! O+ ]' ^, r4 x+ g9 A5 l then( _9 C: A3 ]! S2 A3 H- U
@.Destination := void;4 c7 [+ I8 Y) l- ]! O( ?6 |0 q5 k) R: V
if @.occupied then& x; b- K u2 G
part := @.cont;3 w2 }# K2 g, J4 v" S$ V
@.transpOrder := void;: l. S \8 L% v8 I7 N D2 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* v. `! J/ f5 h @,root.eventcontroller.simTime);
$ R- O5 S# g# s# Q @.HasOrder := false;
- V1 f- z* M3 I3 | @.DrivingHome := true;" A, c* w7 |: o/ t1 Y2 C6 {8 D y
rgManager.tryToStartTransOrder;0 ~2 C2 a1 K1 s1 \
if @.Destination = void
. A% q1 l$ e$ L) C$ H then -- no transport order for vehicle @
( t E; y% S4 m g @.Destination :=% _% F2 Y, L/ A2 b+ Y) }) N
rgManager.nearestFreeStation(@,track.~);
+ c( W8 B8 h8 V newDirection(@); - @" A* ?# [& B8 l
if @.Destination /= void then/ `* c- T) E) j8 @) V- ]
@.Destination.NumReservation :=
$ p b8 V$ l* k" o1 t d @.Destination.NumReservation + 1;
( o3 I Y; w! `+ d end;
4 P p1 j1 C, Q7 ]. e6 I. v* x @.CurrIcon := "drivingHome";
% R$ B) V a2 X! r& E4 [ @.DrivingHome := true;
7 G3 I7 F' q/ L end;
! Z8 ?9 \1 W" p/ ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station% I; A4 @$ ^" }# `
part := @.transpOrder;% J7 c0 B2 ~) o& i' Q
part.move(@);-- load part6 S$ O! h w9 l9 f6 @3 J+ c
@.CurrIcon := "load";5 {5 ]; y) P# K
GlobalDistObj := part.globDestination;
; D! T0 m4 _1 N; B; U assignLObj := rgmanager.rgAssignL;2 I3 e' a7 D% h, A' B: p+ e
row := assignLObj.getRowNo(GlobalDistObj);
3 \( ~3 [" [+ P5 _$ J' _7 t if Row = -1 then -- since 70
2 j, t9 c. I: F; j% K0 { if lan=1 then
$ k2 e* F; Z7 s" }3 _. U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; y" `, L; J7 b+ H" C6 x to_str("in der Andockstation: \"",?.~.name,"\""));# Q% g7 E! h4 u) P
else
4 B4 y* u' r Q L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 E2 S/ t" Y3 e* b$ o' W1 o4 ] to_str("in docking station: \"",?.~.name,"\""));
9 O$ X% J# B' z1 F' O* D5 V end;0 n8 f- N7 r) }: C9 a" f
else
# b' v5 I# x9 h/ I' y @.Destination := assignLObj[1,row];
$ ]/ l, m, d4 |! B0 X, z end;
; M( z' K, I5 y4 o; r% w0 N$ ?6 I, k& G newDirection(@);# g6 r+ o4 r+ I" v
@.HasOrder := true;( ^' \8 z) p% M5 V( C* N1 n4 F6 |* B
end;
6 H0 z8 F9 K3 A end;
/ ]7 r/ Y3 I* C& ~" F# v" B! Yend; -- of the method
: x9 |+ e5 m6 g! p* t, X" ]# W9 @ |