/* called by: entrance ctrl of the object 'track'
) F* H# q# E& f/ n1 t& i* N0 T*/
( |& S" F+ i2 P/ i$ Gis
0 x& j2 T4 L9 k2 o5 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;- C, A; n4 r$ @2 e6 |6 t
do( e- c- @/ l- n& i. [7 b- j% n
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 Z1 l- m+ x9 A0 B2 o# t1 Z0 `/ p+ D4 @ if current = @.Destination -- else return
3 N8 m8 u2 \9 z+ z- a then1 N" B6 y1 F2 O0 z" i% f
@.Destination := void;
6 w' n" e; d3 D0 [ if @.occupied then) ~1 f/ o$ F' K. Q, n
part := @.cont;, g0 ]% d* s$ V' |# }
@.transpOrder := void;
* @! L, G j! K9 E9 M( W/ ?& g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' T. B5 S5 s- E) u0 z1 O @,root.eventcontroller.simTime);
+ F6 S7 c7 S. z, e/ T @.HasOrder := false;4 w3 c4 u0 G* @0 K& t7 x! O: Q" n. y- n
@.DrivingHome := true;
& W: ?0 u. e. I& L) w8 Q rgManager.tryToStartTransOrder;
9 y: o! y. N/ S! q: d. ^ if @.Destination = void% @3 P# c, }; V5 B* n' l' {
then -- no transport order for vehicle @
5 f2 C* t, M; R# f1 s5 @ @.Destination :=$ I, ~. g I; ?
rgManager.nearestFreeStation(@,track.~);
8 t h" [1 \9 O newDirection(@); c" E- N5 l3 `0 T6 a/ m* o
if @.Destination /= void then( }0 ] { [+ N2 p$ B w
@.Destination.NumReservation :=/ W, _8 X+ f! O) w( }
@.Destination.NumReservation + 1;
( N& s) M& I) x- q1 R8 w7 g9 ` end;
9 l" C8 d2 _* w! X @.CurrIcon := "drivingHome";
# v6 d2 d9 a" L9 f @.DrivingHome := true;
. x6 `. k, K$ } k; w end;* H( D- A! v3 i ?) n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# O& ?6 X, [! I' q* v2 F G/ X
part := @.transpOrder;
) T9 [+ t; c1 D0 A$ W; o part.move(@);-- load part
- _& g: n/ Z" S r4 j6 B @.CurrIcon := "load";% k2 a7 m# j/ Y; \% T
GlobalDistObj := part.globDestination;" u9 n4 _) s3 X8 C% U9 B$ z
assignLObj := rgmanager.rgAssignL;; x% Z$ h- s. Y3 r7 s* j' N. X2 ~
row := assignLObj.getRowNo(GlobalDistObj);7 e7 k. }4 D7 }+ x8 B- j# g W
if Row = -1 then -- since 704 B2 d% n4 ?* a6 |- ^
if lan=1 then
9 B6 \$ T- }9 `5 C' } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 N# i4 p7 l" v, d- D. g
to_str("in der Andockstation: \"",?.~.name,"\""));
/ ?, |, V( k' g9 Y# E% P else
4 X) E: E( z1 d- z4 O K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, V; b2 r" d5 r1 a, R to_str("in docking station: \"",?.~.name,"\""));
4 z8 }, K8 [/ [& B; A end;4 H( B7 b. f% a+ P9 F( O. T
else
% M3 O9 L5 H0 Q# F! I% i @.Destination := assignLObj[1,row];# ]; B, Y4 M# _" q
end;
: V! u! H9 Y$ K* {6 _7 h newDirection(@);
9 H# O& I. a9 |# F" l8 q9 R @.HasOrder := true;. {; X) }+ j, ?9 C' Y
end;
. w- T. a) [4 G& Z end;
: P% G A( p# i& l o& T3 jend; -- of the method
5 t1 Z$ O( B h |