/* called by: entrance ctrl of the object 'track'+ b, P! ?! T1 I( m# m3 j6 e
*/
, K5 l) Z" T0 n6 Y$ k9 N7 Z; ?is5 x+ t5 k: j/ {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 H# x9 l6 p% D' C/ v3 W
do+ q9 S. `% K3 T9 V4 j a) i+ F( k
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 H1 i, `/ _: Z2 k2 [ if current = @.Destination -- else return
7 W$ C6 X- V0 ?/ c then
. X& y+ u2 R8 t3 R( k9 x% [# r {' G @.Destination := void;& Q7 T1 i+ n- F- d. _$ N
if @.occupied then
2 H8 i# d4 Y* a0 `; n7 l7 X part := @.cont;/ C l) \3 t) ?( f6 z7 A: d2 \1 S
@.transpOrder := void;
' H1 U" c2 G: h- G# S' j0 E" n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 `- o* T3 [& R* @' }3 K& w
@,root.eventcontroller.simTime);& W1 x! }: f2 m: `' Q% f' v. ~9 q2 f3 I4 h
@.HasOrder := false;
$ t$ R6 ^; C& \1 q, H# }, A @.DrivingHome := true;
& F6 W; b- K# R2 Q" w- W rgManager.tryToStartTransOrder;) K" b- p; M" N* h' ~3 D6 V
if @.Destination = void, o: {0 Q, A4 O4 w" G* `, G! ~% b
then -- no transport order for vehicle @
5 @( b8 d2 O, u6 |* _: R' p @.Destination :=) I- }4 m9 D+ A* s
rgManager.nearestFreeStation(@,track.~);
, ~" y. e# z' r' [* X$ B newDirection(@); . i/ A% U- L3 [
if @.Destination /= void then
$ p7 H/ z1 H& f) b @.Destination.NumReservation :=$ D7 p: V$ e1 r
@.Destination.NumReservation + 1;
1 h; E" s, M% e3 k' z0 h s end;
1 }" Z. j' I1 }4 B @$ t* L @.CurrIcon := "drivingHome";
; `9 _/ s W4 `! Y @.DrivingHome := true;
# d" s6 N+ i+ d% z( \$ e end;" B+ l7 m7 x! Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 N+ G$ m/ k8 b7 R; H part := @.transpOrder;
1 c O/ D" h, S part.move(@);-- load part
% X; n7 U& _$ M" ? @.CurrIcon := "load";
; R5 f8 s' j% g* W/ v0 r: `) G+ @ GlobalDistObj := part.globDestination;% U4 v( u' Y; q" M
assignLObj := rgmanager.rgAssignL;
2 ~' ~9 K: a6 ^7 U0 j" ] row := assignLObj.getRowNo(GlobalDistObj); D' h6 B* o8 \# k) z
if Row = -1 then -- since 70% }0 V# w1 G5 u9 q0 M$ k
if lan=1 then( T9 g& x9 n* N4 V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 ] K; K- l5 t8 I8 C
to_str("in der Andockstation: \"",?.~.name,"\""));
J% ?% s- \! k5 o% B else
. Q. r3 O% f3 L$ w+ e: U x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 W( v( _" N2 {4 \6 ~8 f! T% J
to_str("in docking station: \"",?.~.name,"\""));
- e/ ?9 \* ~) m" f U: o S end;! \9 n- t3 |, E% M! s3 l
else6 ~& |' N% b9 ?) o. B! D% `; m
@.Destination := assignLObj[1,row]; j3 s6 q) T9 Q/ _& Q# g, c# m
end; * l6 \$ B' Z# i+ Y, r* t( Z& w" o4 R
newDirection(@);
& S! ?: m2 |4 M4 ~. P- b$ |# O% c0 q @.HasOrder := true;
4 a1 R& P; R5 ?; J4 y. `; D end;
4 `1 P' R1 y! h' n end;) b1 u+ _, A4 V+ o. }
end; -- of the method) ^5 e( _0 p5 E Q$ R
|