/* called by: entrance ctrl of the object 'track'
( D: H6 _6 I0 ~# R$ _8 ?*/" T& l' ?% P8 o& s
is
7 i* d8 _; L% o0 l1 l8 R. o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 K" O' S; x% q, ~do+ v, l3 f) n" p# W2 f) L4 a1 J, {- C
Lan := rootfolder.Internal.Tools.AOLlanguage;. f* A# Q, q. G6 s* W
if current = @.Destination -- else return! T! E: V$ p) A5 G( O8 c. O- y
then/ x0 S: t6 A; r2 H
@.Destination := void;7 B3 d$ o( I; l* L2 S: ]1 Q) Q9 T
if @.occupied then
9 f& Z, g0 e+ T* N2 G part := @.cont;9 e) j1 q+ o( L) l+ M: U1 M
@.transpOrder := void;. i$ s- k9 @; x, L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! v/ O" B! N0 T+ l
@,root.eventcontroller.simTime);* s, ^/ F4 P, @+ I4 r4 u
@.HasOrder := false;
* S* F' ]2 ]" v0 D7 L' J @.DrivingHome := true;0 y; Y) B8 ^! S5 S
rgManager.tryToStartTransOrder;
/ s* y* X( w2 L( a* t: S I# {7 } if @.Destination = void# d+ z6 Z4 y) r; E
then -- no transport order for vehicle @) h+ q+ Z0 t; ~- z- J5 S2 V8 O
@.Destination :=- u0 v3 c/ G7 V+ K1 Z! W; `1 t
rgManager.nearestFreeStation(@,track.~);
! Q9 D# v/ h2 O newDirection(@); % X0 s7 K+ [& [0 D2 S
if @.Destination /= void then
) y; ?- d u7 q2 A; `* N5 y% Y/ Q. b ? @.Destination.NumReservation :=$ n$ ~6 R- ]5 W7 I
@.Destination.NumReservation + 1;3 \: P$ E7 `: Z5 K. w
end;- F6 e0 S7 C) Q# i
@.CurrIcon := "drivingHome";/ g& t/ O( @0 ^" h
@.DrivingHome := true;$ c' h$ K/ h# v5 e; V
end;3 L3 p- E( A$ N% M- [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ J- x" J! s7 ?: m. K3 {
part := @.transpOrder;6 I" D1 m4 K) i
part.move(@);-- load part
. z. ]/ ^$ t& w" w- S' T3 X0 \ @.CurrIcon := "load";4 C; V4 d8 I+ |( {
GlobalDistObj := part.globDestination;
6 y" w& G+ u5 c2 m) a7 C assignLObj := rgmanager.rgAssignL;
0 C3 t8 l9 }; J row := assignLObj.getRowNo(GlobalDistObj);
* {, P; s: v! H$ C: F7 {8 ] if Row = -1 then -- since 70
0 S+ V' f8 w, t6 [, A- l if lan=1 then
' \! b" @+ |, A5 @0 S% z2 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* O/ D! ~, w) C8 l+ ~- e& q, s to_str("in der Andockstation: \"",?.~.name,"\""));# b9 q4 U" z- }6 K9 b* a0 a
else
- B9 E/ V, H/ C/ g% f2 B6 ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 E/ I6 b2 b5 p% g! n% ^ to_str("in docking station: \"",?.~.name,"\""));
N% ]5 n/ a5 f; c end;5 `$ K' x: ^% r; G6 C' w$ r
else/ C r: X* r; I
@.Destination := assignLObj[1,row];
7 ~* Y. D* n1 V" ^# ^( Z( i end;
3 v3 I! j" ^2 T% W newDirection(@);
- d4 |" o- Y! ?. V4 D2 I, g% ^ @.HasOrder := true;
% D6 U, C; @; ?! M' ` end;8 a2 B5 w6 E H! L1 Q6 `
end;
* X: E6 \% ^- k) K7 _% a, A# S7 W% _end; -- of the method
6 K0 x7 L; f) N5 i# t |