/* called by: entrance ctrl of the object 'track'
" x8 c# f, T. ~) `*/+ o9 E+ o: Q3 \6 Q6 e- k# [2 p
is! S& s$ v9 B# K, U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& s$ u: T1 Q" {/ L1 ?
do; d* S8 g/ [4 O; e3 u
Lan := rootfolder.Internal.Tools.AOLlanguage;% s$ K9 W3 y% z: T
if current = @.Destination -- else return5 G7 L. Z; ^% M2 H
then
& s' \" Y; {7 m5 m; [# q$ H @.Destination := void;
$ C8 t$ ]7 E4 o& x9 b8 N6 d if @.occupied then5 d3 A, ?. ?1 c$ R8 p- e1 i
part := @.cont;. r; E0 L! m' B K+ J( m
@.transpOrder := void;
! ]& E$ t) u; _5 I- T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. U9 }5 y( I% R, v2 _; d @,root.eventcontroller.simTime);
( D# a0 r8 G; C8 _2 j8 B( e @.HasOrder := false;
2 I9 ~# u5 j4 c# @5 h/ E @.DrivingHome := true;
5 @) T2 H3 i9 @- I/ Z$ T! [ l rgManager.tryToStartTransOrder;
( M* {7 a, ?1 S) E0 w if @.Destination = void
9 @8 B6 V9 R8 k. K: \9 ?8 q4 ` then -- no transport order for vehicle @
4 w9 x. R) x2 T$ F1 J8 }/ c" d9 y, _ @.Destination :=$ n; p3 |1 |) a: c% a" ?2 q" s u4 q
rgManager.nearestFreeStation(@,track.~);
* ^$ W' D* W' D: d4 z newDirection(@); 4 v1 J+ L; p- D, g* }
if @.Destination /= void then8 v9 ~ A$ U: S2 }
@.Destination.NumReservation :=
* S; e x$ V- A L8 ^ @.Destination.NumReservation + 1;
5 F5 W; f9 k) E' R1 {- w end;* H5 Z+ w) o& @$ j6 l; g1 k' g( P2 \
@.CurrIcon := "drivingHome";
! h+ i d4 {+ m0 N# D5 h @.DrivingHome := true;. x5 C3 b0 t6 d: B: U5 w
end;6 X% a# n, _6 {+ r( E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 k6 J% E. w& H1 ~: d
part := @.transpOrder;
5 V! x& `# h) B* O part.move(@);-- load part! c7 p$ V2 j7 L& @9 o2 v* h7 v/ C
@.CurrIcon := "load";
# [0 B/ X# y2 m- ]# T P GlobalDistObj := part.globDestination;
( f2 ?; p8 `9 i( h. B' c assignLObj := rgmanager.rgAssignL;' h/ X# B2 C8 V8 O$ L3 |2 S5 E
row := assignLObj.getRowNo(GlobalDistObj);
1 q L' O, {4 x0 D; M n% c' M if Row = -1 then -- since 70: `+ X' t6 Y- P. D2 Y8 i4 \
if lan=1 then
1 y! [) S$ ^7 {, Z3 o4 X/ E6 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& l/ n. `, n- K3 V' H# M to_str("in der Andockstation: \"",?.~.name,"\""));7 e( |1 H, l8 Z! z9 j
else
% n8 _# V2 |2 T$ T1 S0 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 W C. W- T# P( S, D; f to_str("in docking station: \"",?.~.name,"\""));
5 g7 u R. J5 | end;5 ^$ [9 z% k4 r8 M% i @5 d( Z0 }
else: [2 T$ o8 e4 b% n* H2 O
@.Destination := assignLObj[1,row];3 |2 r; Q0 K9 X5 n
end; % q( U9 b. x; V2 b0 @7 V4 ~4 V
newDirection(@);
1 x! e0 E# h7 d/ W @.HasOrder := true;/ s9 d& f0 S* E1 i; W0 `: i
end;
' f3 x2 O2 x% l4 Y" v$ w5 R) z end;
' r+ e0 X. N9 \end; -- of the method+ Z4 \: B! ?* J! M Z6 o
|