/* called by: entrance ctrl of the object 'track'
- [; R O, g2 Z5 o! [# T1 z*/
$ K: }! m* c6 s5 Q, Mis' t& r( \+ T2 I' @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 Z2 V' b( l) U" Z7 r
do
8 C9 K( v l$ g; D( u6 I Lan := rootfolder.Internal.Tools.AOLlanguage;
8 `( y, h$ l5 ~, k- u- `( L- p if current = @.Destination -- else return Q" d3 N2 y1 C J( D. ?1 Z, b9 }
then& b9 X7 o6 u$ d J0 h9 F' ]2 h. K4 i: i
@.Destination := void;
# R1 G5 k1 _; \5 \4 I if @.occupied then
9 X: W) i5 R* W0 W part := @.cont;
$ i! |$ J% j2 R8 c# y6 m8 d1 X @.transpOrder := void;- a* w% ~ h/ `+ L% m8 M1 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ g3 r$ y4 x$ |5 e1 q* J @,root.eventcontroller.simTime);* D7 c. [2 ^- o3 ]0 S
@.HasOrder := false;, _: r4 Y6 C) f2 I
@.DrivingHome := true;
; @' D" F D- `. K! { rgManager.tryToStartTransOrder;9 B. V5 f, V# e* o7 `
if @.Destination = void
" t; [" C W; @, D7 x7 T- m. b4 \; A then -- no transport order for vehicle @5 b. u6 u9 u! [1 y0 X' g1 {0 @- {
@.Destination :=: N6 `! I0 m: X% y) [' J
rgManager.nearestFreeStation(@,track.~);
% d" X8 F) o& Z( c- U% x newDirection(@);
# v* ]5 F6 P3 s' K9 L3 I) N if @.Destination /= void then& j3 H5 T- k) t ]4 G
@.Destination.NumReservation :=3 s) |: ~4 k% P7 B% b
@.Destination.NumReservation + 1;
2 H( t5 w" j) v% C$ I end;
% l7 ^+ `, ~; b0 @* r7 n: `. S5 I% D @.CurrIcon := "drivingHome";
/ l. j: ^3 U1 q* V1 h @.DrivingHome := true;# Z7 N5 c4 Q$ @& j
end;
; |' m1 h6 }; v! P/ b else -- the vehicle @ is empty, both vehicle and part are in the same dock station- e0 i7 s6 Q3 f, \9 K' \$ e
part := @.transpOrder;7 n9 w0 B, @' M4 p6 x6 Y f3 J
part.move(@);-- load part: [; D! N5 H& r$ i, L' b) [
@.CurrIcon := "load";5 O0 r7 b& w- Y1 v% x/ E9 ?
GlobalDistObj := part.globDestination;
. b5 z+ x4 Q P* ` assignLObj := rgmanager.rgAssignL;7 ~1 P) z$ b; ~- r& L4 W9 r7 m3 C
row := assignLObj.getRowNo(GlobalDistObj);
5 X+ Q: G5 \: R$ o8 Z7 f' P if Row = -1 then -- since 70" x: a7 D: d, y- ?2 P) D
if lan=1 then
7 w: J: |) Z1 ]$ D4 p3 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ r% T3 ^& P6 U/ K' m
to_str("in der Andockstation: \"",?.~.name,"\""));- S3 g( Z9 M8 [( J7 L; ~* K* ?
else
9 I( m+ l. Q$ Y& x5 i/ n" z' m0 L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* F+ V' x) Z" O& Z4 k
to_str("in docking station: \"",?.~.name,"\""));
+ }1 p w8 i$ F end;
) V+ L# A5 n' p2 E8 C else
/ h# U6 t" {% q& ^! S/ \2 U @.Destination := assignLObj[1,row];
j8 }4 C* T% F* L2 V) a end;
9 M% w, t, c" j! s newDirection(@);
' f' \9 O6 t; o+ R, t @.HasOrder := true;) Q/ V* D4 U _# c1 R5 V+ F
end;
4 E; W6 k5 F p6 T+ V3 o' K end;
2 T! \" K" d: a) G$ Z; i5 U" t2 Q7 bend; -- of the method
& w/ D. y( q5 v6 e6 U7 C |