/* called by: entrance ctrl of the object 'track'
! S. C- g; E6 `9 O- N1 K6 B*/
% m8 E, q! g! s3 l5 {1 }& `is
; Y8 K) f1 \, q o3 X: B8 r$ Q. {: S part, GlobalDistObj, assignLObj:object;row,Lan:integer;" W2 |% w: G9 {
do
/ F$ }; v E$ e. u Lan := rootfolder.Internal.Tools.AOLlanguage;; a% n e5 {6 W1 N2 @" m9 N" G
if current = @.Destination -- else return
4 A% t0 A. @/ B! ~% O. `' U then$ ?% U. j! \' t$ {5 H. s3 H
@.Destination := void;
/ k! D* u% s, ` L$ E9 f: O- N5 N if @.occupied then% E1 G/ W" a; A
part := @.cont;; q5 A( F4 z5 s% N
@.transpOrder := void;
+ H/ K; O# \) u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 k7 Q+ O ~, S7 I: a/ ^
@,root.eventcontroller.simTime);
% c6 d3 a( N6 W2 I- d. ~( G& s3 x @.HasOrder := false;0 }5 }9 @5 A8 w' p+ n3 B( L; u+ h
@.DrivingHome := true;. z1 c2 }4 w6 |% T3 ]: \7 B- f
rgManager.tryToStartTransOrder;
1 X; g" K0 T# n+ [$ i: M if @.Destination = void
1 T5 D# v7 Q: v) x then -- no transport order for vehicle @2 s8 I4 B: |& h$ Y
@.Destination :=
7 @6 `$ }, d; E1 G C* t rgManager.nearestFreeStation(@,track.~);' A C8 P2 a$ t) B# }# H
newDirection(@); 7 ?9 j2 [9 \4 _( ^$ E3 s3 I
if @.Destination /= void then
; G3 Q+ A7 J- ]& c @.Destination.NumReservation :=
. C+ P1 f& R) g+ p1 U @.Destination.NumReservation + 1;) W# M) ~( G% q" M
end;
0 G2 b9 E+ g- z9 t5 A2 I$ S, v @.CurrIcon := "drivingHome";( A/ x0 y0 Y: V4 g. {
@.DrivingHome := true;
3 V. z' M' u3 X+ s! F; c. V8 I end;0 X+ Q* Z/ W$ Y$ y( [! f2 W. H8 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, `/ U6 F* h1 ~2 F! W1 q$ E a7 G part := @.transpOrder;
% z6 ^ \% R9 T, k. }% M part.move(@);-- load part- x, ]& ?- V9 p$ r1 J
@.CurrIcon := "load";# u2 j. a. c6 Z
GlobalDistObj := part.globDestination;( B% N6 O% @* h' {. d
assignLObj := rgmanager.rgAssignL;
6 w8 {: n& ], @6 | row := assignLObj.getRowNo(GlobalDistObj);" v1 [6 v0 J5 S& l: L3 ?- u
if Row = -1 then -- since 70
: z! i; Y% U% U A7 d! R if lan=1 then1 c6 ~0 ?2 S6 `$ J2 Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 g) @% z7 `; w0 C) Y h to_str("in der Andockstation: \"",?.~.name,"\""));# y! Q$ Z$ J) V/ Q. x7 s
else
. M( H z1 _5 c6 Y1 z. n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 s: j- G0 J. C7 ]; X to_str("in docking station: \"",?.~.name,"\""));
; @2 z3 H8 |4 d% ?/ u- t& Q7 } end;
+ S0 L% t( L9 H5 d6 L" v3 F/ l0 @ else7 E+ }0 \* g5 u& m& o, J) f& F
@.Destination := assignLObj[1,row];
6 ^' o9 F" z5 x5 ]( a( f end;
, |" t' G1 Z+ p d newDirection(@);
0 k9 b! [. _: W+ f% H1 d1 L; t, x @.HasOrder := true;
- I( L) t' ^) n/ C+ o: {0 i5 N end;1 {! F1 ^" w* L1 C% U5 E+ [
end;
' X) L! [2 Y5 R# Z* R, _2 yend; -- of the method- [( X/ m8 z3 {2 p/ x; R4 H
|