/* called by: entrance ctrl of the object 'track'2 R6 H8 N) x/ `& V/ m5 \2 q
*/! P' y( S& z' H3 c/ C$ b* C
is
7 M6 D" g- Z0 n3 L/ j part, GlobalDistObj, assignLObj:object;row,Lan:integer;) Y( A1 n% Q% Y* {. a& T1 u
do
F* I6 v2 a& n. a% l Lan := rootfolder.Internal.Tools.AOLlanguage;
& N7 s2 h* V# j1 x: E8 g6 j if current = @.Destination -- else return; z7 x& \3 W4 D8 S
then t6 ?! b& k2 ?
@.Destination := void;9 s( O) f# G3 ?! P/ d) c
if @.occupied then
7 n, l% e3 }$ i1 y/ d: j/ J, F0 w part := @.cont;6 F4 x0 [' E- v2 v
@.transpOrder := void;
8 [' f) H; u7 k { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 E# X6 }( g `* F9 [7 a+ c @,root.eventcontroller.simTime);
+ [4 S( _( I, k' {* f @.HasOrder := false;
% ^$ K8 T6 u% W. U5 v @.DrivingHome := true;8 D6 l9 O, ?5 x- ]- \
rgManager.tryToStartTransOrder;0 |6 z- j- G% `4 \5 A. l6 ]
if @.Destination = void5 _0 g2 x `* p- G, ~, F
then -- no transport order for vehicle @
5 _, i% z7 O, ^+ J9 O @.Destination :=
& D+ {% }8 l* x: p+ O' N9 F rgManager.nearestFreeStation(@,track.~);4 t# b E. |' Y* q9 \, }
newDirection(@); 4 j0 E% y" o4 t
if @.Destination /= void then
/ U- f0 J5 b4 A. b5 Y5 M* o @.Destination.NumReservation :=
: q: L3 A" R3 r& L& Y: c @.Destination.NumReservation + 1;( z9 j- W, F/ o; R# {
end;
. I) |7 m5 n, t9 `$ ]! U; P @.CurrIcon := "drivingHome";- {) F" U" [ I6 g( A. J8 u
@.DrivingHome := true;
) ~( Q5 e, X. S" e/ { end;( G, W- T. m3 g4 e1 G4 V* u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ T& a' Z' v+ f8 q0 h% w part := @.transpOrder;7 v( v& I# p' r
part.move(@);-- load part
; q k) @! J H! V# e4 z @.CurrIcon := "load";
& i/ v: K' n3 c1 P$ D5 h/ w( } GlobalDistObj := part.globDestination;
3 O: V: J) x5 _" Z. M8 M assignLObj := rgmanager.rgAssignL;8 p7 L* r. ?- V: I
row := assignLObj.getRowNo(GlobalDistObj);# g7 m8 m# v' T2 |
if Row = -1 then -- since 70" s7 c8 ^$ U8 B' A
if lan=1 then
3 `! Y: g- e' y! G. C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- ?( c3 u7 i1 ?1 I
to_str("in der Andockstation: \"",?.~.name,"\""));
. y' Z0 J. E4 y: z else6 @# d( G: y5 K Q4 O r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" S# n" X" ?; @' r+ ^; i to_str("in docking station: \"",?.~.name,"\"")); / I$ N- x! D1 E4 z v$ g" ]
end;5 t0 y2 ~1 b4 d( r$ C; C
else
4 Y$ o6 P' y9 H3 g' j- a @.Destination := assignLObj[1,row];* B- D( I7 f" I" N4 a- r
end;
8 ^" ?; o: ~: C2 U; T$ _1 v6 V newDirection(@);, J9 }# q: x' h2 i4 H3 T5 W8 @& e ^
@.HasOrder := true;4 x( Z7 W1 ]8 d* H
end;
; H' p$ Y" ~3 `# _% ] end;& u# A9 U$ k; N7 c7 o
end; -- of the method' d$ Z5 Q; v( Z5 S. M
|