/* called by: entrance ctrl of the object 'track'
9 r- |8 ?8 R( `% a# M4 k*/+ U: d* ]: J' ~! x% L
is
( s5 u& k9 h! D: C. A3 Q t part, GlobalDistObj, assignLObj:object;row,Lan:integer;' s* O8 l+ }9 L7 P% C
do* u0 h' K3 b$ H+ C5 |
Lan := rootfolder.Internal.Tools.AOLlanguage;0 p2 i3 p/ H, ? E& H- r% V1 x7 _
if current = @.Destination -- else return
2 b3 d6 V& q: z3 b3 D: B7 O then6 \5 }: y% b% k9 Q/ w7 ^/ w/ f% \
@.Destination := void;
: A2 h7 a' |, `+ M, ~0 X if @.occupied then
4 O/ ?# ^4 K8 W6 O2 z3 |) I part := @.cont;
) z& W; J2 h' [& K1 k @.transpOrder := void;
, `/ ^1 R# w ~# X' G( i( ^1 M1 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ F8 x7 i0 n( l+ K( \5 J @,root.eventcontroller.simTime);7 n( T, \2 v8 V% p2 \, |
@.HasOrder := false;
6 U% S( F- Q+ }( ~ @.DrivingHome := true;
5 J8 C( {1 Z( N+ r; F rgManager.tryToStartTransOrder;
! {1 |6 n& d$ `) A3 L& r if @.Destination = void$ D% E V# V. ^6 C& l- K! e" H* S9 y
then -- no transport order for vehicle @; s0 d$ G: N% w R& T# ~5 q! f
@.Destination :=
" e5 J6 U, u3 g' S- [ rgManager.nearestFreeStation(@,track.~);
3 K* ?6 g7 }/ l1 j- C& z3 ?1 w9 Y+ \ newDirection(@);
* V: x; s7 S9 b! A# \. O7 j if @.Destination /= void then
: N+ H/ G1 W0 `# b @.Destination.NumReservation :=4 S/ g5 N0 J \: ]; `. ~2 ]
@.Destination.NumReservation + 1;
( [$ `! ?. C X& Q end;. [; p/ ?! Q( M+ Y1 z
@.CurrIcon := "drivingHome";
& V, f9 {, v- L% i5 `. R0 v: x% N, N6 l @.DrivingHome := true;# D8 ^. G3 I1 d( g) p. q& Z
end;* f* t- j$ Z' s" }8 v. [9 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 e) J8 }: e2 D% E( n4 A
part := @.transpOrder;
6 W/ R8 y2 X9 ?& J! A4 ? part.move(@);-- load part8 t6 T8 }" s% j# u' ~* `, h8 |# c
@.CurrIcon := "load";
3 I- o8 D% [. J) A GlobalDistObj := part.globDestination;2 v3 p0 e6 j' z W' U6 y3 r
assignLObj := rgmanager.rgAssignL;5 _! q- W! P3 r* a5 I4 c
row := assignLObj.getRowNo(GlobalDistObj);
4 P: l+ c; ]# P6 f, g2 Q! m2 G if Row = -1 then -- since 70/ r2 i. a! j% X, |9 V$ {! \
if lan=1 then& Z# R; H( F5 _/ }0 l+ o! P) a7 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 @; H x5 B' ^ l
to_str("in der Andockstation: \"",?.~.name,"\""));
' ~; O0 j0 a6 s. Y else; [, M5 M4 m3 A6 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 \# P) A! v* m; x* A; o to_str("in docking station: \"",?.~.name,"\"")); 4 K$ D* d( j, y" T; L: \2 `
end;: `1 Z# L' X1 X( O
else' I4 s$ Q5 X2 ]
@.Destination := assignLObj[1,row];7 D8 i6 _' b' w8 T0 h
end;
" A0 S% {) G0 c/ O8 x+ W; { newDirection(@);
5 ~( d, B$ X+ }* |3 W! I! s @.HasOrder := true;
9 ]0 K) Q3 J% C) B6 A- l; P end;
. ^: d) Z3 R* d2 V; H. a) E# ` end;
8 x+ c0 I" |: y4 u( z1 \/ ~end; -- of the method
W m0 G z6 R9 i' [' B* X |