/* called by: entrance ctrl of the object 'track'3 X& f. S) b2 f1 b# L$ J
*/
. ^6 Z4 P: V1 a+ k& f6 iis
/ W$ S; h- m2 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! m9 @4 B9 C6 f; w3 Y+ B( _do
) _0 h: E- s: B8 c Lan := rootfolder.Internal.Tools.AOLlanguage;2 h k) B, v, x* z+ C4 X7 Y
if current = @.Destination -- else return& _9 U) Q5 x, J4 a) e. M
then+ g u* c9 H; I/ o: s
@.Destination := void;
2 K, o% m# o, V, c1 ? if @.occupied then& u0 E" Y" _& g4 @5 H
part := @.cont;
7 G7 I6 p$ H* K2 X @.transpOrder := void;) [ ]$ _' [9 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
n- U# U& o: A @,root.eventcontroller.simTime);
9 [& q6 M6 V! s$ P: c* A( G @.HasOrder := false;
: c6 M/ \+ D" |4 J @.DrivingHome := true;
& |0 d6 u, d1 F7 d5 R rgManager.tryToStartTransOrder;
$ H, p8 ]$ Y# m" w5 b- b if @.Destination = void; o$ P# O* ~% E4 x' c& w
then -- no transport order for vehicle @
2 U }7 a* |% }6 P& F' x( s5 x% p8 B @.Destination :=
2 `6 X0 r( ?! u4 ~ rgManager.nearestFreeStation(@,track.~);3 W# o, H3 U% e- H" [2 G
newDirection(@);
Q0 R- Z# Y; N$ C if @.Destination /= void then
$ X8 h( }; t9 b8 u @.Destination.NumReservation :=# j7 I+ S' W1 L' q8 s4 j
@.Destination.NumReservation + 1;2 w5 ^( V- e( z# a4 A8 A3 ]
end;2 V# r6 K$ q' b0 U
@.CurrIcon := "drivingHome";
7 X* O: W* w7 C @.DrivingHome := true;% I/ U: v& p+ A' H T4 w0 X3 Z7 U+ W
end;$ F1 ?! z. g0 d& k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ J& t2 e* t' A( u part := @.transpOrder;
; U' E5 ]7 y0 A, \ part.move(@);-- load part3 M# A7 F9 T8 N" y
@.CurrIcon := "load";
0 Q9 z: s4 j/ O- P7 Z" l GlobalDistObj := part.globDestination;) T+ B% Q6 u. H) I/ ]7 q/ K% j. j
assignLObj := rgmanager.rgAssignL;+ A5 |7 Q+ B9 c) N
row := assignLObj.getRowNo(GlobalDistObj);# ?8 g" v" X1 G k
if Row = -1 then -- since 70
) W) [4 a9 A% S3 V3 m: O if lan=1 then
: O# E. o/ U# ~- K" T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! q% n9 ?2 S7 A5 e to_str("in der Andockstation: \"",?.~.name,"\""));( q1 I, [2 _7 Y% C' R+ q
else" c8 V8 T; S4 ]4 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: L2 }+ q+ l4 t) V7 s to_str("in docking station: \"",?.~.name,"\""));
7 Z; W" G3 X: y' l* y end;: `4 b: W# X' c0 P9 d ?+ B
else$ S$ o% h/ w3 A, B. p Z- Q6 @3 q
@.Destination := assignLObj[1,row];- c* y; N) |8 c
end;
# b/ L2 v8 h; Q& }4 a' m& V newDirection(@);; Z% L9 S, Y9 @# a9 @# W
@.HasOrder := true;
- [: V9 r% F) y" P& r% a end;
8 d- U/ |; H. ? end;
1 R+ E& n8 O2 s2 y1 _end; -- of the method) ~7 u5 C' \2 P3 J; x, ?
|