/* called by: entrance ctrl of the object 'track'# D! W! ?# a5 [6 ?! j+ u
*/
- i6 M2 t* m+ q0 zis
7 v9 q# u7 N) W9 J2 G+ c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 ?5 o/ d+ g! m* e3 A. Gdo
! a# b* [3 u! w9 w3 l1 P1 q Lan := rootfolder.Internal.Tools.AOLlanguage;
3 I1 r* k$ q" j! a if current = @.Destination -- else return
! |; G! U, g/ x* j% i" g2 z then
/ c% @1 z+ b \5 |5 o% L @.Destination := void;: C% |4 a2 b: V7 ~ [9 h
if @.occupied then1 X4 z! K* V7 b8 X
part := @.cont;
% U+ Q5 g7 |6 Y$ \- q* `5 s @.transpOrder := void;; G1 N$ f% u# ?3 ]" ^. X1 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ v) W, i9 E5 X9 p5 `
@,root.eventcontroller.simTime);
W9 u7 q9 f+ T( T; ?" [ @.HasOrder := false;
9 R; O% y& r( C E @.DrivingHome := true;! Y/ K* c Y" I# O
rgManager.tryToStartTransOrder;
3 _+ A* p- E, `! A' B( b8 }9 H if @.Destination = void
& ~9 q# P1 v0 _3 D2 x/ R then -- no transport order for vehicle @
1 B2 r8 n& J. L& W8 m @.Destination :=
Q& N" l' H" | E' {8 S; O+ h0 m rgManager.nearestFreeStation(@,track.~); \. u$ b7 P3 h' v7 u2 \4 c
newDirection(@);
" G' r9 d% G) [, D# W1 j" I if @.Destination /= void then
8 L( W- k x0 l6 w @.Destination.NumReservation :=
, T* w/ m- R" [' y- S- b9 t) k @.Destination.NumReservation + 1;
" K5 C" Q, Z" p f9 e. P- G2 G end;. v/ [) j% @- ?" A8 r
@.CurrIcon := "drivingHome";* U# h. [" U# V" x) Y! w& i7 d* o
@.DrivingHome := true;
$ H( v- x+ Q1 d" ]' ?, W end;
6 ]7 N* H. g0 y/ O6 k7 } R4 q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( h; f9 A# k0 i. H' g3 M4 | part := @.transpOrder;% H& q9 y0 f" R. d* q
part.move(@);-- load part# Q; O: s% v! O
@.CurrIcon := "load";
" W$ ^# i4 j/ L3 t* }3 @ GlobalDistObj := part.globDestination;
' b, Y5 |/ p) W& n. | assignLObj := rgmanager.rgAssignL;% b; A+ `9 g" E/ P( r' D/ g
row := assignLObj.getRowNo(GlobalDistObj);6 n, Q. \" t* s
if Row = -1 then -- since 700 Z4 t0 h1 y, M5 F" G
if lan=1 then/ _9 m0 v8 p0 ^3 y; V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
A% X3 v9 w9 R9 \, |2 ^: G to_str("in der Andockstation: \"",?.~.name,"\""));) J* S3 I. `) x2 s, |* f( x, e; n! Z
else" Y" w% h1 l& [) D6 W& T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 f6 N2 s/ I, C a% w
to_str("in docking station: \"",?.~.name,"\""));
* z& K# ?+ N9 }& B8 B9 P end;6 f9 [/ x* Y L' I; |$ A" @0 l
else
+ h, {" E5 t, j6 c7 ?9 G @.Destination := assignLObj[1,row];
8 {2 w# o, U3 e7 F2 o end;
4 O& F5 G( k: a0 T newDirection(@);
' A: u! s/ M. u) }1 L' [" T @.HasOrder := true;( a3 B* s2 k; e3 B8 ~
end;2 m- C" Q, e4 |/ _9 ~
end;
5 G8 C) [; ^. |7 y; [end; -- of the method9 X; j6 o8 d6 r* |/ F
|