/* called by: entrance ctrl of the object 'track'6 {( O w9 z! t* p |& y6 O- j
*/ r4 l4 O; u) }3 f1 Z
is' b& N& f! }0 i0 T. m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# t. u( _) m) t3 t0 e" [, U% Mdo9 _1 Q3 U n" ~$ R5 K
Lan := rootfolder.Internal.Tools.AOLlanguage;% P. u) h& \0 e
if current = @.Destination -- else return5 x, p C) K- b! r3 r! ]! y; [
then7 \, | P$ w1 H; U1 n& G% g/ r5 x
@.Destination := void;
, h0 N# A) J" l% a2 p9 u if @.occupied then: D4 x7 a* g# y( |* P: d
part := @.cont;
, j4 h% _/ P6 R7 Q" R( O6 ~ @.transpOrder := void;3 O4 A, P7 Y& H6 u8 q) `# x" Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- e% z. i- C) V7 a9 i! A) Y# U- ?
@,root.eventcontroller.simTime);
8 R. g4 o% n3 h: T+ e' r6 _0 P2 _/ { @.HasOrder := false;
; H' Y. b; w J2 Z$ C @.DrivingHome := true;
9 z7 _& `9 Y+ w- _. n rgManager.tryToStartTransOrder;6 E8 U5 F& S0 ^$ Z i
if @.Destination = void
' A. @3 ]; h" T: Q6 e then -- no transport order for vehicle @% O M: \' t, X, e# o% s
@.Destination :=
d3 ~# m! r* Z2 C; A rgManager.nearestFreeStation(@,track.~);% g4 T* W/ z' Q# K1 ^/ v! g, t
newDirection(@); - j2 R: ?7 R, ]/ a
if @.Destination /= void then2 z# U j ?7 }. d
@.Destination.NumReservation :=
: o3 d; V/ L8 o. k' ?6 M3 } @.Destination.NumReservation + 1;- |4 y8 Y7 I% u, |- t
end;. ~0 e6 N& c! @; S+ O: \
@.CurrIcon := "drivingHome";% }9 a$ _" b6 b5 }" u3 o( w4 q
@.DrivingHome := true;
; |9 s8 I1 f1 v- I1 y( c end;$ `9 M8 ~/ y" ^, {0 a: y5 J0 m" A( a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" F: v9 y0 K0 F- } A) `
part := @.transpOrder;
' w' D" ?' t6 o. {5 J( S1 q% N& a part.move(@);-- load part" A6 h$ x& `- ]0 P; [$ ?2 {
@.CurrIcon := "load";
; n' F3 ~) f% g" u. O8 ^* H" p GlobalDistObj := part.globDestination;/ L* Z {& W. L# W
assignLObj := rgmanager.rgAssignL;+ e: @9 y9 a% p t f
row := assignLObj.getRowNo(GlobalDistObj);
6 D& j# f; e- t) |4 s" o if Row = -1 then -- since 70
) t/ q/ p3 g. Y7 F( k) ] if lan=1 then" W: }1 T: k k9 d# u/ R8 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ G$ a8 w2 z, d% n. D
to_str("in der Andockstation: \"",?.~.name,"\""));4 x. a) o" e9 q% h$ M$ g
else
2 p3 @1 e T- _2 o$ c6 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ o' {$ m( o* K' B+ H
to_str("in docking station: \"",?.~.name,"\""));
) u: Z+ a" r2 G k$ t1 x) j end;
- b+ ?+ r' w1 d* _! g$ k" m else. `2 |4 |1 w, o2 Z
@.Destination := assignLObj[1,row];* U( d' a+ Q A9 g
end; & f# k$ P% U% ^, m& [
newDirection(@);
2 K4 N8 C6 X6 O7 I& w& P @.HasOrder := true;: i4 i* D' o/ n$ n% Z9 X- s, R
end;
# F& J4 v0 h; v end;
5 b! N+ h+ | t( f, Jend; -- of the method
5 {$ s/ r0 R2 _9 b- d |