/* called by: entrance ctrl of the object 'track'1 V! _: P6 J }" ]
*/
' v- ^3 _7 G+ E3 x: E$ T0 pis1 m# ^8 T/ x1 L+ F+ }3 x4 E! P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( ]5 p4 r( `+ d! @ N6 |do' q/ U w& X; S% w9 g% {
Lan := rootfolder.Internal.Tools.AOLlanguage;5 M9 w$ ~$ M) ?" g5 B
if current = @.Destination -- else return1 \. t3 I D1 G0 L+ ~
then
3 Q ^1 i" F% @2 Z% L' T" O' J! C @.Destination := void;
% N+ T) K5 A" e if @.occupied then+ S! ?9 t- d- ]6 n$ `
part := @.cont;
8 m) p* ?6 m2 \& m3 N& q @.transpOrder := void;- @! V1 l; P$ w9 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) ] _0 |# D E: Q @,root.eventcontroller.simTime);, x; o& [/ I3 p) b, E5 z
@.HasOrder := false;( M* t; ?2 y( W
@.DrivingHome := true;! I- u" ?$ J$ M# u
rgManager.tryToStartTransOrder;
: P; r$ |6 J" P: s if @.Destination = void
- D; C! f# N+ F! V6 d then -- no transport order for vehicle @1 ]; ^6 s% p' J. f* \
@.Destination :=
: P7 X3 x+ r. e% C rgManager.nearestFreeStation(@,track.~);% u6 w) i8 h+ B: A. W
newDirection(@); ' S) e) g+ I+ l4 g& Q& @
if @.Destination /= void then
# i5 K5 R; Q+ R4 ^3 a- L @.Destination.NumReservation :=
- h; U. t. x3 R' J @.Destination.NumReservation + 1;9 ?: E9 Z7 r% p- U: a
end;
9 [# @2 r% M. N2 r7 e @.CurrIcon := "drivingHome";
$ c6 I& O `( l" h) ]5 \6 u9 ^% H @.DrivingHome := true;
9 D& S! V6 T9 V( [2 p) y( t" M end;3 @8 B: q' s9 E3 x: e, p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ?% w; }/ l7 i8 r8 `% L4 E
part := @.transpOrder;
1 K k9 o7 {4 T part.move(@);-- load part
2 p, `0 s5 s7 a! e$ g" U% W @.CurrIcon := "load";
+ r- F$ o6 R" V3 Y) q GlobalDistObj := part.globDestination;! ~, N/ c1 |/ C# X4 v* Y
assignLObj := rgmanager.rgAssignL;
h# E, j9 _1 A' D+ y' V; [ row := assignLObj.getRowNo(GlobalDistObj);& }0 [: ]( T1 e, P
if Row = -1 then -- since 709 F9 n6 o; t) I+ z; U
if lan=1 then
( @' Z( \2 d N, m& @# D R3 c. v* k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: d4 g9 Z7 `8 c- S( L' t% S to_str("in der Andockstation: \"",?.~.name,"\""));
+ U/ _/ I5 t# \! v) W& n9 Q& C else; L7 J6 {5 _# ?) Q C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 H* C+ ^5 z# }, }2 a, S2 ` to_str("in docking station: \"",?.~.name,"\""));
6 b7 u/ S4 Q7 A) p1 A end;9 h6 L- R) K ?9 R
else
9 V) h! a6 Z; s* k6 h3 n; w @.Destination := assignLObj[1,row];
& {3 V6 B9 Z+ m3 ~& T) n end;
# H, l0 x* Z/ x newDirection(@);
3 a4 h5 P, n* k/ o' b' g* n @.HasOrder := true;
% {" s- n( ]3 Z% @ end;
0 C; A& n& q- Y8 C' F$ D: y" g1 F end;5 J \$ o; k' Z
end; -- of the method
5 F. Q; @& ^. c/ t |