/* called by: entrance ctrl of the object 'track'
. i- Y" ]0 }: B, _+ o*/( w4 P% Y) M0 t5 l0 ?2 x
is
; Y o1 ]) V( v3 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 H- [: p' A( ?: pdo# W" W, h: ?1 u; `0 }' v% t
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 ~& k2 F1 j6 I# {: o9 o3 G if current = @.Destination -- else return
) c& [) ]! Q3 R3 w then) J7 S& }8 J' a
@.Destination := void;1 S; X' y# X1 G4 `
if @.occupied then1 r! m% r, W, Y! B
part := @.cont;
, ?' ^# y ~" M# u8 {( u @.transpOrder := void;
2 _5 u% }7 |( e/ k* B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 m) {- H& X3 ?7 M! r. W4 \" T @,root.eventcontroller.simTime);& _0 r9 n( o1 U0 s
@.HasOrder := false;: A5 n% G$ [6 }
@.DrivingHome := true;! O+ M% ]5 m) u& L9 q8 p
rgManager.tryToStartTransOrder;
( i @( E& s9 o, j% b if @.Destination = void
" m! l" q" M1 I. R0 w) h then -- no transport order for vehicle @
Z" G& \3 |" o8 e- u8 Z8 T% U @.Destination :=. }: `& k, J# E) h* d4 d' m
rgManager.nearestFreeStation(@,track.~);2 ]& A% O# u9 D X/ i
newDirection(@); . i( {3 Y3 r' w9 i% `5 K
if @.Destination /= void then5 p6 V7 j' s4 j9 x
@.Destination.NumReservation :=
1 `: h! L& K* q9 ^- r1 H$ {- Q @.Destination.NumReservation + 1;
- ^! X, W. w7 e# g- j- E# @ end;2 J4 t/ _# S5 W+ E$ Z, n
@.CurrIcon := "drivingHome";
9 ~# d0 k L5 t) Z7 B; e- I @.DrivingHome := true;
! P5 [. x' ?. x# N" O end;
7 F, `$ q9 U( ?" ~2 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 o h9 ]- u5 [; S* S( V
part := @.transpOrder;0 I- d" @5 y. u- }) C" b8 @" n0 Z7 ~$ W/ U
part.move(@);-- load part& ?* G% s) [; Q0 |' X) c
@.CurrIcon := "load";
+ E% N: E7 M. S- H GlobalDistObj := part.globDestination;
. x* N/ `% Q+ o+ @( h assignLObj := rgmanager.rgAssignL;+ O( K! e" [4 z. f: U
row := assignLObj.getRowNo(GlobalDistObj);) a o# |" P) B; L" w: q' W. }* C
if Row = -1 then -- since 703 i9 Z# ]" O6 B' A6 M2 k
if lan=1 then8 C: w. B* @3 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& t! S9 ~+ O' ~3 v6 T- d to_str("in der Andockstation: \"",?.~.name,"\""));
! ?% b5 N, \* } else- f- J2 S) Z* y0 N8 r' T3 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 K/ o* W- \. U! ?- _7 L# s8 |
to_str("in docking station: \"",?.~.name,"\""));
, Z+ a( |- y: {8 u b! [. O0 Z end;
$ b& ]# }5 t- X# ]1 | else+ ?# \9 f2 O( S* f; ^
@.Destination := assignLObj[1,row];
4 J+ Z% p$ g2 v end;
: ^& K" k. x5 A' ~$ E% Y8 I newDirection(@);
( e1 o0 Z$ X! [8 Q" r4 W @.HasOrder := true;
9 ~/ v. s. D) v: R& C6 v$ f' e. |* Q end;
2 g9 f: }5 E+ H1 Y end;
* \+ e a' i" Z, y8 j9 Kend; -- of the method
4 {9 F6 P/ ^% D( B! | |