/* called by: entrance ctrl of the object 'track'
& b! l8 f5 ]& L. q) V*/
# \% D5 W5 E6 m3 t2 T+ x9 h. lis
, D" n: O0 o0 z: x% H# [- G# M part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 `. L$ I+ Z9 x+ H, ~( L' y0 M
do4 Q; ]# T: F6 h0 [
Lan := rootfolder.Internal.Tools.AOLlanguage;
" f9 _$ l/ Q E if current = @.Destination -- else return; m' l6 s+ v H# ]' o) n& w8 T
then/ Q4 b, N6 ^% D* `% T" z" g8 G
@.Destination := void;
& ~ z5 Y$ B. C3 K% U if @.occupied then
a1 p3 \; j4 G3 T1 J part := @.cont;
& M9 ^, y0 ^: ~ @.transpOrder := void;
, a1 K" I, n" M4 E/ Y% s( F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: _$ n4 D% i. a @,root.eventcontroller.simTime);
9 K/ f1 ?1 I# I7 W4 ?5 }% k @.HasOrder := false;
+ `7 J) \( R3 b: V @.DrivingHome := true;
G$ _1 B5 [( E0 L, T( ~! l/ a rgManager.tryToStartTransOrder;, [7 R8 @; I6 ?' ?. V: A1 W; O
if @.Destination = void9 C# N- F" d& N
then -- no transport order for vehicle @
2 s7 s. r# s% D, M3 M4 c3 ] @.Destination :=
, b( p$ z& a2 O3 O: K rgManager.nearestFreeStation(@,track.~);
7 N' j( a X; N8 n2 U# }: o newDirection(@);
5 c* J0 A3 b) i( M% R' S4 Q if @.Destination /= void then, `6 ?: m; w" k
@.Destination.NumReservation :=( Y- ~7 M$ i* L: l7 \! Y
@.Destination.NumReservation + 1;5 @1 Z8 z4 o, s$ D0 P7 b) {
end;9 s- b9 u$ _ X8 s9 i5 E+ b
@.CurrIcon := "drivingHome";6 w3 B. {% ~; w- t" K
@.DrivingHome := true;
. ~) i' t+ u: s# X9 g: X/ J end;
. e9 g) x' F, v' U' V1 J7 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 S" j9 A" @' e
part := @.transpOrder;9 y/ P! m* C7 p2 C: |$ I) X
part.move(@);-- load part p# u7 B# A$ w
@.CurrIcon := "load";
' q% i; d) Q1 c) s9 G$ ~ GlobalDistObj := part.globDestination;
: f* |; ] {% _& w5 g7 l5 P assignLObj := rgmanager.rgAssignL;
9 C; b# K" W( @' J% v! h o- N! K$ A" s row := assignLObj.getRowNo(GlobalDistObj);+ u# q5 n% f3 O7 D- S- F
if Row = -1 then -- since 70
2 m0 _! Q ?9 D9 G/ b' ` Y if lan=1 then
# s$ c" P/ E* t1 b) r3 e. a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 b% `) j0 \1 U) ^ to_str("in der Andockstation: \"",?.~.name,"\""));
g. s2 }0 @' W) b# P else: a5 Z& i9 ^' b5 r) `. _2 O- ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: O2 \/ x, |( Y, n6 b
to_str("in docking station: \"",?.~.name,"\""));
7 h @8 s: c, S2 I end;; C; `! Q* b0 _
else1 L4 ?$ d6 ^. c6 c% a5 v3 b2 [
@.Destination := assignLObj[1,row];
2 u( w. ?) c1 h, s& c3 p end; : c$ H7 f" g* }
newDirection(@);# `8 ?- x' c) f# v, Y
@.HasOrder := true;" I. r+ p2 j5 ]: M
end;
9 O2 Q1 I; ]0 V& O: h3 }+ a# c end;9 R2 r0 Z& W& e! V
end; -- of the method
$ K* L/ Q0 [; b: p |