/* called by: entrance ctrl of the object 'track'
# P6 x8 b1 c, E*/7 e( B k( V- f. I/ n$ |, S1 N
is
* y3 f8 ?0 Z& ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 d1 Z) s' W* H2 Q2 C+ O( g( j4 Pdo h9 `8 `3 p1 r* [
Lan := rootfolder.Internal.Tools.AOLlanguage;
( T/ z* J1 a3 a4 { if current = @.Destination -- else return
5 v1 l i0 m4 a then
7 x6 e- `9 e0 \ @.Destination := void;
1 J, O6 }$ e' r5 C" U& Z' e5 J if @.occupied then2 |' u' y- S- W1 v7 l7 w, a" P
part := @.cont;, y" a; S9 l5 G" D0 F% ?. Y8 k& G% V
@.transpOrder := void;' e; P3 t! [* d: Z0 E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, o% F% u1 |1 \' j) E3 N0 X @,root.eventcontroller.simTime);
, |4 e: s4 F A! ^( u( ?8 B) d9 d @.HasOrder := false;6 L" }4 d, x% N6 J# S* c! M
@.DrivingHome := true;
$ G/ j! g, A. x, ^0 n rgManager.tryToStartTransOrder;
5 D ]4 H$ t. R7 D if @.Destination = void
6 |4 d* ]; t; O J; Q: F& ~ then -- no transport order for vehicle @
# x% ^; @( r6 |. `' R6 f' G @.Destination :=. _ `# |* P- ]. e+ g
rgManager.nearestFreeStation(@,track.~);! K8 H7 N5 M& u5 m+ h/ E
newDirection(@);
" f) ~1 J2 c) N! Y$ d if @.Destination /= void then
/ z. X3 S( [, @- y @.Destination.NumReservation :=5 p% S+ H. ]5 t7 Z
@.Destination.NumReservation + 1;* u# R) w ~6 T7 T& G9 ^& K
end;
! N. ^9 f) R, e9 W/ C* q! g @.CurrIcon := "drivingHome";) j4 v9 k; P2 u
@.DrivingHome := true;1 }& I* J7 t) V" _( A$ i
end;% c7 Q8 r2 s/ N+ P% O9 E3 r" a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 q9 I: K& Z1 k% L! t1 j9 h% K
part := @.transpOrder;( m( | E7 h: L. C+ D( k0 H
part.move(@);-- load part
+ u% } b, [! g. _2 H+ N& [ @.CurrIcon := "load";
* d# q2 _! G G GlobalDistObj := part.globDestination;
. Q2 I1 Q+ T: ] o% s% ^ assignLObj := rgmanager.rgAssignL;
) b/ A; h/ ? m row := assignLObj.getRowNo(GlobalDistObj); p! [8 t. a/ B! c/ |$ N
if Row = -1 then -- since 70. f2 u8 H, _4 C; j! u* y% z
if lan=1 then
9 n6 Y! A q& K2 j% Y1 f2 o' Z" b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 ?. }, Z* ]$ l) U1 p j* R. Z( l to_str("in der Andockstation: \"",?.~.name,"\""));
$ i9 a1 ?! t8 g1 S: O8 \ else
) O; i" w9 G- {+ F7 o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 k$ J `& @6 A Q0 `" x, E( a* n& c
to_str("in docking station: \"",?.~.name,"\"")); & W' ?- a6 ?# C8 s
end;0 {# w/ D# C5 L
else
3 U( D1 {6 F( _5 I/ i! ~0 T) t, O0 _: I @.Destination := assignLObj[1,row];6 v8 v: O4 r& y. \
end;
3 _$ W3 j+ e2 D4 u+ B" w/ M+ Y" p! k I newDirection(@);4 U" Q) V0 e I; }
@.HasOrder := true;; T: t2 P# r6 }. e
end;, `* Y! e+ W8 O( U2 W; H# N( l
end;7 }7 Q# y( P O5 h, H/ G% A6 v
end; -- of the method
3 K2 o6 E2 E a) ~ |