/* called by: entrance ctrl of the object 'track'6 @# r* h6 f2 x6 R
*/
; x6 P i2 L" x5 ]; a+ b) [is' S- H: L3 V+ ], a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" o% f) s6 ?7 d
do
0 C) {' p) {7 M4 d G Lan := rootfolder.Internal.Tools.AOLlanguage;
6 j. }0 B5 u: f; f2 [6 L: c if current = @.Destination -- else return
8 o" C* O& Q3 I K/ o then
. G. k3 v1 D3 |! B @.Destination := void;3 A5 [2 Z9 r7 W. q. c
if @.occupied then
7 Z9 @) Q: I2 M) N# {, H part := @.cont;+ _3 z$ p) M" r* [
@.transpOrder := void;: x* n% j, ^' T) V5 U6 d5 ]* v& N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 M$ J: z0 }- D
@,root.eventcontroller.simTime);
* q& V1 J, O h' K% D' G; j* J @.HasOrder := false;
; F8 ~$ Y5 @6 i. p- ~2 v @.DrivingHome := true;2 H9 U# d4 m6 U: k
rgManager.tryToStartTransOrder;$ n8 T- n5 a6 c( w; b8 b ^7 b e7 a7 {
if @.Destination = void3 X& @" z7 U9 U
then -- no transport order for vehicle @) D( r+ m- k' w$ J3 v e
@.Destination :=
6 P. [# m- n7 v9 e1 U; g( u/ _5 c rgManager.nearestFreeStation(@,track.~);- j0 E& m7 Q; Q3 P* K; N G
newDirection(@);
4 h1 C f L6 l- b" f6 w2 I if @.Destination /= void then. }0 k% i+ G( O9 L% t# @
@.Destination.NumReservation :=
& H( W. r9 V" p9 O8 c1 U @.Destination.NumReservation + 1;
: I1 ~* a2 T0 V end;
. Y; E* [1 R3 \ @.CurrIcon := "drivingHome";
9 Y/ v8 l$ C; ~3 v @.DrivingHome := true;
M7 g0 j& L& c* [7 |: R$ u0 T end;! A) }; [2 u" y0 S; o1 R9 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. G( o: z. e& D1 A6 e
part := @.transpOrder;/ k; {' _: ^- s: {
part.move(@);-- load part2 F7 E4 c3 d% g" Y
@.CurrIcon := "load";0 v8 g! T( W9 t4 e$ |
GlobalDistObj := part.globDestination;- r- n6 S4 d+ H6 Z1 G- ]5 J: J3 @/ a
assignLObj := rgmanager.rgAssignL;
+ Z" i! z5 x5 C2 z! T row := assignLObj.getRowNo(GlobalDistObj);9 E3 S: Y! x @3 R" A
if Row = -1 then -- since 70- P( U* i, F* y1 @; Z; T& B
if lan=1 then
! w" P* x7 R4 B3 a: b2 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* Q4 Z, g, H3 B: z$ {
to_str("in der Andockstation: \"",?.~.name,"\""));
* j0 E' P7 P4 `$ M; z else+ Z+ Z: ]; l/ @+ R5 p9 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ O0 ~' l3 \( K/ n, q
to_str("in docking station: \"",?.~.name,"\""));
, `: k' t2 ^! n/ H6 @' m1 `/ p end;
$ ~5 M @ j; j* ^ else2 }0 J& ^ [* V7 e9 \$ Z0 r) T
@.Destination := assignLObj[1,row];
6 `0 U/ A: q8 W) g4 T k end;
* J7 R4 ^- a2 `7 M newDirection(@);
! j9 \6 ^9 P) v4 a1 A0 z0 N' L @.HasOrder := true;9 M) m" d7 s5 N: Q" ?+ j! v- k, E
end;
% V' X* t) @0 k' N3 R9 W& H7 Q! J end;; b# e- J4 Z9 [9 i5 ], R5 v# ~
end; -- of the method
% b" u! t, {$ V# t1 n |