/* called by: entrance ctrl of the object 'track'
. Y: `9 o* V0 y1 d*/
7 k; A; P4 ^4 Uis
- R& f k4 B9 R7 y1 h' V- \/ _+ g* I1 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;) b) y/ N, R5 M: A) {- S% b0 K
do1 w: x) e* n0 F0 E) Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
" S% z; d7 s/ W% \- ?% K if current = @.Destination -- else return% f6 V8 }% K* ]7 u: T3 \
then+ b8 z2 l% ~) ~' s
@.Destination := void;) s% b( m9 X B; m: G3 O
if @.occupied then
% r% s6 w3 |% s5 E4 f8 ~4 g1 P" E part := @.cont;( m& h: b k! b8 r% J
@.transpOrder := void;
6 q8 ?. n. u# b1 {, }( @( t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
B4 q, Z' g' P6 V1 _ @,root.eventcontroller.simTime);
1 F& i7 l' [7 L9 L: H @.HasOrder := false;; _" X( h4 \+ p+ I2 T% j
@.DrivingHome := true;
* D! W% \4 ^6 m rgManager.tryToStartTransOrder;6 X% V0 m; l/ Q! S1 s* R, G
if @.Destination = void+ t4 w% P1 @; u/ w
then -- no transport order for vehicle @
/ Z" z b& L1 O* m' @) u- N @.Destination :=
8 Y7 ^( d% p. t. Q2 R! Y rgManager.nearestFreeStation(@,track.~);
4 Z6 F/ ~+ |9 g/ N! e; A: v newDirection(@);
4 G7 ]6 N- h0 a if @.Destination /= void then1 ~" v, e1 V9 V5 e: G3 d
@.Destination.NumReservation :=! L/ H, P Z5 C# m ~
@.Destination.NumReservation + 1;
F! l' z& ^9 |0 C: u3 G( q end;& y( ~/ d) O9 F9 w
@.CurrIcon := "drivingHome";
8 V6 V7 K3 g, D! c @.DrivingHome := true;
; \8 X! G4 n _$ N: s! K end;- q& f* A3 o) k* j9 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 N1 o* m. l6 q, o/ G/ k part := @.transpOrder;
$ z [% F0 F5 u3 }0 l part.move(@);-- load part
& ^; p5 E: B9 l" I @.CurrIcon := "load";
- P& {. n9 f9 Q1 |. m. u2 f GlobalDistObj := part.globDestination;
2 Q+ V8 N8 s6 _; @' g7 Z3 c assignLObj := rgmanager.rgAssignL;
8 W8 e6 b1 Y/ T, A row := assignLObj.getRowNo(GlobalDistObj);0 f! m) L, U) E6 u" \
if Row = -1 then -- since 70 Z1 u: y3 | d8 n c( u" i
if lan=1 then
- a; e* y; E8 v! ?7 C/ \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: M/ d2 K% l/ J0 Q& [
to_str("in der Andockstation: \"",?.~.name,"\""));
$ [$ @. w$ B: ? else
6 j" l% \7 q) r; D$ L) v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 T8 N2 e- O5 l1 [
to_str("in docking station: \"",?.~.name,"\"")); 7 P9 a5 j7 U' m |8 _" y
end;
; \! D- h, @) C b' p. M+ c else
+ ?& W7 H: ?* Z" o* e @.Destination := assignLObj[1,row];
! A: l6 |; W7 d: G p- a4 H end; 1 A) C2 q/ x/ e2 S! G' V5 b5 c
newDirection(@);. q1 L7 T1 M* K) W7 g# m6 }
@.HasOrder := true;
% _% N$ Z4 Q" g# `4 | end;! q+ y2 R8 p% o5 f) j! w4 D
end;" ?/ Y9 C: P( f5 q t1 \; I4 p
end; -- of the method
" a! } T6 ?$ B+ N% K" @: F% E$ i4 M |