/* called by: entrance ctrl of the object 'track'
# P8 A# G' Z: ?7 T3 ~*/
0 ~& B8 X [' U o; Bis
7 ~! K7 {7 H5 g# l- u part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 J+ k; @; m- b/ v8 }
do& L" z3 r; z* u! C' @0 W
Lan := rootfolder.Internal.Tools.AOLlanguage;- v+ m7 q. U* s$ Z* \
if current = @.Destination -- else return
' w U# U; W- P: ^; e then
% k; ?5 B- K% f* H @.Destination := void;
0 N( {' _3 F& r' e7 g if @.occupied then
: t! F4 E' e4 _- h0 L# h3 Q part := @.cont;: Y9 z4 V- y7 d& v$ a: K1 V& ]
@.transpOrder := void;% q$ J% [2 w9 T x5 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 J5 c( d q0 S2 F( T8 } @,root.eventcontroller.simTime);% T% L0 J, _! |$ A$ l6 p
@.HasOrder := false; E+ z9 D$ G3 ?- `
@.DrivingHome := true;
0 d8 i1 }# O5 y! K, J rgManager.tryToStartTransOrder;
* t8 r w- y* z* t2 G" S+ O8 r if @.Destination = void0 F) J& ^! B* @. u) r
then -- no transport order for vehicle @+ [1 M' s: j |2 Y
@.Destination :=
{7 N! X0 r: ^- _! u rgManager.nearestFreeStation(@,track.~);5 ~2 n1 ^+ i$ x9 D x5 A+ g
newDirection(@);
! i2 g, x; b& e* R% X if @.Destination /= void then; o( Z" \" [$ @! s2 P# O8 l
@.Destination.NumReservation :=
& C. D9 e8 s9 Z* G @.Destination.NumReservation + 1;
4 H7 M+ ~7 n& B S1 S$ x. N/ z6 a end;9 B4 B0 j2 F5 }/ z
@.CurrIcon := "drivingHome";+ J* d" d* l6 j& x* z+ Z
@.DrivingHome := true;+ r9 U9 [, Q: X( J7 J1 M
end;
5 B. Y( G: G$ P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 C* J; A. ^1 z, C2 o$ [- r+ x9 K5 _ part := @.transpOrder;, X4 L) H- g: p. y" f( ?
part.move(@);-- load part
3 G! Y3 n0 X& s @.CurrIcon := "load";; ]2 p0 a/ y0 D! P8 l* K
GlobalDistObj := part.globDestination;
, L# q0 r6 j O- J! d" U assignLObj := rgmanager.rgAssignL;
1 v" I( s" G, Q1 J9 [ row := assignLObj.getRowNo(GlobalDistObj);
6 x% n+ ?* w, \, F* |% Z if Row = -1 then -- since 70
( ^1 r% U+ Q& b7 f) T if lan=1 then
5 r7 x& @; G8 S t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! f7 t% U8 I7 Z7 O; H+ q) R to_str("in der Andockstation: \"",?.~.name,"\""));
) U0 b5 f# E. U/ {! z7 K1 q else9 k* G7 z' G. O" I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* h, X% j/ {2 @6 p$ `" S8 R& q) ?
to_str("in docking station: \"",?.~.name,"\"")); / R/ n3 q) M: o' o b
end;
& T1 Q' w% E d) ?. @1 F else
9 K4 M6 ?/ X3 V) O, y @.Destination := assignLObj[1,row];
1 m% p5 ]$ N2 z end; 1 @2 s/ ]1 K! s4 \2 p
newDirection(@);
% s4 r/ p. L* C& ] z @.HasOrder := true;
+ _3 F0 [6 Y& Q; _9 ~7 F c$ c# x end;
! q" O9 K L0 L+ d9 p- b7 M6 p end;
0 R4 m8 m2 {1 D ]9 Iend; -- of the method$ x% \, ^# W7 l! B
|