/* called by: entrance ctrl of the object 'track'
) _! a+ W. ^" V- ]4 e; g" Y*/; ?! [; b/ ^* m/ s& g9 ]4 j6 U
is
, Q4 s; e& ]% B$ p part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ M9 {% }) z( X
do( {& }5 Z3 c6 d8 w7 H: s" Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ W& f9 N8 R+ Z5 i, F. H if current = @.Destination -- else return
- o3 E) s/ j7 g6 t1 s5 p* C+ w then
1 { t+ `" S* q- S, B: G. { @.Destination := void;
" Z* F3 O2 X& m& p; E if @.occupied then
; a. y7 o. z. w3 y6 A part := @.cont;
% N3 W3 ? W& z @.transpOrder := void;5 c" W& F: M W6 @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ^. P/ `. o) X" e& B0 r. O; L @,root.eventcontroller.simTime);% {4 ?5 ^: U3 W o8 s0 }
@.HasOrder := false;
- C6 x6 G) E! g4 y @.DrivingHome := true; s% i! P- ]$ `
rgManager.tryToStartTransOrder;2 u! Z; g5 c! t6 F7 }
if @.Destination = void! z/ p. ^! v a; L1 ~( K i
then -- no transport order for vehicle @
; V2 O0 B. F& M. A& G$ w7 r# D @.Destination :=/ k7 ]; v* h3 ~2 O1 b
rgManager.nearestFreeStation(@,track.~); e. [( L9 X$ ^
newDirection(@);
# _1 ]! s0 |7 p* ^/ n9 P if @.Destination /= void then8 u7 L6 w, d# E' T7 U
@.Destination.NumReservation :=
* A+ {( ~& d4 F, _; Q- {4 Q @.Destination.NumReservation + 1;
% ?; w, `& L& E1 D: v( b end;
; _ o) W+ M( ^! { @.CurrIcon := "drivingHome";
* u [$ J* b$ e1 a$ r @.DrivingHome := true;
- ^- r# S6 p4 ^+ C4 ]% i- d end;+ J' _8 I% o; l1 z1 A+ @. g: I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 k* n& X1 k9 b/ K' b3 f7 J" x% R
part := @.transpOrder;
$ ^) H+ s0 T8 c, e! h part.move(@);-- load part- q& i$ h A: ]7 o
@.CurrIcon := "load";. g3 x& Z) j' h
GlobalDistObj := part.globDestination;
4 d) m: [; Q' | ^! \, d/ _8 V assignLObj := rgmanager.rgAssignL;
! J" k, @3 ]5 `' F L' K row := assignLObj.getRowNo(GlobalDistObj);; {% I* Q! J; D, }) U+ Q
if Row = -1 then -- since 70- b2 E0 W' _5 Y0 o3 i' _3 M* e2 \4 y( ~
if lan=1 then/ P" k5 h! E! f" m9 i( q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ z; } d4 u' t$ r* S3 c/ k/ ^
to_str("in der Andockstation: \"",?.~.name,"\""));
6 V, y$ s$ Y# W) C" p else* K/ ], n0 {' q Z5 h" m0 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 h0 I. Y9 L/ R* {" U% D. t$ G7 j to_str("in docking station: \"",?.~.name,"\""));
+ p8 N7 Q* G5 X/ X end;9 J" l, P+ T) p3 b9 U% d+ V
else
6 t& d" b* N* [ p0 a- n @.Destination := assignLObj[1,row];: L% ^* E& X" a4 v
end; 7 s& s) s" y+ P5 j$ L. ^, g
newDirection(@);: K) j0 i0 z9 l' Q/ y+ `+ x' O
@.HasOrder := true;' T# i$ `/ e. W0 y% r6 @( F
end;: R! G# }7 N% J# q8 {
end;
) @3 g5 `5 Q8 C! zend; -- of the method/ s# G5 m% j* f9 s
|