/* called by: entrance ctrl of the object 'track'3 ^5 ~0 |1 M# E9 |
*/
! r. N _/ _& {7 U4 b1 C0 k# Ais
1 ^' I5 a* S( E; q! \% L part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 d, \2 O7 A, g8 i
do
5 E( r* p2 B9 r2 G! y Lan := rootfolder.Internal.Tools.AOLlanguage;
/ U/ l3 L( q8 `6 ? if current = @.Destination -- else return1 R9 l3 l* b P9 G9 f4 H
then3 ^0 }# Y3 B& G! a! d3 _
@.Destination := void;
9 l0 r/ H$ A, ?' n if @.occupied then# j8 J) \) W" X+ e5 p" |$ F9 b: x
part := @.cont;0 f0 T! Q6 m3 g& f6 |$ O+ k: q, a
@.transpOrder := void;) Q* I2 f! ?2 D; j3 Y8 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 R4 a" I; g, |3 ?. H' ~0 Q8 o1 J @,root.eventcontroller.simTime);
: n d8 g) d7 X, }& I @.HasOrder := false;
5 U6 R/ ~. ^. Y9 e6 r9 ~, c3 D @.DrivingHome := true;; V; @9 l# `0 F0 h
rgManager.tryToStartTransOrder;3 b+ y% d G( y4 n3 y4 [5 d
if @.Destination = void. P. j( y1 S! p' N# c
then -- no transport order for vehicle @
% i2 y, b+ S) A+ i" G( m @.Destination :=
' T7 w5 }' l$ r+ a rgManager.nearestFreeStation(@,track.~);8 e: z N9 ?# r i* s b" M" T
newDirection(@); 3 s' e/ B' S- i$ J0 z1 `. ]& W
if @.Destination /= void then
) D& v8 y: M, ^! d, n @.Destination.NumReservation :=
2 K& u& A. O- n4 _3 p# `! m, { @.Destination.NumReservation + 1;
& N# @0 Z7 ]" V0 R" F* t end;% F; n9 b9 Q" i- J @- W
@.CurrIcon := "drivingHome";* {2 z5 W5 |9 Y4 ~* A, J$ H
@.DrivingHome := true;6 R+ l. ^- }! l- o2 j8 a& ]
end;
9 a. \ G2 y/ c& V9 r( `: l1 B# ]7 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 N( ~! \3 j1 q0 L3 e/ ^ part := @.transpOrder;
! ]* @8 c& P% u! r; r" ?* X; |' }2 i part.move(@);-- load part# n7 c# q+ \ n1 R
@.CurrIcon := "load";
/ T# i0 q$ e& \0 X GlobalDistObj := part.globDestination;
2 r! @% z0 u0 \1 o ^0 w' H, \6 d/ d assignLObj := rgmanager.rgAssignL;' v! H4 P" i; `5 X& Y
row := assignLObj.getRowNo(GlobalDistObj);9 |. e/ _+ E& m: S, P4 `9 U. @
if Row = -1 then -- since 70
% Q- R$ L4 X4 b }: ` if lan=1 then0 j; X: J7 o9 @6 V/ T2 x5 m9 @8 W+ d$ \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), {5 f: q% C! P" d$ _4 \
to_str("in der Andockstation: \"",?.~.name,"\""));
# \ B% S( T% w( R else
4 ]+ I* F! G* Z' J3 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) M! c1 W) @: J! m7 W. Z1 a: L to_str("in docking station: \"",?.~.name,"\""));
% P4 U2 ? ? t- ^ end;+ k' v: P8 m9 s9 Y7 k' i" F
else
) ]- i6 X: X+ D' f- D @.Destination := assignLObj[1,row];. q' u4 X8 z8 m6 V9 g, i
end; $ {( M7 }( o' i# @1 Y8 r* D2 y
newDirection(@);
" `" C1 B4 L6 p4 U: L8 v- c% } @.HasOrder := true;. x0 J M% @, c" }5 Q& C, w5 X! u* O. X
end;
+ u* v5 j6 z3 r: Q end;* d3 E# X* B; T% r
end; -- of the method/ c; V0 E" h% q* r
|