/* called by: entrance ctrl of the object 'track'
* T! M, p2 p8 `1 n2 c*/, W- i+ {: ]# i; \* C( m/ c
is
6 b1 a" k1 N) j part, GlobalDistObj, assignLObj:object;row,Lan:integer;% c7 j# ]! R3 ]
do
; @3 q5 M2 o' d Lan := rootfolder.Internal.Tools.AOLlanguage;6 U, X; p3 l9 }& k
if current = @.Destination -- else return
1 B$ M \9 g: Q) v0 s+ c then& {* V* D2 @! e. V1 N: f4 C- h
@.Destination := void;
# M/ g7 I( v/ { if @.occupied then- j* h$ b, \! I6 Q/ y
part := @.cont;
2 D4 v" N3 G7 W6 x @.transpOrder := void;' g9 D/ x/ R: T+ E" |( ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& A' K# M4 @* l) {: n
@,root.eventcontroller.simTime);
$ }( c7 A/ M$ z* t: U3 g" J @.HasOrder := false;2 C( |$ X' W1 c- D8 K- v. I
@.DrivingHome := true;
- a! I* Y8 |+ F j rgManager.tryToStartTransOrder;
5 p5 ~& w. h6 ~, I2 i if @.Destination = void
1 O$ [! G$ y1 _ then -- no transport order for vehicle @
0 H% R. u, i- W @.Destination :=& O- N1 s9 ^5 U$ `$ R
rgManager.nearestFreeStation(@,track.~);
5 k' R' `2 c0 ]1 `$ u) M" J newDirection(@);
% ^% X. v- Q( W$ \3 b* v if @.Destination /= void then
1 U( T, j9 D' g B @.Destination.NumReservation :=8 e/ y3 B% v" B% F# A
@.Destination.NumReservation + 1;% N- o: _$ ]; Q f. i3 t( c
end;
6 _+ p3 x+ O r- e5 x* K0 L9 I @.CurrIcon := "drivingHome";' C; v7 u4 `: T9 X# }
@.DrivingHome := true;
: E1 @& c( `( o: ?0 I9 L6 J end;
$ p9 {5 [0 X# } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; M+ N' C+ W! x' ]1 n) h part := @.transpOrder;
5 ]' \( n: s1 {' E: z; ^) O part.move(@);-- load part
1 @. \, q0 A- y" v @.CurrIcon := "load";
# Y; g* I1 U5 t/ M. n O3 c GlobalDistObj := part.globDestination;0 [" C. v) O h3 p% O% B, z |
assignLObj := rgmanager.rgAssignL; k: G- {+ Z/ K* Y, P
row := assignLObj.getRowNo(GlobalDistObj);
& S+ W+ N7 N: p6 n- W) Q if Row = -1 then -- since 70
& q$ Y3 O9 e5 `6 `) ? if lan=1 then
7 Q" ]+ r4 d$ I1 i. t' W x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; T# B7 C, A4 h5 I0 u. w# V: E4 Q to_str("in der Andockstation: \"",?.~.name,"\""));
0 P" \! r: ~+ i else
6 z6 q6 Y. n" G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: p9 K8 Z1 Z5 w y- n
to_str("in docking station: \"",?.~.name,"\"")); ) c. ^' Y0 h) {8 N3 ~
end;, d& O$ z8 F# {2 h0 l
else- x7 B1 V+ p, s3 i. [; h/ U r
@.Destination := assignLObj[1,row];" y: |) C% x" l& E0 X* n
end;
7 O* q6 |) y1 }+ r2 h; { newDirection(@);' L& r5 Z' W* [& C% P7 O3 o; c
@.HasOrder := true;
8 X8 P0 ^* X, R) I- }* e. b end;# `2 L; d: T- v
end;
4 e' f5 f& W' E7 \. ?end; -- of the method
5 E4 d- A) A+ x# Z) Z |