/* called by: entrance ctrl of the object 'track'
% m1 I9 C" n l# C2 R*/
4 J! r8 w4 |: U: J) Tis2 X1 U, g" v9 l1 i* M. }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 I/ O _8 Q; h3 w2 ?
do
# S: x" V: d, s2 f7 L Lan := rootfolder.Internal.Tools.AOLlanguage;3 R! }3 C6 {3 W) U2 T
if current = @.Destination -- else return3 p' f7 e' I8 P Q* L+ b8 [
then
6 c l3 L% W8 H9 { @.Destination := void;2 ^/ {' F& z4 |. ?2 X* V: t5 ~
if @.occupied then
$ X% J$ o+ X" @& V3 P0 i part := @.cont;4 a2 P* M- D! {2 }
@.transpOrder := void;
4 f9 O& b# V% e2 B5 F! c) e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# j0 z* g& _5 c9 G5 F4 ]1 _
@,root.eventcontroller.simTime);' Q- n2 _8 N: V, U
@.HasOrder := false;
; M, t( U: j# Z @.DrivingHome := true;
' Q; Z; Y* K0 }1 o0 n8 ` rgManager.tryToStartTransOrder;
% B; u, {1 i. V6 z S) G if @.Destination = void
: O. ?9 v$ i$ |+ `3 V. B+ J then -- no transport order for vehicle @; a; h6 Y* |3 P3 Y8 @1 y
@.Destination :=
, k! {+ J' t( w1 j1 ^; j rgManager.nearestFreeStation(@,track.~);- T* j1 F/ o: m0 r2 U! c
newDirection(@);
7 m4 \' U2 Z4 H+ }2 d) D8 [. K if @.Destination /= void then* D1 V3 U+ b: C e+ O3 q- l
@.Destination.NumReservation :=
5 n* x# t2 }2 i! k @.Destination.NumReservation + 1;* e' q# L- u2 J; ~4 S$ u" F) E! P" s
end;! F0 [( q1 i# m6 S
@.CurrIcon := "drivingHome";
, U3 y7 s* c8 D' }' W. Q( q K1 V' p @.DrivingHome := true;
0 A2 g& G3 ?; [) `$ H end;# K+ T( f* `- n9 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 e+ D3 u/ ], |* v3 ? e$ z# e
part := @.transpOrder;
X( f, h& X5 d9 ^0 u part.move(@);-- load part
8 U1 g7 J, i, P! _4 d @.CurrIcon := "load";
; r" A1 S* O8 M GlobalDistObj := part.globDestination;
4 T, ~6 t9 z) G0 t: w& t assignLObj := rgmanager.rgAssignL;" p2 M3 M9 D6 L1 l4 R4 Y: e6 u
row := assignLObj.getRowNo(GlobalDistObj);
4 z8 Q6 I9 p, P if Row = -1 then -- since 70
2 G q1 x* h: S2 H! n4 o' F if lan=1 then
, k7 B6 i+ e" Q& n' } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
i: O- X1 F2 j. y to_str("in der Andockstation: \"",?.~.name,"\""));: ^& ^ d# y* t6 `+ T- ?
else
4 W" E' x1 r; z& O: ?2 J7 r% [% t- t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 k5 z6 q9 h9 U0 n' ` to_str("in docking station: \"",?.~.name,"\""));
+ q# V# D/ R' b* @2 V$ ?/ D$ O end;" E R7 {* f' `, `
else
0 f6 O1 X7 T B( p @.Destination := assignLObj[1,row];3 P5 m3 s7 u) M& y1 d4 g
end; 3 r: n% O$ H/ {1 E3 P# o
newDirection(@);& A- x1 b( o5 N
@.HasOrder := true;
- y3 r! x$ G$ S- A ? end;5 b' H6 N* S; O% P4 ~
end;
# C) r5 Q- [2 H* nend; -- of the method
( k3 q5 w- R* w* s& C* [ |