/* called by: entrance ctrl of the object 'track'9 Y8 \) Q, b# \ ?6 \! k5 l8 p
*/6 [; N% h1 l, T! s" P# M
is2 g1 n7 L8 o- y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ V" Z6 P$ U: |$ C4 j8 K b
do
8 D2 E# x/ {! g5 u3 ^" N$ t$ H Lan := rootfolder.Internal.Tools.AOLlanguage;
* e c' I& T" r0 u" n2 y' e* L if current = @.Destination -- else return
) h" ]; o& m! S4 r0 \- n4 g then
5 m: s* s5 s2 h- O) V2 o9 ~1 J5 s @.Destination := void;; x) L, X& |( q0 k+ k
if @.occupied then
+ `) Z1 d# L* u) s* D part := @.cont;2 K' Z* Z6 Y. K
@.transpOrder := void;
, {. C" t# p) S O$ Z' O) J+ n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ u _; c0 [6 D* D$ e) @" u
@,root.eventcontroller.simTime);) O8 r& b7 V& V# t
@.HasOrder := false;
8 p: ]+ I% r% n& b$ V @.DrivingHome := true;
" Q8 m0 P( O+ F4 [: N) a4 { rgManager.tryToStartTransOrder;
. q7 q/ a+ Y. ~. F. r7 E if @.Destination = void( p; B& _( c! Q+ f/ `; [
then -- no transport order for vehicle @* q2 T: I" b* W" g |* u" R9 C
@.Destination :=
6 \; `+ S6 ?. g% l1 @* G; H rgManager.nearestFreeStation(@,track.~);
8 @% e1 Y- {7 l& Z9 E0 { newDirection(@);
& d0 {+ m" b! q% |; C if @.Destination /= void then
9 K6 H$ m2 f( `* R" w @.Destination.NumReservation :=
$ ]" ^5 y% j* T# ]) a1 ^' q @.Destination.NumReservation + 1;9 o+ k3 r$ R/ t% g* }3 E2 C
end;8 j; h6 r6 Y8 m/ v
@.CurrIcon := "drivingHome";
% ]: A) b) J7 S! R( A! ` @.DrivingHome := true;- d' K! n) D* f! }9 ~+ s$ O$ M
end;! G I: i4 n1 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 Q: F7 p4 s9 v0 q" n part := @.transpOrder;
" H/ L. e* s2 t. u+ { ? part.move(@);-- load part
* G( l' J! M/ ~; M/ O! }* G X @.CurrIcon := "load";
6 E1 z; A! z/ D; A. |7 _1 Z GlobalDistObj := part.globDestination;
2 [. [, r# @' p/ m5 r assignLObj := rgmanager.rgAssignL;
6 N3 D* A# H, a$ H' R$ O row := assignLObj.getRowNo(GlobalDistObj);5 V( d( U2 u0 t; x3 F j
if Row = -1 then -- since 70
0 @" \0 i; u6 D- T/ \3 H% L2 n1 z- R if lan=1 then
: }! h. ^( G C6 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 j% j. S# m4 A5 m C4 I
to_str("in der Andockstation: \"",?.~.name,"\""));
- ?: [6 g5 x2 E4 m else d1 K) m% t; g5 d/ ^$ s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! K# s% w, ^6 G
to_str("in docking station: \"",?.~.name,"\""));
* U5 a( m& S: N8 ~/ q3 h+ [1 F end;: D8 v+ B6 F4 T1 e$ P
else
% r9 o) a k/ O/ @ @.Destination := assignLObj[1,row];% X: h5 E4 H6 m) c3 E* c& K% g- t
end;
5 a1 L; \. h& L% _! y% K W6 V newDirection(@);
. e' [* ~# @9 I1 ~- k @.HasOrder := true;
7 `/ i7 y/ B- k, S. J end;
( f6 Z3 h/ H' `/ S4 ~- @- ]* I end;& U7 l M/ `9 S! t
end; -- of the method
" Q9 T$ K" i1 o |