/* called by: entrance ctrl of the object 'track'
& e" ]' S9 o- p8 D x$ Z*/
! Y/ c7 E( S8 R% Ais
( M& i! L# b3 e) t" S6 ^0 ` O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- A6 M( {, `/ a; X; Bdo
/ w: t! o) I. O1 n) a Lan := rootfolder.Internal.Tools.AOLlanguage;
2 ~3 ]% e$ S( q/ [' l7 p, f if current = @.Destination -- else return d3 V* z5 |/ a, T O0 r
then: t* E1 W9 t, Q- a/ \" g
@.Destination := void;* U8 F$ d$ ^3 n+ x4 B
if @.occupied then1 d! ]: k/ X1 T5 u" K0 I# j
part := @.cont;
+ _' t& v+ W: |0 Z" B @.transpOrder := void;
# j8 C: p) Q4 w, Q2 y/ @5 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
Z. J5 _+ @. f8 e6 O; q& C; } @,root.eventcontroller.simTime);
( P7 }/ M8 o9 u* H* c @.HasOrder := false;- i- |/ p5 v, j
@.DrivingHome := true;
8 r1 P4 c, |4 e; d1 _3 E rgManager.tryToStartTransOrder;* {! ?* M8 k* {( w4 h' R
if @.Destination = void
! n( v# u/ d- A5 E% o$ y then -- no transport order for vehicle @
7 }! {- _4 t0 ^! W, s( ^ @.Destination :=9 y( x: U' C* ]! Y
rgManager.nearestFreeStation(@,track.~);8 e/ X: m9 O& U* R
newDirection(@);
1 x a5 K% C6 l2 o$ [9 `" ? if @.Destination /= void then! f9 f5 Y$ V3 G" i
@.Destination.NumReservation :=
% F2 F: G; z Q2 G! F6 N" A @.Destination.NumReservation + 1;2 U: \* N$ A/ A+ i
end;$ i( w1 m6 G( m; @7 N% V& W
@.CurrIcon := "drivingHome";
1 u- }6 V9 _4 g; k) T; F' D3 } @.DrivingHome := true;
4 B j o0 t! n8 e6 H end;
0 e1 T& ~: l7 D( O else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 C5 `& w' X: z$ |
part := @.transpOrder;
3 V( R( R l3 y. `7 p part.move(@);-- load part |! r; z' @; t* p9 w
@.CurrIcon := "load";
. s2 X3 M' y+ p! Q GlobalDistObj := part.globDestination;
O3 }: G: Y5 Q assignLObj := rgmanager.rgAssignL;
; S4 L" Q: ^3 b, s0 ~! a row := assignLObj.getRowNo(GlobalDistObj);
9 ]0 A" C& Y5 {9 ? if Row = -1 then -- since 70
, u a3 d# \ i4 X6 ? if lan=1 then" _: u6 [, g3 K$ w' B5 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 [4 z z3 q2 o6 a% M# A to_str("in der Andockstation: \"",?.~.name,"\""));
! m; r5 e# p6 B( ~) ~4 P5 P% S7 c else
* C8 X, J+ I- L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* o6 W' _" Y! E" b to_str("in docking station: \"",?.~.name,"\"")); W b# ~6 I4 P2 }
end;9 {: E% j) r& ]8 |7 P! @ O+ @
else
. k& o% U t0 N( t& e9 X; k: [ @.Destination := assignLObj[1,row];
: `8 N$ ]5 c5 A# s5 x. a2 y end;
3 M4 M: m* `( @; |* Y1 }9 f8 n newDirection(@);5 F9 p9 g$ `# ?) o# T
@.HasOrder := true;
) B1 Z1 o6 a! L/ B; { end;
) s% x0 j6 W$ B! M$ F% R1 _) f9 f# Y end;
# n5 X! h' L/ ^( {end; -- of the method
; z9 `, a$ ~: w |