/* called by: entrance ctrl of the object 'track'2 \$ _6 W+ @9 Y
*/5 \2 z8 l1 r# U
is
7 A* P( Z( \& [5 l8 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;, p+ k8 v1 P8 V
do/ Q: c" O5 N/ n* D' U
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 \( q4 w' {1 |1 k/ g if current = @.Destination -- else return
) _$ D% K: y; _! B# Z then
8 l- O' g; `% h/ Y6 D, f0 T @.Destination := void;
, s2 R) @. X, |1 C0 Y2 m; W if @.occupied then
: }3 X! c( l$ \% b9 w- z. H part := @.cont;
, t5 p c! b# R# T @.transpOrder := void;6 H7 d; i2 T; c! ~( I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 d3 K2 X; D: @0 {4 B
@,root.eventcontroller.simTime);
( n0 ` F; s8 E/ h# v0 @ @.HasOrder := false;
5 g6 i9 ]+ d1 b5 ~- H" N% b3 V @.DrivingHome := true;: v. z) n' j6 C9 @2 ?1 L
rgManager.tryToStartTransOrder;: e2 T1 B8 }; [9 q7 H
if @.Destination = void
! f# s) x# i$ I, K* L8 I, s then -- no transport order for vehicle @3 Z1 L# [4 X; x0 t9 j4 Z6 P2 Z
@.Destination :=
; C+ H2 S8 y9 x8 S) n6 D rgManager.nearestFreeStation(@,track.~);
& f& G( c' f* L* r* l! X newDirection(@); ' |3 `$ f J( w
if @.Destination /= void then
+ u; v; f7 `7 g8 i @.Destination.NumReservation :=
* i. u9 C! T4 F2 P @.Destination.NumReservation + 1;
6 v3 j% o; m& {3 w7 g3 k! W end;
$ G2 S/ O! _6 a' q1 f @.CurrIcon := "drivingHome";* T( s. i* J6 Q. E, L& c
@.DrivingHome := true;; h4 G6 Y# J$ g
end;, l6 F8 s7 }3 d" m, b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. s: h; Y& U4 w6 z
part := @.transpOrder;8 j& Y1 t: Y& @1 t
part.move(@);-- load part- ^4 `3 D. J0 ?0 h" R3 [
@.CurrIcon := "load";
4 Q o d; @" x; i GlobalDistObj := part.globDestination;
. s% l% ~! C& ~ O9 Y: C0 }: z assignLObj := rgmanager.rgAssignL;
. Y0 \9 [' `. U- e2 v: l/ n1 w) ^) P row := assignLObj.getRowNo(GlobalDistObj);
/ _" v) I( R) Y* r if Row = -1 then -- since 70' d+ ~! J" [# j
if lan=1 then0 T6 z2 i+ P1 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: p' I# D* b I# C6 z
to_str("in der Andockstation: \"",?.~.name,"\""));
3 x- o/ I8 ]. @6 ^& G else7 |; ]8 u% {' t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ]* y0 ?" l( X. b( O2 K% d# u to_str("in docking station: \"",?.~.name,"\""));
$ _7 z$ l) B! y2 j end;
- A! y4 X$ F$ q8 { else
, I Q ]$ V5 O) O! \ @.Destination := assignLObj[1,row];
3 U! ?- _6 t, e* L8 r" C$ n( Z end; ' \. j- _' r6 ~0 R1 j
newDirection(@);6 _- J, N2 |7 s& J) V; [0 B1 R
@.HasOrder := true;: d. K6 H7 l, ^4 M; ~ U2 z% Y
end;
7 t: H, w$ D. W3 \: }+ u; D4 r end;
( A, t3 F9 J, Pend; -- of the method
1 e) b; w/ p6 D$ S1 h |