/* called by: entrance ctrl of the object 'track'2 ~) t, O9 c% p7 v4 Z$ }; C( j
*/
' Y* G* {* Q7 K4 Z, |, z9 D- a7 pis( ]7 {# X0 t" G5 W1 E' [2 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 ?1 _' A/ z. e4 \
do/ F0 e# l; z) O2 B( l
Lan := rootfolder.Internal.Tools.AOLlanguage;. S+ z: n0 h. z; G, h
if current = @.Destination -- else return
4 M9 |- v' o) V% n then- _$ |7 F( U( h+ A9 u) ^
@.Destination := void;7 w: r; i. p- g. r
if @.occupied then
6 s& I, I' {& y+ O, x. a: l. S part := @.cont;
& w' [0 N: i5 C5 F1 K% e- x @.transpOrder := void;
2 f) r8 h6 {8 I8 C9 ?; G- y: E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* @. R- \, p" h2 L! w2 c& f) ` @,root.eventcontroller.simTime);3 w: V- V1 n- v1 a9 g/ q9 T' e
@.HasOrder := false;
! o- W" Z. T2 {* P- x& L7 K1 I @.DrivingHome := true;
7 [$ r* J! b2 j rgManager.tryToStartTransOrder;
' e2 n! p6 [% X if @.Destination = void# }; n# c) J- ?& ] ]% B
then -- no transport order for vehicle @
5 y, K. Q9 z/ b @.Destination :=* @6 _: B/ r3 R( \
rgManager.nearestFreeStation(@,track.~);
: F8 U/ O( }, Y! f3 Z newDirection(@); - d1 v5 o' z0 {% n) m
if @.Destination /= void then4 a# o; D* F+ I Y7 ~7 {
@.Destination.NumReservation :=
# b1 Y& G: t. F1 C1 v% j: l @.Destination.NumReservation + 1;
. L* d3 D: L1 g" N H+ Y1 |* J3 ~ end;
! n& ~3 e' F7 h0 B( }& i4 d! \! e @.CurrIcon := "drivingHome";( |& A) M+ o H% C$ |% J
@.DrivingHome := true;
7 `: p9 L% u, o( R end;4 h R" \& ^7 I3 p% Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 x5 x: j4 R6 I! D& F/ {5 C
part := @.transpOrder;3 R* C- G* ? a$ R! N
part.move(@);-- load part- A2 w9 X' e6 h6 v; \; A7 ~
@.CurrIcon := "load";, {9 i$ [0 q _5 Z
GlobalDistObj := part.globDestination;
8 c& i$ y! |7 T7 I2 {( F& U assignLObj := rgmanager.rgAssignL;
6 e; K6 ] ]# |% |. a8 C0 U( h row := assignLObj.getRowNo(GlobalDistObj);
7 V; ]. Y. s X* `' Q if Row = -1 then -- since 70" K2 L" u$ s0 G4 H' t
if lan=1 then
0 R$ ~, S `) [, H5 ?9 n+ I* P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 S' h- B) ]' ~+ ?* ]. x+ F
to_str("in der Andockstation: \"",?.~.name,"\""));# L. l6 m5 g3 P4 V
else
8 \$ ?. W. r( B& _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% B% z8 j& V" P( s1 ~, u9 x to_str("in docking station: \"",?.~.name,"\"")); ( b, L1 z2 J d& u' f9 d
end;7 b( e0 B, j2 h! `2 [
else
3 r: H4 G3 R: ?1 a; y! k Q7 f @.Destination := assignLObj[1,row];4 I0 u. ~$ Y3 s) I3 O1 O- a* [2 Z
end;
1 d, E& }1 R/ B, z+ j1 w% b newDirection(@);
9 D( h- E; ]2 ?4 o @.HasOrder := true;/ z6 a9 U' c% B6 u2 J! e
end;; l) g, m! U0 {9 y
end;
4 Q& @# z, s6 ~2 |9 O( O* e/ Lend; -- of the method+ v8 w+ G- V5 i; W' S
|