/* called by: entrance ctrl of the object 'track'
+ s' Z6 N( ]2 k. E7 |*/
E! T; P/ n) |6 c" n( j; Bis' r2 Q* H( d, a T {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 ?! e o9 S& q# F- p3 {2 }
do/ \; t: {0 ^3 J0 n( z6 ?0 V
Lan := rootfolder.Internal.Tools.AOLlanguage;& Q# p$ U9 |9 T
if current = @.Destination -- else return
. D& L- O z8 u" g9 |3 _ then$ c4 p/ p; k3 Q
@.Destination := void;4 B v, e& x. @) K3 O' ^- y
if @.occupied then% b" V; ~ W. b- G$ n' \( o$ Z
part := @.cont;
1 g4 M7 J$ U, p. y @.transpOrder := void;
5 b/ f1 {6 o! I% h* C+ ?# K1 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 \3 }8 a8 }+ q/ d U" |
@,root.eventcontroller.simTime); `9 c7 r% L2 E6 d& _1 S+ U
@.HasOrder := false;8 c: k9 w' J: ]& \( K
@.DrivingHome := true;
& S* c0 T7 |& H9 M rgManager.tryToStartTransOrder;
+ i& e4 l! F8 T+ j! F; z1 a! }& k if @.Destination = void G, k( T; t* |0 g8 t, S
then -- no transport order for vehicle @$ f9 H" K" U4 q9 O# Z+ C
@.Destination :=2 e; m$ x. A6 e* A+ D! }- T
rgManager.nearestFreeStation(@,track.~);% y: }6 e1 U- D4 x1 L
newDirection(@); # O% L- O: I R" {8 p9 W% i
if @.Destination /= void then
% Y9 K" z& Z0 b5 _7 ~5 C$ H @.Destination.NumReservation :=
; X8 O( r: S, q8 w B- f% Z% Y @.Destination.NumReservation + 1;% K& `1 F, @- y( z3 S/ C, |
end;, i/ a6 o" e7 ?; L
@.CurrIcon := "drivingHome";/ \ f& `" u9 X1 _1 L+ Z2 h
@.DrivingHome := true;6 F* m/ b5 M+ L- b4 {2 P7 S; v
end;
5 q! Y+ P: o0 ^( h. r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 L8 y1 z0 |4 `6 s part := @.transpOrder;
; [* ?5 i u7 u; W% G" b4 F4 r6 l. { part.move(@);-- load part
9 Z0 T& x/ W. C9 a @.CurrIcon := "load";
2 m2 S0 \" E0 P5 } GlobalDistObj := part.globDestination;
: j+ r5 L" i# K' |) A, W assignLObj := rgmanager.rgAssignL;! ?+ ~, ^% s+ _
row := assignLObj.getRowNo(GlobalDistObj);
! O& h6 E0 J( W# L6 R: e if Row = -1 then -- since 70
7 T5 B6 q- h6 h5 o$ q! y" [ if lan=1 then
) s) j- k* p1 w w7 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 W" I! ]& T5 o2 ?( ` to_str("in der Andockstation: \"",?.~.name,"\""));- C6 e; B, \2 j9 Q. H& W
else4 S, L8 W- d& d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; K& q, o; A6 z3 @
to_str("in docking station: \"",?.~.name,"\""));
! ?; D6 r6 o9 [4 ? end;8 R6 j, }/ j& h& P
else
; y( ~6 @ \ d( ` @.Destination := assignLObj[1,row];& d$ M) P1 K$ |; x
end;
7 s3 U2 K' a# w+ b( y newDirection(@);/ d7 l# m' X. P2 }
@.HasOrder := true;! e. Z5 B" E2 A0 h6 `6 \
end;" Z7 ^' u& W5 V9 a8 u
end;) l4 \& p% U4 W( T
end; -- of the method
# L% ] q; Y- h7 z) F n |