/* called by: entrance ctrl of the object 'track'
2 ?( c6 M# W5 d2 y& ^*/* P @7 ^% i8 W7 w' @7 i5 q
is
- u1 U' e/ R: L9 `4 ]/ W! s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: v. b6 i }; S |% _+ \do9 j9 I0 A' u3 P1 w" ~2 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 S( Q, b$ e: f0 W# a+ U/ M7 f if current = @.Destination -- else return( O0 s2 n Q) u! Z9 O! u
then
# a' ]7 J: I+ I6 R- l @.Destination := void;
. r3 v: C7 K5 x+ O- m" ~ F if @.occupied then
3 M* B' P* K5 ~5 Q7 B0 h' N. ^ part := @.cont;; R# q/ h6 n" Y9 m, H
@.transpOrder := void;
& ?/ r/ k" u% r$ ~7 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 T$ f4 B, S. a3 R1 t4 J u# z
@,root.eventcontroller.simTime);
" Q: B* I3 i( s5 t' p/ U# A$ Y @.HasOrder := false;
0 J B& y0 o$ p @.DrivingHome := true;: i. F$ N$ B, j* r
rgManager.tryToStartTransOrder;9 V: k* K) H5 f0 \6 t! w
if @.Destination = void( j. W& C* H" v# x
then -- no transport order for vehicle @+ L8 t& q* M5 Q+ l
@.Destination :=
. L5 m/ Q. ]& O( L/ }4 { rgManager.nearestFreeStation(@,track.~);7 l, H0 G1 p1 R7 |; y, a
newDirection(@); 6 Z4 b" O2 ^0 D
if @.Destination /= void then
+ ~+ r' d' R9 ]/ u" y0 c4 n @.Destination.NumReservation :=
& m& S# `! d# D7 p' |6 g @.Destination.NumReservation + 1;
5 q5 |, S3 }8 Q6 _6 o( U3 H; [ end;# d- u2 X \5 A8 L/ Q1 W+ f
@.CurrIcon := "drivingHome";
' n( ?9 Z4 A3 d8 r* H$ M( W- V @.DrivingHome := true;2 f7 Q, d9 `. x
end;
+ P6 M: d, ]9 e. H6 T# T else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 s" Z+ e( l0 }2 H
part := @.transpOrder;
* [ N/ H; B+ ^- d G) j part.move(@);-- load part
2 r) ?# R- ]' w$ j1 O' p @.CurrIcon := "load";6 K/ }9 G4 Q( r! p; L
GlobalDistObj := part.globDestination;
& c6 f9 g% n9 x3 G' f7 A assignLObj := rgmanager.rgAssignL;5 P; X' O) o9 l, j
row := assignLObj.getRowNo(GlobalDistObj);
- h. U6 ]& Y/ f4 {' \ if Row = -1 then -- since 70/ x6 g" d$ `( ^
if lan=1 then+ O! v" F7 y" G3 a3 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 S( d8 D* ], \. `7 G" p- ~/ o# g
to_str("in der Andockstation: \"",?.~.name,"\""));
! e9 D. H( z. }2 \ X2 X else$ D4 \0 R+ l. r1 S- |8 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, y9 D. ?. h- U6 M8 ?& x* Q to_str("in docking station: \"",?.~.name,"\""));
# x4 G0 s: E# W! w' \0 b: h& m end;
/ }0 V9 w; B4 X4 i5 J! N else, h9 l. ]' i: }5 P( v( B
@.Destination := assignLObj[1,row];
/ m9 k, y1 Q" n" A' @0 s! N/ N end;
- u; K, R8 S! n8 m3 U1 Q6 O newDirection(@);# P9 l/ l" B/ f: e% @' b
@.HasOrder := true;- v9 a7 [" d) c8 ^" @( U3 F1 Z2 y
end;% a' b& F* a5 ~
end;
6 J" N9 H2 B: Z7 Q# |end; -- of the method6 C; h2 o% {8 Q. I4 E- `
|