/* called by: entrance ctrl of the object 'track' f6 j, G% j% u7 n
*// \! V; P) f0 A1 [
is% t: f3 w, B9 ?4 Q I! N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ u$ k/ `$ b; f. s, Pdo. b6 Y/ j g% k$ r! U! F% k, T
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 c* m% {7 G/ x* ^6 i; Q) Y/ f0 t1 Q if current = @.Destination -- else return
9 w* [! S6 k+ G% X0 G1 c then. q5 b7 c& {& s! Q5 M8 _
@.Destination := void;
* G6 c) Q% B2 i! F. Q; ]: r if @.occupied then
) j6 j/ B& O/ u- R1 D. c part := @.cont;
; N! z7 `1 u( ~; j. U; H1 B0 _ @.transpOrder := void;
! E) S, d' P! e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 k9 g% B# g l" u. Q4 F5 [
@,root.eventcontroller.simTime);
: f7 p. \0 } m) t @.HasOrder := false;
+ {/ W1 [# Z6 l. M9 {3 w2 G @.DrivingHome := true;
" A8 s& P, X/ i$ N& P! S rgManager.tryToStartTransOrder;
. \$ T; j6 e- o, Q if @.Destination = void R C# p/ ?, k2 I# [* w* ~* z
then -- no transport order for vehicle @" u2 H4 w$ }) j* s* E l& M4 Q) \( @
@.Destination :=. ~2 A0 o6 ~4 b, O' C2 ]
rgManager.nearestFreeStation(@,track.~);
" w8 o7 @) Z0 V' u newDirection(@);
; y( S% k$ d4 _/ z, x1 x. a if @.Destination /= void then
+ D* B: `" H) X- o+ F @.Destination.NumReservation :=
/ W' [% G3 {- \1 \4 N9 A: j @.Destination.NumReservation + 1;
) i: D5 V1 b( V1 ]: P F+ ~! i1 f1 t end;( L/ p- Y6 ~5 s: q
@.CurrIcon := "drivingHome";% \; z! Y/ j; m
@.DrivingHome := true;
8 r: T$ W/ V/ \+ M end;
' _3 ?, F T0 M: a0 R/ P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; v1 ]) ?% J$ p part := @.transpOrder;! c8 G4 T2 Z1 o: H
part.move(@);-- load part3 m% D% P r a2 p* `+ `
@.CurrIcon := "load";
8 ~4 P9 \4 \& F, M. _ GlobalDistObj := part.globDestination;
0 s$ R. p. W1 q) O7 K Y! _ assignLObj := rgmanager.rgAssignL;
3 E: O J( W3 f. }# t row := assignLObj.getRowNo(GlobalDistObj);4 j1 s3 C+ N1 V& s0 @
if Row = -1 then -- since 70, c; o" y( `2 R9 S( j: V
if lan=1 then) O3 d2 c# u/ o; K: R- _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 m3 T5 R1 l. |9 r5 x' j, K' z/ i
to_str("in der Andockstation: \"",?.~.name,"\""));! y \2 A H8 S3 E* n
else
- U$ l) W. t( s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 s: n3 h+ n/ R7 q/ j
to_str("in docking station: \"",?.~.name,"\""));
* @% A( ^2 H# q( {- C end;
4 {3 i* |7 v" n7 z' O! w( p& \ else
/ S6 N# c( a" \3 [4 A. k. W @.Destination := assignLObj[1,row];
& F8 \0 u2 V* w6 v# s' E end; # x4 R$ D& s" T
newDirection(@);
0 N2 t! P9 D# Z3 t$ V @.HasOrder := true;
& c2 c9 f4 j8 t% B end;
' d! x) R' {9 `7 c; O" b* F% X end;
& |5 M. F! c: n) B& z/ jend; -- of the method
# l6 w' H! T; ^6 J4 l6 o |