/* called by: entrance ctrl of the object 'track'
) O& c" l/ ~ `1 G5 F*/) e! `" q9 U% C
is
3 f W5 u) l4 t7 {5 a" F0 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 R: c8 m) \, o, o! l7 s# V/ V0 m wdo
5 t% o0 Y: X8 E$ V+ E+ C; f Lan := rootfolder.Internal.Tools.AOLlanguage;- G' `7 y2 a- s/ A* ?: N( @: g
if current = @.Destination -- else return
0 B" M# [9 S! L then) g6 S# I. ~; b# Q. I
@.Destination := void;
% Q/ ^7 |8 g# u0 S6 |5 b% n1 U if @.occupied then
# x/ p- i+ f3 l& a part := @.cont;
u% A) E! h1 u9 g+ E @.transpOrder := void;8 u, P2 T" `) n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( l* T4 f4 C* I. R& r" a6 B @,root.eventcontroller.simTime);
2 U0 z9 B# P, U4 U" i# Z @.HasOrder := false;
3 _ {; b# |+ Z. ]! X; \( u @.DrivingHome := true;
3 i/ Q5 I6 ]# M n' s, q% ^0 E rgManager.tryToStartTransOrder;" A) t5 T" V$ v2 q3 k# u
if @.Destination = void
2 w5 F9 |2 Y4 J* Q3 Y- p then -- no transport order for vehicle @
K8 e( C+ J8 _7 f6 } @.Destination :=
* u* A; s/ |5 S( A! \% [$ v rgManager.nearestFreeStation(@,track.~);
, n( b. n8 I8 M3 t5 ~% k newDirection(@);
, l1 D$ p8 p# h, J0 m9 d/ J if @.Destination /= void then
3 \! ?" Y3 w0 R @.Destination.NumReservation :=" g' L+ y0 l2 U2 D% C
@.Destination.NumReservation + 1;
# _- ^+ Z. J, u3 ]8 b7 |3 k end;
. X+ s( s- V* H$ L2 P( F @.CurrIcon := "drivingHome";' u8 K* F, |& p6 A
@.DrivingHome := true;
7 E% v% R5 s& t end;7 y$ x' q7 z- C. B8 X- Y9 u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! o9 L8 t: C4 i. ~* J
part := @.transpOrder;: z. b7 W* f7 Q; X4 G' e
part.move(@);-- load part
( I( @! p8 C; F' H! V$ p @.CurrIcon := "load";6 j& e, v. ]- T" S
GlobalDistObj := part.globDestination;
# x5 T% i/ ]3 P assignLObj := rgmanager.rgAssignL;
; z. X& E- U7 }1 u! d5 S row := assignLObj.getRowNo(GlobalDistObj);, C8 K# Q8 X- C, f( R5 j+ ?7 K" ^
if Row = -1 then -- since 70
2 C# _5 l/ j6 @' K# h1 ~ if lan=1 then
; n4 L. ]( B- z( H( w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), _- F1 G3 D# n+ T
to_str("in der Andockstation: \"",?.~.name,"\""));+ g4 u6 p3 L/ z" h- Y0 E! Z
else
8 M' G" y& S0 e; e$ a' J' N% D6 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 A) F0 C% Q7 ]4 y z- G
to_str("in docking station: \"",?.~.name,"\""));
1 _$ L2 p% Y" A1 v! A" l end;, _! C$ i' t8 `/ w4 w& }3 E
else! T# A* |, n$ E6 n2 t( v
@.Destination := assignLObj[1,row];
3 o- Q) j7 ~9 v# ^) { end;
$ N }2 R2 b1 }! e. k8 | newDirection(@);( S" ~+ \+ P* d* ~9 J0 N
@.HasOrder := true;+ E4 s- f' k# P6 J* W' Z( `
end;6 B1 k9 @' ~7 R. D' h: w2 P9 Y
end;/ g% Q4 F3 i* {: y: W
end; -- of the method9 r- A! q% @. S
|