/* called by: entrance ctrl of the object 'track'
2 x' z4 m5 X, j, b*/' C8 _3 o- q: g; x: p
is' R0 K; B( \% K1 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; b: G5 c% X/ l' }8 k8 {& V5 Ido- h9 x* R$ Q- f6 P2 _8 F
Lan := rootfolder.Internal.Tools.AOLlanguage;' T0 \, S3 F# H" v3 v" V
if current = @.Destination -- else return
0 s( j, u& D7 E& q/ {3 O+ V. ~% A then' T& w9 E2 J+ Z6 ?
@.Destination := void;+ E! D, P3 {1 o; y
if @.occupied then$ s, g8 j3 J5 c7 {1 _7 U
part := @.cont;0 R# n I7 M2 x- E
@.transpOrder := void;
! j; \- O& Z. q2 D; y$ m5 p3 E M6 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 m1 v8 w1 c" e* F- z: v, E @,root.eventcontroller.simTime);( e- M8 n. o. O
@.HasOrder := false;* `1 A) l: J9 D$ w5 ~- T
@.DrivingHome := true;
: A; }; ]! o% U% a# Z7 h rgManager.tryToStartTransOrder;% m- a, O; \; m6 g t
if @.Destination = void
' H$ T2 { U! g6 z# I* L then -- no transport order for vehicle @0 R! v" d. N C7 h) U% k1 L _+ D
@.Destination :=& m/ U6 `# x8 {7 ]* N
rgManager.nearestFreeStation(@,track.~);
9 p/ Z+ ^' s. U/ L8 R; R newDirection(@);
# c! q8 W! t% c$ \9 X8 r if @.Destination /= void then
0 g- u8 ~* }2 y- ~2 i' X @.Destination.NumReservation :=4 u' X5 H2 F& I' _# K4 N& x
@.Destination.NumReservation + 1;& a* T+ ^2 h1 a: G8 `3 E2 X4 Z
end;' R( n, q4 I! N8 w g' L& m
@.CurrIcon := "drivingHome";
. p) B% @ |, t0 K% O# j$ @ @.DrivingHome := true;; E5 x* d9 T- U3 o5 f8 D
end;( n! _0 s0 v2 ~0 |# f; M8 H" l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% G+ f. V6 b) b! a
part := @.transpOrder;
* ~; j# k* }. D) F# ?) D4 g part.move(@);-- load part+ Y8 e% b3 r) g
@.CurrIcon := "load";
8 K1 @! U; I s GlobalDistObj := part.globDestination;& Y# N e; i! B- e' m5 W
assignLObj := rgmanager.rgAssignL;
' a1 t) V& B5 Y# {8 X row := assignLObj.getRowNo(GlobalDistObj);- u3 ^! m! T- Y$ R- O! H2 {& s
if Row = -1 then -- since 70! B% e$ E3 ^" f1 |8 K6 Q: S# U# H
if lan=1 then3 Z5 h+ M! J8 ~! S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( d6 p6 X1 L$ }% j, R: z8 u. t
to_str("in der Andockstation: \"",?.~.name,"\""));" W7 c" C) \( D3 I7 ?, g6 f
else' }& C% q6 s9 { l) m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# V+ r4 L" p/ Z' \( u. S( u to_str("in docking station: \"",?.~.name,"\""));
# i3 c4 U4 o+ x" T% l% i5 j8 ] end;
, U$ ` K8 L$ m1 D else/ {( S) a, [$ L& P% v$ G
@.Destination := assignLObj[1,row];7 w" N8 j& w# e" {
end;
, s- t) c4 E* j# G8 p newDirection(@);3 Q3 [ E+ @0 F9 s t: y, n
@.HasOrder := true;
& ^+ \( H/ H; ?2 l( R end;
, X' d) g7 O* R( ~4 w end;: |4 s c: U, C u' b# `5 w
end; -- of the method
9 D- ]8 K$ S+ q' a, Y" M! z |