/* called by: entrance ctrl of the object 'track'
3 Y9 I- i/ ^$ o. w$ v3 |( B*/! ~8 Z7 [; G5 `6 a% {) z
is5 A9 z, \& ?# |) ?7 K; _) p/ ^7 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 P, C6 G. p8 d* R
do+ U: \( r+ s$ X: N' w# W
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 n; E! V( v6 f6 C: C" W; { if current = @.Destination -- else return/ _( Q8 m( e2 d) m! y; h" Y( q1 Q& x
then9 m, _& Z/ z3 r- @" @* i4 c) A; \
@.Destination := void;
. H( y& I- ?" g" C [ if @.occupied then
* w) P" V: D3 x; L3 b% d part := @.cont;
+ t* d& B s' i0 j5 `+ i' d. M @.transpOrder := void;
! W: R& ?3 m$ d, L# U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 a! f! |+ ~8 V7 |' M; x* d
@,root.eventcontroller.simTime);
, N4 H( K$ B$ H @.HasOrder := false;
" M3 o" c0 W2 g B* I7 l6 K! n; c @.DrivingHome := true;
" q% F6 t0 D. T$ d( \ rgManager.tryToStartTransOrder;
l; M+ y% w% H3 x if @.Destination = void0 j6 E, Y" o& X3 e% R1 G" R
then -- no transport order for vehicle @5 K9 S- T8 c. R- W, ^! z
@.Destination :=: d9 D: D$ U, [* U
rgManager.nearestFreeStation(@,track.~);9 w0 }" g6 a+ o6 [3 j1 S
newDirection(@); 5 l4 c, j9 N7 T- e5 d- }3 r
if @.Destination /= void then% V( i( W" s/ h- ]1 J
@.Destination.NumReservation :=$ L! n- u( {, ?' N, }
@.Destination.NumReservation + 1;
( z7 b4 `) V( }8 R7 q# S% B' n end;) Q& w# c& B/ D5 F) ]& p2 X) l9 n; H
@.CurrIcon := "drivingHome";
s5 b. D& q, J \* z @.DrivingHome := true;
1 o" |2 y, R1 I$ _$ p+ \" a end;9 v& Q, t; O: a' p/ j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 F# Y7 B1 I, k! k* {
part := @.transpOrder;* b' N3 T1 j8 G
part.move(@);-- load part
) \1 x6 Q. E1 O: n @.CurrIcon := "load";$ a3 T( ?% v2 L
GlobalDistObj := part.globDestination;. A: X% y l, i/ W6 ?0 q
assignLObj := rgmanager.rgAssignL;& G( C" m3 f3 Z) C4 X
row := assignLObj.getRowNo(GlobalDistObj);
# \+ E' _; E, b) Z if Row = -1 then -- since 70% k1 f; y- T) N9 h, k
if lan=1 then& a" n! e" K4 T' P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; @# `/ Z& H, B K& e6 t2 A% l to_str("in der Andockstation: \"",?.~.name,"\""));
) ~$ D% P" q/ I. Q& v( Q1 D else
D8 ~4 [ [+ U/ ?4 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) H# y( Z. B, }/ c4 G, d
to_str("in docking station: \"",?.~.name,"\""));
* n! h4 ]+ N# m/ M6 \ end;, m8 z' v, V9 Z' c4 J! n" x
else
1 M( e; t n9 _0 B: l: y/ W @.Destination := assignLObj[1,row];/ O) Y( z$ t: E) s
end;
* A0 y/ ?3 c5 p1 T5 R2 D newDirection(@);- ?8 q* G& r/ \" f
@.HasOrder := true;
& Y' W' m' \+ k end;
/ I5 h6 x1 b- T Y4 y- l end;$ E2 q S$ I' s2 ?6 i2 L
end; -- of the method
+ v' c! {" q5 f/ u! t* @ |