/* called by: entrance ctrl of the object 'track'
" F3 w$ b# j8 b*/
4 Q* F+ }# V9 V0 Q! X) W: i2 }is
) A* L# K+ W/ |, q- W% k part, GlobalDistObj, assignLObj:object;row,Lan:integer;! B& J/ D: D3 _9 r1 O) i
do
1 M ~0 e0 r2 ^ Lan := rootfolder.Internal.Tools.AOLlanguage;. j; o- F9 F! T- i8 O2 E6 w
if current = @.Destination -- else return
0 U; m: d/ G1 b& R then
9 N Z( }; }7 Y, @% w, K/ l9 S @.Destination := void;
7 N: O% l0 K1 R2 V: t if @.occupied then
* |2 ^, V* n' a part := @.cont;- s, U6 V: J7 E5 w
@.transpOrder := void;
; N; ]) s7 m, Z* E1 t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) y% B' N2 W% g& |: i
@,root.eventcontroller.simTime);" W, o; w! ^$ T% ~6 i/ Q( X+ K/ f) H
@.HasOrder := false;0 O f* t/ v: R7 o$ C$ W
@.DrivingHome := true;
b# x7 k- C1 @9 M z# ?, a, d rgManager.tryToStartTransOrder;
; T- c! E7 b/ E( I if @.Destination = void [, t2 @2 o" k8 X" h- k6 N# Z
then -- no transport order for vehicle @
$ F* ~8 L" e0 n$ j2 S7 E @.Destination :=
8 n. s- @) \# T. W rgManager.nearestFreeStation(@,track.~);
' k$ r& A; s+ @5 `+ ?9 @- A newDirection(@);
9 h. U) a) K) I! M- _ W. x9 t; E$ ] if @.Destination /= void then4 o; ^& ?% k6 [) o
@.Destination.NumReservation :=+ Q# Y9 X$ p8 x
@.Destination.NumReservation + 1;
; L( P" A9 U% {0 ]" g& U' W) d end;
1 q2 n7 Q& ~# P7 j# [* U- I. V4 y6 C @.CurrIcon := "drivingHome";
- F7 [+ o* q0 {, I* Z# Y) H @.DrivingHome := true;
x- b9 ~+ X6 X( D/ _* Q# K end;9 L4 q5 O: m3 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& |" R: U7 Y+ c$ T; C" D part := @.transpOrder;; }% q2 B6 \! M- E* a1 g+ l. A
part.move(@);-- load part3 t5 _$ ^+ _! g
@.CurrIcon := "load";0 _1 f' S* f/ c" h/ E
GlobalDistObj := part.globDestination;
9 Z. Y/ ~5 v2 j- G assignLObj := rgmanager.rgAssignL;% a4 [ i* \4 |# j4 E
row := assignLObj.getRowNo(GlobalDistObj);) e5 X7 i' M" }3 H" C t, a
if Row = -1 then -- since 70
, |7 r+ h( }9 l) d if lan=1 then4 s6 \/ Q4 ? q7 n) e6 f3 i( w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# H" b+ {- E6 S to_str("in der Andockstation: \"",?.~.name,"\""));5 K9 k% \+ i, \) }3 V* k4 S
else
5 u8 V4 Z! @) s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# M" ~6 a; [3 Q, D' x# j3 ^1 W: w to_str("in docking station: \"",?.~.name,"\""));
) E, }$ Y+ l5 S: {2 d* _ end;
4 y- D7 B9 G9 U9 K9 V9 J else8 O$ v7 j8 X' P7 N
@.Destination := assignLObj[1,row];2 S* g5 L$ e8 o5 ?1 i
end;
4 Q2 j5 z9 `% G5 d newDirection(@);- O. v0 \( V& K! L
@.HasOrder := true;4 o$ }. D- x4 g0 y3 U' b
end;
6 W* [+ w" J. f, E- x$ Q% j end;: F* O# b' k, q0 I0 B7 j2 j% k0 |
end; -- of the method( q9 L2 s$ P: v) b3 C+ x
|