/* called by: entrance ctrl of the object 'track'
5 s. G0 r$ m1 c: S& i( W*/
0 s: k- Y, N9 L) m% Xis; ^( q" A) l+ Y8 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 A; i. Y' h/ ~1 Z- T" j9 |$ @ E S+ W
do
( s) w% D" o" F2 c Lan := rootfolder.Internal.Tools.AOLlanguage;
! O8 u/ N4 O) u9 W+ A if current = @.Destination -- else return
1 J- ~) {! Z. R( Y8 ~ then5 u" b1 f7 d, ]9 H) [
@.Destination := void;% m5 N Z8 C: K- X
if @.occupied then
# w2 {6 {9 z& A' c; U! } part := @.cont;7 t- d: t; N; W2 a9 }. w2 V
@.transpOrder := void;
+ B; D/ A: W" Q" V( } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* Z* y" a A4 r! @# @
@,root.eventcontroller.simTime);
, e6 g, _4 W% I8 u; }2 x @.HasOrder := false;
- P3 A& O: q' x) z, @# Y+ \ @.DrivingHome := true;
7 e: A) h0 X! E4 z5 N4 o7 U" M( d* T rgManager.tryToStartTransOrder;
1 ~, t' e+ Y) D) Q4 z& [5 Z if @.Destination = void
: k+ @# P( H G) ~6 w then -- no transport order for vehicle @/ ?; i9 C9 x# P: v7 J
@.Destination :=$ k3 L; r5 G ^9 J/ ?
rgManager.nearestFreeStation(@,track.~);
) J6 c4 r, ^( I: b: _: @ u& T newDirection(@); $ N% F1 G1 M! L. Z3 @! `5 t8 N
if @.Destination /= void then
! I y' [9 W) X k; O @.Destination.NumReservation :=
& l2 `0 o# U" K9 W @.Destination.NumReservation + 1;8 T7 S6 h- E. e6 |# y8 G& |, r
end;5 m: O$ G9 G$ L+ }; Q1 t
@.CurrIcon := "drivingHome";
" K5 \4 c1 t+ b, d% d3 P9 m0 U% S I' _% o @.DrivingHome := true;
/ H. h# e1 S5 D# J. ?7 a' g end;# p7 x) M. h8 Z0 f% N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- W& U$ P& T' K0 W part := @.transpOrder;% _4 L. o6 I. `# C2 N" c) m/ j& U
part.move(@);-- load part
& q2 {6 x, [: y: L3 C7 P @.CurrIcon := "load";3 [( ?* ?. B [0 g. k( `
GlobalDistObj := part.globDestination;3 {2 ?9 E. V1 t4 m1 L0 [& k
assignLObj := rgmanager.rgAssignL;, R4 m; Z% \- B6 Q) F
row := assignLObj.getRowNo(GlobalDistObj);$ a- O* ?3 {! G, e% _0 K; @" p3 O7 C2 ]
if Row = -1 then -- since 700 J! S" t/ {# _0 j/ G# f, j8 m
if lan=1 then
5 k& C4 g) ` X- Y% A, p. i$ ?9 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; d6 x/ k* L' E7 U# {
to_str("in der Andockstation: \"",?.~.name,"\""));
) B" [! a( ^6 _. M7 ] else
3 U1 W% {: P' _8 f) E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! [" t( B3 t, W2 y2 H7 |: A
to_str("in docking station: \"",?.~.name,"\""));
- n6 V$ P' k5 ^ end;
9 E% Z* P$ q# P! Q ~! I else; B. j9 l8 n1 e# h4 y
@.Destination := assignLObj[1,row];9 B: z) o: J8 b9 R
end;
/ Y% N. a" S8 b6 o: u, p3 l newDirection(@);5 R* L) f) G* ?% X; G! P) E* u3 L1 D
@.HasOrder := true;/ m! K/ Q8 `: C
end;) E# O% b8 Z; P5 n- D# ?0 n
end;
: Q( i0 l( N. m8 g/ M3 a7 x+ r9 mend; -- of the method7 c# K; Q" Q' r; Y" E) w1 |' G V
|