/* called by: entrance ctrl of the object 'track'
& S& v. h2 `1 O* k" M( b*/. ? d/ j) X) a9 z7 r) b* t1 Q: R
is
' A j, v4 n* F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- l1 ^, \& Q5 \: S9 r" H! z j! L: cdo; C0 i% y: c* X) y2 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 [3 G2 V( |8 i& p5 ^7 [% w if current = @.Destination -- else return
) M0 @- w0 M4 Y) x2 B' O( U% P then( J5 ~5 L3 C4 ]0 S& Q
@.Destination := void;9 M" W" n3 c: \4 ?
if @.occupied then; G: ~6 Y8 ~1 m: w0 U$ M
part := @.cont;3 Z2 o6 B5 X9 `# t J
@.transpOrder := void;
, D* j- F7 h7 h. h1 Y+ L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. k0 l8 J. ~# x7 q @,root.eventcontroller.simTime);' `8 T$ C+ t4 y8 j
@.HasOrder := false;
7 ]2 N$ M' T* e) O4 f! n' r. A @.DrivingHome := true;
; r' r+ b* D+ ]6 F* C" K rgManager.tryToStartTransOrder;1 n9 s% K! B0 n
if @.Destination = void% O6 L) c s- u3 k
then -- no transport order for vehicle @9 F% X, @* J, z4 v
@.Destination :=
: j* }6 I0 h' H; ]# u3 } rgManager.nearestFreeStation(@,track.~);
7 c/ _& B. Q* O' H0 d7 Q7 Q$ G newDirection(@); 1 |: P. ^( `- m5 J U: A* ], k8 C
if @.Destination /= void then1 J% U' B% Z; ~3 P! @
@.Destination.NumReservation :=
# c' A1 l" @9 }' q. g% _# H' S @.Destination.NumReservation + 1;
2 L! M F/ Y- d& ^* W7 @; s0 b end;( Y. m [3 s. r+ ?9 V$ N" z; u1 u+ b
@.CurrIcon := "drivingHome";
# x0 H' d2 z1 f p" `) s' R0 o @.DrivingHome := true;/ ^3 ]& S% H% \+ ~
end;
# d, `, e3 v8 w9 c7 l, P- g else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ W& r: D% { |* |; t
part := @.transpOrder;
+ k9 j+ P, V4 o& D9 Z part.move(@);-- load part
# R! I+ L$ W: p- p @.CurrIcon := "load";
% l' [. i; t9 x J5 ~ GlobalDistObj := part.globDestination;
2 p! r, R/ O/ Z6 Z assignLObj := rgmanager.rgAssignL;: W0 u' y5 y, ^5 @& P* x
row := assignLObj.getRowNo(GlobalDistObj);
" }5 c& c# E. S1 k& r& L, U7 S5 E if Row = -1 then -- since 70 R% ?3 T8 h' E* y$ x* Y5 q
if lan=1 then
7 s2 z4 X+ z' t: a! P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- U# o3 \+ L/ a# O to_str("in der Andockstation: \"",?.~.name,"\""));
2 ^4 W B, k( n* m8 p: [+ X3 a else' D2 R. X3 M* N: V( m1 f& ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' V" v5 U3 H" a7 [; G to_str("in docking station: \"",?.~.name,"\""));
: A6 ^( l/ x' S/ ~( b G end;1 e$ O; B$ W5 z5 S+ y( e0 r( w! G
else0 j S7 r) o7 U& z$ y# z
@.Destination := assignLObj[1,row];
, i# J+ v/ Z" \" H* P! {$ N6 O end;
$ h# j1 U" B$ U2 } _ newDirection(@);
5 K5 z2 y2 @! P' E/ U6 j- S @.HasOrder := true;
0 K" x5 a. Z# O- e end;
( A$ i/ I* @" o; K% F Z! x- ^ end;
% | P0 l7 m: q6 _2 tend; -- of the method2 c1 c$ p/ A) g. h9 h
|