/* called by: entrance ctrl of the object 'track'
+ D: Z2 a8 M, ~6 j! F*/
) L5 D7 X% B! b2 Lis/ X/ t: y! g7 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. r4 w. u& A- u& kdo
5 N7 r. t. T/ h1 [- ^7 F Lan := rootfolder.Internal.Tools.AOLlanguage;
: ?2 \1 J3 ] D5 h# ` if current = @.Destination -- else return
4 }5 ~, X( N/ v' [ { then
7 C& B* N: T' b+ h- i9 I/ x @.Destination := void;
4 P$ W, ^' Y1 ~+ K F* P4 x) L- h0 T if @.occupied then
2 `- X5 A: m, X0 ]; R part := @.cont;; ^4 F L2 W2 h. Z6 `' L
@.transpOrder := void;
6 ~0 Y* M# a# x9 y% h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, k& Z! J6 T% ^+ ^! x
@,root.eventcontroller.simTime);
3 E) C* P1 Y( j5 A @.HasOrder := false;+ B3 o p+ L* e9 U% K
@.DrivingHome := true;% q+ s& l' F5 U. y, h1 m
rgManager.tryToStartTransOrder;+ a6 d& u3 g# b( N
if @.Destination = void, _% s( F7 w' Z8 U* ~* C: y4 d
then -- no transport order for vehicle @
. W/ b" w! I1 q2 |4 p/ h @.Destination :=
+ H* E. A1 Z( ]) L rgManager.nearestFreeStation(@,track.~);1 B- P1 K# y& [3 a& }, r
newDirection(@); ' J! Z5 S) |! @! H
if @.Destination /= void then/ x$ z a2 R- {% G, R+ \
@.Destination.NumReservation :=3 ^- p3 c4 a2 f d1 x* a6 k
@.Destination.NumReservation + 1;
- I* [+ E4 @1 B; ?# H( k2 D) {' z end;2 O3 Y5 y( I" v2 v$ G# h' R8 B* G
@.CurrIcon := "drivingHome";
; W! e9 ^# N# d8 V5 o. V8 a @.DrivingHome := true;
! Q) ?( O3 P K i end;
' u$ e. x) K# I else -- the vehicle @ is empty, both vehicle and part are in the same dock station; H, |0 F" Y0 `+ ?, y/ m2 e
part := @.transpOrder; i$ S5 f. @" j/ V
part.move(@);-- load part
* {0 v0 o+ M3 ~/ m/ i' K @.CurrIcon := "load";6 B. i3 K" j- N0 e- Z5 B" v7 x6 m4 {
GlobalDistObj := part.globDestination;0 Q8 n* f. M! ~& V: i% u
assignLObj := rgmanager.rgAssignL;
$ m7 f' c; o: C$ D9 r+ }. o row := assignLObj.getRowNo(GlobalDistObj);, R- `/ K3 z+ b7 c1 g. P: _' x* M
if Row = -1 then -- since 70( ?. x" ?1 W: ~4 P& @- `
if lan=1 then
4 O: w/ |% P- m9 l M' w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! X( ^4 B" V! Y( \: d7 [9 i to_str("in der Andockstation: \"",?.~.name,"\""));
8 d' Y: S0 p( U1 F7 u else
. W) |- U6 A& ^) |3 n- A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), F$ }1 g' g4 d w& G9 l( t
to_str("in docking station: \"",?.~.name,"\""));
9 |+ Q2 `# h4 x% R5 Y( x# A/ \# m8 x end;$ y) O- J" ?. C0 b u
else* T/ O+ s) i% H
@.Destination := assignLObj[1,row];
2 i+ b6 l1 V$ |! ~' F6 L end;
6 P( K0 L) Q _+ d9 L. f newDirection(@);
5 p2 s7 p, l- I7 C3 L0 @ @.HasOrder := true;
4 Q- L9 A3 O- J0 g end;4 p! F8 k6 y) |4 X. H+ M# B
end;
/ G+ T7 [' s8 o/ A/ Pend; -- of the method# C5 x) C5 D1 O4 c8 X+ Y
|