/* called by: entrance ctrl of the object 'track'1 z) e% P0 n; Y- a
*/3 @0 Z+ C0 ^) o( O' s g, A
is8 d# @" p8 k3 T F7 ]0 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; N- C/ K9 T) A- T+ H% s7 Gdo
' r3 e' m' f9 X% k8 Q' z7 _9 A Lan := rootfolder.Internal.Tools.AOLlanguage;
$ G# ^) M! s/ `# I if current = @.Destination -- else return
- s! a4 l2 T6 K, c+ V1 B. P, G then/ j% W/ B6 ^ q5 n' E$ q$ ]5 S
@.Destination := void;
3 K2 P, b) ~" A0 R if @.occupied then8 D3 R& }# g7 Y- Q4 m$ K) g& q- C7 Q
part := @.cont;
" s8 \! p. D' h+ m! s @.transpOrder := void;
; x R4 B& i; I& Z. C0 a8 s) ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& S) d a, O9 P/ l# G8 I
@,root.eventcontroller.simTime);
3 c2 A/ j8 [- h. T @.HasOrder := false;
9 w9 R- H4 g" u' l @.DrivingHome := true;
# o' ?: s8 v5 ~/ W% D3 k9 Z# B7 L rgManager.tryToStartTransOrder;
7 b- B9 R2 a. B$ a$ g1 V if @.Destination = void
* l6 q& ]( `3 M2 W then -- no transport order for vehicle @7 Z' C0 ~. d8 ]# \* b# d
@.Destination :=$ ?* ^/ R5 r" K q7 J7 R9 v
rgManager.nearestFreeStation(@,track.~);
0 h" C1 m, h( t" W( l: i newDirection(@);
; p6 a" i. P, P if @.Destination /= void then- D: y+ A; z/ x# |
@.Destination.NumReservation :=
$ J8 q% f: N/ H- W @.Destination.NumReservation + 1;
G4 d: e0 E- u. H end;7 l) `1 v( }8 o& f/ o
@.CurrIcon := "drivingHome";
* r# k/ @8 \1 |' e7 m* D2 i @.DrivingHome := true;
% I- |% X" V( @- j3 v end;7 g/ G R. Y. q: R$ {2 w( t; ~, r. k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: C y: M7 e f, b' Z part := @.transpOrder;+ H9 h- _: R& {
part.move(@);-- load part" H/ C0 j K4 G1 P% b) j
@.CurrIcon := "load";+ L/ }+ F7 }' i" h4 j* c4 m0 |/ z1 J
GlobalDistObj := part.globDestination;6 n% Q& |7 x! L" l7 H8 w- k- R$ @
assignLObj := rgmanager.rgAssignL;- V& W* T; \# |
row := assignLObj.getRowNo(GlobalDistObj);
) p- b. t6 E1 m" J2 q1 _3 t$ l3 L if Row = -1 then -- since 706 {' z1 @4 C7 F% v6 y0 i, o) S5 }
if lan=1 then1 S+ v% U9 D7 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- Y8 {/ ?, T/ |! ~
to_str("in der Andockstation: \"",?.~.name,"\""));
5 ~/ z4 O8 M9 W$ o; e7 j2 x else
! i7 D/ \# ~, i q, y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* Y- z) q I# K1 B+ ] to_str("in docking station: \"",?.~.name,"\"")); * \# {! _' S0 o* r) B' {. Q
end;4 ^" Q9 I% Z( h3 [
else
" c, _; ^" H f: p @.Destination := assignLObj[1,row];
( V' h: J% u5 q; I' A' P- O end; 4 _, A3 s" W$ E, L* c' B
newDirection(@);+ Q- P" x2 d2 L0 G9 Z/ f
@.HasOrder := true;0 Q/ Q; V. u& J+ j0 w7 p" h
end;
9 O1 e- v$ \& y' {" i. Y; n end;
1 Z6 n, c2 }+ V+ Eend; -- of the method! Q5 S0 X- }7 E. [5 s
|