/* called by: entrance ctrl of the object 'track'& ~9 a4 F* k8 z8 p* R& n3 u
*/; U+ ?' G3 l$ U4 B ?
is
/ G" D: X7 @7 Z5 H. S part, GlobalDistObj, assignLObj:object;row,Lan:integer;! Z4 G( d: t) Z! I. ~
do
+ O B9 T% j6 F- j! F! b: w Lan := rootfolder.Internal.Tools.AOLlanguage;
) ~/ f6 O- Q7 ?$ ^" H% c% Z if current = @.Destination -- else return
3 v) b G- ~3 E6 z8 Y; k( A/ I4 B then
6 O3 k, @/ a) O0 B) g6 R @.Destination := void;+ i( T! l2 B# ~* f" V |
if @.occupied then
" Y+ V! W6 t' }, \6 T6 L2 Y part := @.cont;( F& Y7 T7 q" w, N+ V2 n. T8 s; D: b
@.transpOrder := void;% T6 i5 Z1 h6 A! w% `, S' a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ \$ m9 S- u* W$ F: m+ c% I @,root.eventcontroller.simTime);, N' c% C! [8 W7 ~: B
@.HasOrder := false; _: i H3 U, ~+ |! Q, T
@.DrivingHome := true;& d' s3 K! L) e9 d
rgManager.tryToStartTransOrder;1 o; T! _8 d7 d
if @.Destination = void
% R: K: ]0 p& ~; M- M then -- no transport order for vehicle @
3 K: L/ t4 R1 I P @.Destination :=7 a4 H! b% S# K! q
rgManager.nearestFreeStation(@,track.~);2 E$ p$ i2 M9 c$ S- V9 z9 {; Z5 P* w
newDirection(@);
6 g* m; e9 d4 V$ A if @.Destination /= void then
' n" V+ k, P. U( I- Q& E @.Destination.NumReservation :=
' J8 U" c# [8 b7 D+ {) x8 H; K9 | @.Destination.NumReservation + 1;7 F; P3 S# Q# E: K
end;- ^! j7 u& N$ p
@.CurrIcon := "drivingHome";8 z+ n! W9 B) b" [$ |, ^5 q0 O. |
@.DrivingHome := true;% O9 D8 [' u0 b
end;
9 Z& h# K: l/ q) r3 b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 e/ \2 |9 r; l1 w' i9 _4 q part := @.transpOrder;0 P; e- t/ J c0 u
part.move(@);-- load part, s0 S4 C! L- l/ F( l7 U
@.CurrIcon := "load";
% Y! @$ X' D" K; x1 @' ~& E& |; t GlobalDistObj := part.globDestination;
, y- U8 S4 d9 F. Y3 _% p" I assignLObj := rgmanager.rgAssignL;
- Z: [9 D8 r) u3 Q: J row := assignLObj.getRowNo(GlobalDistObj);
7 T0 n) p* N4 I8 \0 w* c if Row = -1 then -- since 70
7 [- l1 ^9 [( D) _( z if lan=1 then
) t$ s! G! ~7 r! ~4 |$ Y9 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 u9 u' b: [8 C9 Z4 ], N7 e
to_str("in der Andockstation: \"",?.~.name,"\""));
* v. z1 R, W. G& ]# K) C else
1 B: Y! t8 m( a. A' g( S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 i) U' I W0 R9 T to_str("in docking station: \"",?.~.name,"\"")); . m4 h/ p8 s" t8 m# C- G
end;6 m% P5 i' l' T' `- Y
else6 x; I& H& W6 x) p: C. Z9 r
@.Destination := assignLObj[1,row];) ]$ k1 i% L' W& n" s) F. D+ X: n
end; 2 _ { A2 Y' N
newDirection(@);, G; b% @! v% p
@.HasOrder := true;
5 l" W" I5 e; \% x9 \ end;$ Z k$ _2 m' [) \
end;
$ K# M9 R& J; E3 K4 ^: q6 a; Zend; -- of the method( l% D( N" H' c8 q. F$ |( l
|