/* called by: entrance ctrl of the object 'track'
& N; \3 f4 G C*/, L" j( ^% d1 H! `0 f- f6 v4 Y; L
is
8 d' y6 F( y- [1 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;" d6 R- X" ?6 [5 f* q
do3 x4 N. m2 k( L; Q5 `/ x4 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
% x$ [' C1 r; J4 V$ v5 k D6 B if current = @.Destination -- else return; ^1 w: P( S& k1 J3 m3 v
then
0 a8 R- L- |. c9 [, [ @.Destination := void;3 F6 ?0 i: r. b3 V
if @.occupied then- Q; g) ?- a% I# L( i) J
part := @.cont;
/ {) P' O$ f9 g" f# b @.transpOrder := void;/ t) `4 ?1 f$ q$ j4 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. Q A, }3 Y2 c! c4 T8 z' a- L8 h* f @,root.eventcontroller.simTime);
6 ]1 z9 q- b* e- D& T7 y- e @.HasOrder := false;
* `1 c6 n% Q0 v. J: L3 N7 @- }% | @.DrivingHome := true;
6 o9 }* r5 v0 Q% O# s( P rgManager.tryToStartTransOrder;' r6 E/ Z; O1 L5 `
if @.Destination = void
3 E* d& f! p& o1 b' r5 } then -- no transport order for vehicle @3 w5 f% p6 o) R+ |0 O
@.Destination :=
# | u5 B" h2 j4 \" M3 J3 A rgManager.nearestFreeStation(@,track.~);7 ^ z6 ]4 ~7 b2 T* F
newDirection(@);
4 r9 ~3 q# @% S+ z2 f* I if @.Destination /= void then! e/ Z7 [4 R" d. L6 N) B& _
@.Destination.NumReservation :=
: r4 c6 h- v1 s5 j% {. b @.Destination.NumReservation + 1;, Y5 ]2 j0 Y# O1 \0 R6 m
end;& d! s/ F) T- o% L9 I: l, j# J g. j
@.CurrIcon := "drivingHome";- P4 H- g0 [! i) r
@.DrivingHome := true;/ L8 o; H$ q z; e+ Q
end;
/ j+ N- \) x7 g, f8 y8 R+ w else -- the vehicle @ is empty, both vehicle and part are in the same dock station# @- X0 e$ z1 G: ]
part := @.transpOrder;: K) X6 ]# l+ j; W5 W# K0 V
part.move(@);-- load part
3 i2 u! g( j- ~ @.CurrIcon := "load";' z" c, s" C" y6 J; D( Y* `
GlobalDistObj := part.globDestination;
8 L' K0 s3 n7 V: J- B$ A assignLObj := rgmanager.rgAssignL;
- Q0 i# }" N+ X) d- Z- c row := assignLObj.getRowNo(GlobalDistObj);
% z- g& @& ~" O# A if Row = -1 then -- since 70" p$ v& m% { O" B8 i. t/ d' O# S
if lan=1 then6 u( {$ s+ P; D `1 o' S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 v' E# f+ b; K to_str("in der Andockstation: \"",?.~.name,"\""));5 B0 g3 }4 s) K& x
else
% u' ?. _% ?0 F$ C/ W: ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& z I2 J$ O5 [+ ~3 n6 o4 a! e
to_str("in docking station: \"",?.~.name,"\"")); 2 r$ M1 H. R) J) o$ b; O: V+ E
end;$ H5 F! }( w( Z( I
else, Q5 b7 N8 o# I" G, `
@.Destination := assignLObj[1,row];
6 K7 c+ `4 M$ B0 t end;
" s/ ^' ^; I/ |1 j( G newDirection(@);
2 ^4 T2 ^1 l3 Y9 o- R @.HasOrder := true;
* c! U6 k8 {- e; ^ end;
% k: e3 U% N- b& o end;4 j* W3 d( c; G( n" j8 B* n) C" q# Y
end; -- of the method# I% ]. r1 \0 }2 G9 O! l2 N/ T' L
|