/* called by: entrance ctrl of the object 'track'
8 n# t; {5 r' Q& u& l, c( a*/
6 [7 \! b9 i+ y4 g$ I" Cis
* H- V# I3 T2 D8 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 O# d, e8 j2 f1 p Udo3 i, @* G) d6 I* r" m
Lan := rootfolder.Internal.Tools.AOLlanguage;$ \- z) w( X7 o: Z
if current = @.Destination -- else return; `( |7 s* g( M% v! C" _* k
then3 J* g8 j% J" [, ]
@.Destination := void;* B" t8 I1 e; z3 \( l! F2 A1 T
if @.occupied then
5 U. e' A, s, a3 p$ n8 V3 v part := @.cont;; X2 y! j8 S. E; r, x' t
@.transpOrder := void;2 ]) Y( K% Z6 p1 s7 J/ [' A0 _5 M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; C) t8 n0 T y) X
@,root.eventcontroller.simTime);/ ?. M' V6 ]% c* {7 V* p% S
@.HasOrder := false;' D0 p$ w6 O$ m0 R0 A1 r
@.DrivingHome := true;8 c6 l) D6 Z1 Y6 w, ?
rgManager.tryToStartTransOrder;8 W9 y* E! x# U6 R3 [' c1 x
if @.Destination = void& r, R- b/ t9 @; s
then -- no transport order for vehicle @1 Y% I4 F; ~1 _4 |& y
@.Destination :=
; j- O- v1 G- b rgManager.nearestFreeStation(@,track.~);
, [; y, m8 `5 N! Y) |! S; i- M newDirection(@); 8 k% f+ P) b1 b% i8 L& l8 w- G5 F
if @.Destination /= void then
+ Y4 y# X) g; h* M, L; C2 B @.Destination.NumReservation :=
+ w' x( }4 F0 p( t: q$ f% N @.Destination.NumReservation + 1; }' n# z, X* S% U0 J
end;8 p4 C% V+ L. T/ x( r5 V8 I& @7 [, O
@.CurrIcon := "drivingHome";
0 r& L" S1 j) H( I @.DrivingHome := true;
9 `+ q3 H! b: H7 i- `2 [3 a4 e4 _ end;, c, Q7 H; r) V" y5 h' N- r( Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
M; H5 A. G5 P( p part := @.transpOrder;7 i: @$ B$ L6 |: Q2 t
part.move(@);-- load part7 k3 W2 H) ]' Q: }# ^; \* {" T- R
@.CurrIcon := "load";. i$ z& t4 w) b% X7 s$ N8 p; x
GlobalDistObj := part.globDestination;
% V" @ U% l# a3 P& y assignLObj := rgmanager.rgAssignL;
9 S+ e# a2 {6 o" _8 s row := assignLObj.getRowNo(GlobalDistObj);
3 I$ s* Z) u( }! M9 Q if Row = -1 then -- since 70# N, J4 w6 G5 A, N% f
if lan=1 then7 E- N# c. W$ x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ z% I! F* P* {* e- c" R( V1 _7 e
to_str("in der Andockstation: \"",?.~.name,"\""));
- ~( {; _' B6 i& h3 o) A# E& J else0 S/ L& l" k. l: E2 M" J3 F. a4 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 y, `5 Y( M& W1 d9 f, o6 i to_str("in docking station: \"",?.~.name,"\""));
! H' A+ D1 R3 z: s' x0 d8 d \ end;
$ s+ O6 h- [, S: u4 w& ^. }" x else
1 }4 ^) r( e" J6 g+ A5 \; [+ F" y; l: j @.Destination := assignLObj[1,row];
- I7 j" b$ X& T0 j+ `8 C) l end;
Q( t `- j) K( o: p* A/ F newDirection(@);; _; j- I, d7 [, g, _
@.HasOrder := true;. [2 [1 q9 o7 r2 w; ]$ Q, y
end;7 x7 i* v; H, c0 [& k+ ?. D+ \. X
end;
- C( [, X% m+ `$ Y qend; -- of the method2 q9 `- _2 k* R; D6 }1 n
|