/* called by: entrance ctrl of the object 'track'0 M9 o1 I' ^$ L' v6 O! Z& H
*/
$ Q) p# F5 v+ l$ R; Jis
8 p! p' D; G. ^& S" M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 B( F6 Z3 c+ b" N, x7 b7 Jdo0 {4 j' Q; y; V: L( C
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 z- y2 f. A) C/ Z if current = @.Destination -- else return- X1 m( W. |. ~ c6 X+ U. d
then8 e0 l! [) o! q* Y
@.Destination := void;6 Q7 {6 Z. I, ]* k$ F
if @.occupied then* `; M% m) K2 t* ?
part := @.cont;
# ?6 l5 z* b d e9 d, Y4 ~ @.transpOrder := void;# d: `9 S$ {& a( u* T4 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" E: A& z+ ~/ F# R! c: Q# p @,root.eventcontroller.simTime);
7 \, w6 T9 q! i$ \+ e8 u @.HasOrder := false;
( j( s( ?: c; i @.DrivingHome := true;5 Q6 D7 p9 _( P0 l8 R
rgManager.tryToStartTransOrder;$ Q& v0 i0 T$ F5 l
if @.Destination = void
- D6 ~) `( h3 g4 F1 N$ x+ m then -- no transport order for vehicle @4 _0 N) w0 h. n$ _" @ P
@.Destination :=
- S) z6 {% R1 E& p9 l rgManager.nearestFreeStation(@,track.~);
# t) l! t% X4 h" n, y3 k newDirection(@);
. [" g3 v) }& M: E& @ if @.Destination /= void then
9 A5 K+ r. M8 K4 M, e4 Y @.Destination.NumReservation :=
6 p6 J# c& U p3 L& M# Y @.Destination.NumReservation + 1;' ^: q! A+ x% J3 b9 h7 r5 p
end;
% |; K [, b( G( B. L8 H @.CurrIcon := "drivingHome";+ K8 l1 F0 ?9 N8 [- l/ F" C! F
@.DrivingHome := true;
+ z% b4 @( A0 G, Y end;% M" c) C& h' ~* b. w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* a- v4 l' a7 \% t+ p$ M- ? part := @.transpOrder;
) ]+ P; ]+ U y' ] part.move(@);-- load part
9 B! {& M/ s. L7 K* E4 g) E# ?* O6 C @.CurrIcon := "load";7 F8 ^3 t+ _1 n1 o/ A5 l. c- s
GlobalDistObj := part.globDestination;
4 G( t$ p" V3 a1 P assignLObj := rgmanager.rgAssignL;
6 s$ T& `! g6 S: `* ~( | row := assignLObj.getRowNo(GlobalDistObj);
/ T* Y: r- q$ v* F) g. \) \ if Row = -1 then -- since 700 N$ Z9 F$ c0 m/ @3 |# I K- f
if lan=1 then$ E4 H: V% m- g ?3 k7 @: J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 W/ s, h$ G* s( p! _4 f9 \+ P: y
to_str("in der Andockstation: \"",?.~.name,"\""));5 p0 f$ I# b' X) p5 L: D( z, S- x
else
: k- z; {9 z6 t2 z$ ?4 e- t# D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 i( b4 ~7 ^0 T( |- h. x- v to_str("in docking station: \"",?.~.name,"\"")); : @: C; R$ c$ J
end;
+ i1 C$ M6 c% ~ else4 s+ u! I Q# m m9 y7 B
@.Destination := assignLObj[1,row];
+ w; Q5 E* c' ^( Q# ?* R B7 Z end;
* u/ n( E) I5 ~ G7 H newDirection(@);* [9 U& P7 N! k2 Y; c5 @
@.HasOrder := true;( O8 U' e) e; @) H) O
end;4 r" h7 G* F( Z; S3 d4 p# b/ ?
end;. @$ q" g; P7 k; C) B' T
end; -- of the method
, m# V$ n. }4 ^0 N+ z" f* y4 ^( U |