/* called by: entrance ctrl of the object 'track'
4 `, l% U% l& e \- c( c/ r*/9 m! l: x0 q& e' Y( Z' q. W
is
4 a( K) B9 E s0 u s; z" K1 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 N& b/ w- m, ydo
# V" Y9 x7 k- f& p! e8 r% I Lan := rootfolder.Internal.Tools.AOLlanguage;
; X0 P. q/ K6 [! n8 O; C: t4 F# N- Z if current = @.Destination -- else return
: u; a0 \" r3 p5 z then
H) v c1 z; g( q2 M @.Destination := void;
/ a: Q2 u) h* V7 b: i if @.occupied then
) u* V* Z8 h ]% i! x part := @.cont;. \8 [8 z1 a9 x4 T8 y- O
@.transpOrder := void;# X2 Y# a( d% Y5 E8 j& |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 o2 b* Y: X6 G @,root.eventcontroller.simTime);
1 |# y, ?+ n- D$ J @.HasOrder := false;
& f- S4 v! h9 c @.DrivingHome := true;
% Z- V& L# ]/ B" c! | rgManager.tryToStartTransOrder;! O: i5 U; g2 X; L( T
if @.Destination = void+ e1 v$ P' V" p: l
then -- no transport order for vehicle @
, v$ \% x0 l, E6 }# V' j @.Destination :=9 G/ {+ U2 M6 T( l7 I; N( ]
rgManager.nearestFreeStation(@,track.~);# I) G$ d4 H$ P' {4 A3 M0 O+ K
newDirection(@); " m+ H- f: L: Z8 p% }: C5 ~7 \
if @.Destination /= void then. X6 p% B9 S+ p H! s
@.Destination.NumReservation :=
* \7 y' U# x4 @2 K @.Destination.NumReservation + 1;4 W6 x3 L4 n$ V X3 Y
end;# I7 B) _; |$ X1 |4 J: X
@.CurrIcon := "drivingHome";" I& w+ t- N3 y6 C9 t/ w
@.DrivingHome := true;1 M' p7 R+ c4 U5 ?2 [$ `7 R
end;$ ]! ~6 G P& ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 y, O/ g, f9 B0 H7 u
part := @.transpOrder;
9 ?& E, h+ Q1 _4 e X) ?+ b part.move(@);-- load part X6 R9 a- P/ n- T5 F
@.CurrIcon := "load";. i* [* U1 j4 g: E
GlobalDistObj := part.globDestination;0 f8 U+ } ~$ X- c, E
assignLObj := rgmanager.rgAssignL;
( H3 i# p; Y) B" X: P row := assignLObj.getRowNo(GlobalDistObj);
. u( L+ ]2 K* ?3 R if Row = -1 then -- since 70
3 {8 q: r! l; d2 I if lan=1 then
. T' C5 _: f8 I4 G% A1 j1 q' r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 C' R! c! ?( `0 \* t to_str("in der Andockstation: \"",?.~.name,"\""));
0 l( e: O3 `$ b9 T$ n# ~" P else' F$ l9 x7 J* x1 g; D$ G8 W; j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* O6 q+ t: e' X" l# p to_str("in docking station: \"",?.~.name,"\"")); , \: `0 B' |" X! M; ~7 E0 F
end;, F: E& {5 V- ^. q" W- {* a
else7 G- K4 h- `( e K7 W) ^
@.Destination := assignLObj[1,row];
4 F% k' ` P: V6 f1 g0 g0 H$ A end; ' r& H( f" J0 r% |% [4 a1 {" a
newDirection(@);
: L; C& z5 }- o$ T @.HasOrder := true;: \* \" D+ ?- X1 c2 m R# E$ m. H
end;9 K% K! k. A1 |% W' P. m5 ?
end;$ e: e+ r' G: {) ?
end; -- of the method
3 d8 {" G: j! M8 q a5 e6 i |