/* called by: entrance ctrl of the object 'track' U% N5 \. s6 p5 V. Q0 v# b1 Q
*/* \$ T& ~8 G* N1 L' W$ k ?
is9 ?( |% \1 j R* X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 v. E: a }& h' L& |9 [do
3 O1 q. {2 D, b p Lan := rootfolder.Internal.Tools.AOLlanguage;; @ k7 ^. ?- x0 {& t1 X* g
if current = @.Destination -- else return6 H! O. ^$ g2 s' ~! v$ M9 F; f
then4 B2 I7 p7 r4 h2 g
@.Destination := void;
( x0 F8 r( B. { if @.occupied then6 s% S9 |# ~, N3 m3 v
part := @.cont;
5 g% l- M6 G7 v4 c& w4 Z @.transpOrder := void;: g6 I8 ^& M3 \( C8 K/ c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 b: x4 g& X# {% A+ ` @,root.eventcontroller.simTime);
* D3 ?6 X5 x; Z, H' \, S( o# W& H @.HasOrder := false;
# M& k* Z% z' g' D9 o% S8 T' s7 l: S2 h @.DrivingHome := true;
, d; Z4 N( r( L' V f rgManager.tryToStartTransOrder;
6 r9 F- E# w" u* e- X& O) K( ~ if @.Destination = void+ v7 g6 c2 G- Z5 h
then -- no transport order for vehicle @8 X) n2 e$ X" S- F0 S8 t: F) B
@.Destination :=) W$ c" k+ o; O$ _
rgManager.nearestFreeStation(@,track.~);
. s5 ^( v9 f7 E newDirection(@); 9 R/ w# R* ^: q6 Z
if @.Destination /= void then
5 Z2 j& b7 S W @.Destination.NumReservation :=3 q2 X" y0 `+ z9 {2 Q4 }
@.Destination.NumReservation + 1;
5 p: m" }6 c! v, m end;
. N) n2 a: P0 D @.CurrIcon := "drivingHome";9 I, G! o5 ]: U4 R2 ]/ J$ V$ s1 R
@.DrivingHome := true;. s/ ^+ E* E# J! o4 Y& l& v
end;1 N* T/ H7 b+ i8 s8 E" T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 w" v4 r2 J3 {1 Z9 r: Z part := @.transpOrder;8 B# ^- L& H0 t/ X1 k l
part.move(@);-- load part
% y( f( Z/ c' q @.CurrIcon := "load";% ?. ^1 X" `( h. |# Q9 r
GlobalDistObj := part.globDestination;% K+ _2 \- V8 J: ^! i( T
assignLObj := rgmanager.rgAssignL;
6 ?/ z4 w6 q9 `: D" a# B row := assignLObj.getRowNo(GlobalDistObj);
) A1 z% {, E4 I if Row = -1 then -- since 70& m; ?( B, {0 h/ z6 W
if lan=1 then, s4 c9 M/ s; e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ {3 c$ @' a" S1 x+ g
to_str("in der Andockstation: \"",?.~.name,"\""));
& _1 A3 P7 G- A* s8 b G/ b; @ else0 A$ | Y1 i/ t% v! g" r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 ~* ]$ \" u8 z; `9 J& ?
to_str("in docking station: \"",?.~.name,"\"")); & C& S' i' y+ A
end;! d4 r ^5 M" x
else% y9 Z( s+ k4 y9 m
@.Destination := assignLObj[1,row];
8 o6 @% C2 O4 b1 U, A* ~2 P" G end; + w, Z( }+ F. n( g; P: N% \
newDirection(@);
- R/ C0 t- y A @4 c @.HasOrder := true;
/ s- Z0 W5 H0 m. Q end;2 R) O, }" `0 ~2 o5 x; _
end;1 s, _: @1 B5 Y% D6 a' @% o
end; -- of the method
/ T: L/ r: ]; J |