/* called by: entrance ctrl of the object 'track'
8 a) o" Z3 Y$ X/ P$ u5 M: j*/1 d9 K# S9 ~# ]5 F
is
7 r- b v1 G% g9 j" Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ W- W' Z* p* O% X% q
do3 p7 P4 s. U! V9 l' M8 v" T
Lan := rootfolder.Internal.Tools.AOLlanguage;. T+ `% m5 l( K$ \' _) q0 ]
if current = @.Destination -- else return
: U, \* \) U$ _' j then
& }! `: G. I) C4 W# j( U0 t @.Destination := void;5 T$ }" f1 m, d, @
if @.occupied then
8 a- L, C+ U9 G# T( r, A! ~ part := @.cont;
2 F9 z9 f7 x5 q$ S4 I$ O* L @.transpOrder := void;
1 I2 \0 E7 T$ d, @+ g- k* F9 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 C+ b% |0 O. ]8 e/ H( J @,root.eventcontroller.simTime);
3 L6 G7 V* ?) A# c# n @.HasOrder := false;
5 ^# [( R2 [1 b* S" ]$ [& K' r- m& B @.DrivingHome := true;* q' `* Z! c% ]/ O0 l- z
rgManager.tryToStartTransOrder;3 }" P4 E9 D( O4 k! z" e
if @.Destination = void
3 k1 U6 ]: \9 K/ L0 B then -- no transport order for vehicle @
, |5 a1 p3 |/ f! {$ _* ^ @.Destination :=( j( k7 G3 J( ~, P
rgManager.nearestFreeStation(@,track.~);
) B7 ^9 G' p b; e" q3 g newDirection(@); 6 a$ _6 [' p Q% i/ R. g3 R1 m
if @.Destination /= void then
1 ` B, B+ L f4 f) A7 a) |% i; h @.Destination.NumReservation :=+ `# N. z& E+ ?( K7 B4 @
@.Destination.NumReservation + 1;
& r6 j3 a$ C# n& y9 p end;1 X( T$ U4 `% V1 a- K
@.CurrIcon := "drivingHome";) k4 X" F/ n) Y- c: r5 O! z
@.DrivingHome := true;
7 U$ c; m/ S$ Y# ^8 @ end; h) p8 G0 T: G$ d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 k4 u4 {! C. D7 ^8 j7 |5 w
part := @.transpOrder;1 L1 w) c; q3 v) F1 l1 m5 w0 V: D
part.move(@);-- load part
- q! u( X) k0 e) q- g4 L7 t* Y- O+ a1 d# K @.CurrIcon := "load";
6 ^) G' a$ e( V& O! J9 D GlobalDistObj := part.globDestination; t$ B% x4 j* d6 d8 I
assignLObj := rgmanager.rgAssignL;
: I) c! }5 _+ o! B row := assignLObj.getRowNo(GlobalDistObj);
7 ]( |3 C& q! V+ T1 a6 ? if Row = -1 then -- since 707 d9 D5 z& G( T. }
if lan=1 then
. u* O6 d7 ]" o4 H% P( t- n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 w& j0 {8 w5 ~7 I to_str("in der Andockstation: \"",?.~.name,"\""));5 e) m$ S: N. R. N; I& {1 H
else
( Z+ c M% X( Q9 Z# j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# r( A; x0 m! r0 \# Q
to_str("in docking station: \"",?.~.name,"\"")); 1 e% O4 K! p: `8 M8 ]& O) L
end;: M# }" q( e7 ~0 R( J
else
- s4 X) {8 z8 A s& x6 `! b/ w) q0 D @.Destination := assignLObj[1,row];3 e( t7 i F* A* c1 L3 @" }
end; 2 n' {' f& e6 k T* ^& K6 f' L1 c* _1 Y
newDirection(@);3 d3 a) k% _& p% D' O
@.HasOrder := true;
( B9 o' d9 s& l2 D' G) F end;9 I$ f+ C* K! M; S: A( H
end;
4 o7 J' _$ J$ D" t! }$ P qend; -- of the method
3 o; V7 p% Q& X1 l' i6 t |