/* called by: entrance ctrl of the object 'track'
$ l7 F7 A$ I7 t3 @# c*/$ p; Q8 _" G) r4 B. ^! P
is
1 P0 j9 T% {) R1 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;- R# ]3 H# R5 q( v$ i# M% e. F8 m
do, i3 ]. W1 ]6 ?( d
Lan := rootfolder.Internal.Tools.AOLlanguage;
& |5 A6 Y* E( T9 D( H if current = @.Destination -- else return
. {$ Y+ H6 }+ [6 t then
1 T" B1 q/ U% h) a; s \) ?) } @.Destination := void;7 K2 @2 U! ]- _, Y5 x" R8 {8 u
if @.occupied then
3 w5 Y. T. X! e: {& ? part := @.cont;) y4 j2 ^) K7 w! p! ~7 D2 V$ R
@.transpOrder := void;: t+ T- I- U) g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: ]8 j9 b$ f3 ^3 Y
@,root.eventcontroller.simTime);
3 d- t1 Z Z; W8 a, }: `. w! u9 X/ L @.HasOrder := false;* p) I0 H7 z- ]+ s+ A% ]; G
@.DrivingHome := true;* g: d! y7 e3 ^6 f( Z7 b
rgManager.tryToStartTransOrder;( B1 G6 p4 t( v1 e" n/ e! O
if @.Destination = void
+ f9 _( z: s# ]9 m; a" Y then -- no transport order for vehicle @
4 A2 t. |/ a& n0 m @.Destination :=0 O& x' p* h$ p, h4 f
rgManager.nearestFreeStation(@,track.~);
# l. s7 p% h6 a5 g; D6 W newDirection(@);
$ V+ K7 d7 l! K if @.Destination /= void then
$ W: b: z9 j& _/ A+ ^ @.Destination.NumReservation :=
. v0 w% N* W+ d0 Q- N5 ` @.Destination.NumReservation + 1;
3 w5 E4 h4 l- |: q- k2 } end;7 W# }% q( }7 l
@.CurrIcon := "drivingHome";0 |2 `# S. E( C2 c
@.DrivingHome := true;
2 \$ t( w' u% a2 U end;2 C \$ P' D* X& u9 b, }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 a$ c m; Y+ u& G5 v part := @.transpOrder;
: b3 Y" o1 S$ { part.move(@);-- load part+ J0 N. n# E( D( b5 H8 Z
@.CurrIcon := "load";' b7 V- U$ q0 Y7 O
GlobalDistObj := part.globDestination;8 {( M, V7 {/ S8 L+ [3 X
assignLObj := rgmanager.rgAssignL;8 D7 L. Q) J4 @0 t* {! P1 m1 E
row := assignLObj.getRowNo(GlobalDistObj);- D: s6 ?1 ^. _& `6 g1 w+ v2 D
if Row = -1 then -- since 70
4 \4 E+ D% S% H# k if lan=1 then; h8 N1 }& M) x) X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 `: d% x; z* { a to_str("in der Andockstation: \"",?.~.name,"\""));
6 c( m! A; q# |+ N4 Q( ^ else% B7 z/ e" I2 F& j! E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* \ W7 }8 t* V. ?# {& n6 |) \ to_str("in docking station: \"",?.~.name,"\"")); " Q: g/ t' Z. m- p) u2 s" g8 X4 I
end;1 v% v7 B* ?" a
else
/ `0 N3 F9 U2 d" s8 E- V) b @.Destination := assignLObj[1,row];
5 ~4 G% R: o* | end;
+ d1 o5 g* d- c newDirection(@);, `# a' [% ]& a- B7 C& _) _5 }
@.HasOrder := true;) x# g L9 B. n X" x" n
end; d3 Q7 b* u3 ^$ G
end;
- \) d+ I. M3 i# V! {- Xend; -- of the method
& G7 Y$ M% Z. E5 w |