/* called by: entrance ctrl of the object 'track'
- d, k' ?9 O8 P( v$ R0 \0 q! j; `# Q4 I*/
- `/ G" L1 ]5 K6 [is
8 i( l' {; i9 |% C4 f w: ?+ ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. j2 I/ W9 g. gdo# x+ b$ {% _) I" F1 Y; w
Lan := rootfolder.Internal.Tools.AOLlanguage;9 d1 m6 ^6 @; ?, f5 T# W3 s) D' c
if current = @.Destination -- else return5 T- K$ p! n6 C3 _- v- [
then
( F' Y2 b% @$ h+ m. m. _1 ? @.Destination := void;
8 \5 H1 G `, U/ u! x if @.occupied then" p8 h6 g% q2 k) X7 K/ V" J
part := @.cont;" C1 x( ^7 I( P+ a7 w9 i
@.transpOrder := void;
1 L8 M: K1 L' C2 r+ g9 c! P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" r w" a( p9 M) v" b3 |; D @,root.eventcontroller.simTime);
, w3 |. o. b6 ?% }& r8 N* G @.HasOrder := false;4 M% k# v2 _6 e4 }8 c. E6 u
@.DrivingHome := true;% a8 G. z8 I8 V' W- r: H7 c
rgManager.tryToStartTransOrder;
" D L; Y7 H( t9 h0 v7 ~ if @.Destination = void
# D U( \% E: j. v then -- no transport order for vehicle @
5 X( u% d5 R3 D* s* F) B+ c, \8 i, Y* h @.Destination :=
) F' G. t( b# z6 ~4 v, ?- c$ d7 y rgManager.nearestFreeStation(@,track.~);
|- y% N h0 [3 a" @' ]8 c+ `4 { newDirection(@);
/ o( n; w: x) E. r7 W$ g; Y1 ^/ J if @.Destination /= void then5 |& o0 H# N, Q8 C/ L9 [
@.Destination.NumReservation := b8 @ n9 R6 a/ S1 {, J9 R5 h/ ^
@.Destination.NumReservation + 1;) T0 i8 }$ Q. k& [
end;
$ B& m/ N l* o& i3 P- o8 f; @ @.CurrIcon := "drivingHome";# w, ^, y, m. y+ z! [, Y
@.DrivingHome := true;
! V" d5 E. O8 }. M end;
! e2 C& n- m1 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ N+ R1 h( c6 V; u" A: [ part := @.transpOrder;
( G( k, U! S4 [* T. p$ e part.move(@);-- load part7 ?. X$ H% A* ~$ _5 M
@.CurrIcon := "load";
2 C* P9 c- n9 R* W, D( j2 X8 I GlobalDistObj := part.globDestination;
+ v. Z, w/ r/ m1 g' u. a. Q assignLObj := rgmanager.rgAssignL;
7 S" t2 ^0 j/ R; J row := assignLObj.getRowNo(GlobalDistObj);% m7 Z& ~ o& v3 ]/ i' c: i
if Row = -1 then -- since 70
* h. u4 V! W" Z# X. c; ?( O if lan=1 then
) x1 E C# N; {3 E. [+ }" | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 ?- V) q) Y% E! C: ^
to_str("in der Andockstation: \"",?.~.name,"\""));
. c1 T4 j. f4 q2 R else
6 m9 R' |* T# ?% W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( z9 P A" V! X to_str("in docking station: \"",?.~.name,"\""));
3 u+ {3 j: Z5 c' b& r4 U: M end;+ [! M7 Q6 u8 H g
else6 c% L$ m, N6 S& Q, p) m
@.Destination := assignLObj[1,row];
5 r( d: ]0 L4 u6 ?: B4 X8 l/ P end;
8 j0 y# B! w K5 H* Q3 c! h6 L newDirection(@);
P% a+ A0 K2 P# ~; Z @.HasOrder := true;
! a$ c: A- | G/ l end;
, m3 r; |8 O/ `/ B: R. q end;
$ b3 e' _0 G. tend; -- of the method
7 J$ ~) |+ i5 L6 ` |