/* called by: entrance ctrl of the object 'track'
2 t/ d' W$ q4 o% R*/
- a0 O5 S) {) D: U/ Iis, v) S6 t. m1 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" v6 |2 g" e& E, wdo
N/ A8 F1 T2 U+ ]( y4 S Lan := rootfolder.Internal.Tools.AOLlanguage;: U& C; Q. x# c' a
if current = @.Destination -- else return; f3 W$ v+ i0 D: L+ }
then
1 M" T* X2 \+ B @.Destination := void;1 R9 ?, l V5 k( t: B% R
if @.occupied then
& ~# `7 y2 i# J6 d. @4 `" R part := @.cont;
6 E8 Y5 ?9 Y/ q+ a @.transpOrder := void;
" d7 q' A1 E2 { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% r! }& p. j4 W! P) }
@,root.eventcontroller.simTime);
: _# Z2 X; F, c @.HasOrder := false;& U, T0 M$ f4 t: {0 ^- T
@.DrivingHome := true;
+ O, b& r+ \6 J4 `3 L" K& f rgManager.tryToStartTransOrder;
/ U* t( W# G7 B+ h if @.Destination = void! G4 |8 i& w: [' a1 m& w5 B3 d7 g
then -- no transport order for vehicle @: q1 x J1 ~! B. q$ ?) Y
@.Destination :=2 [: p1 T. [( R
rgManager.nearestFreeStation(@,track.~);! f, {/ f; H1 i) _
newDirection(@); + t x0 g4 t3 T3 @9 `
if @.Destination /= void then
4 u( X5 _. G7 D( R4 X8 U @.Destination.NumReservation :=0 z% B' }7 c& v0 i" o& s+ b
@.Destination.NumReservation + 1;4 [. B2 ?6 J: l
end;
; B1 l- H8 H6 O: ]9 x @.CurrIcon := "drivingHome";; A; l& C: w9 K% n
@.DrivingHome := true;# X0 K A& t+ W$ c( n! o# u
end;& D `- U+ d/ W1 E* ^& g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
~0 J; l) f3 @3 F" }' N5 ~ part := @.transpOrder;+ A# u4 q7 }( i8 ^
part.move(@);-- load part. W/ `: d7 U+ H2 z: v% m, D6 Z/ y# h
@.CurrIcon := "load";
: v9 R( ~& B' R% Y& p+ l2 U3 [9 V GlobalDistObj := part.globDestination;
; j& c- {; y; V% A \ assignLObj := rgmanager.rgAssignL;$ r7 B8 J$ n+ V
row := assignLObj.getRowNo(GlobalDistObj);8 P) D- e/ U0 {- _; u
if Row = -1 then -- since 70
8 z* E$ X9 L; u! d if lan=1 then( a1 M6 a' e$ \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, K, F: S: x0 W5 g to_str("in der Andockstation: \"",?.~.name,"\""));
& A$ v8 s3 G/ ]' r! D else- s, T, s. X: b) R) P; J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 K5 f- K0 e4 s) r
to_str("in docking station: \"",?.~.name,"\""));
- Q* G/ O& s& l8 ] end;( O# b- C7 J+ H* f& M
else
) `0 E# q+ \2 Y- a/ ^ @.Destination := assignLObj[1,row];
, H8 l3 J4 [' o0 z* q end;
4 H$ S% P5 l+ F9 n" y9 `; [5 G newDirection(@);( e# w P- Z1 p$ q
@.HasOrder := true;
/ }% w7 d/ n3 f end;
% n1 E. f L9 ~6 r. c end;
+ ~+ D! M" x; R- O( i% _end; -- of the method) Q' \$ g2 f |+ |1 v
|