/* called by: entrance ctrl of the object 'track'
7 |6 B9 t6 P) u3 \) c$ \*/
& k- [% O! z* ]4 `is% ~6 _1 c* j; [8 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 B$ U4 K7 B! i* j6 k' @6 J; y2 l
do
' u! G1 }( R. H' \ Lan := rootfolder.Internal.Tools.AOLlanguage;: r; \3 f3 ], |9 M S
if current = @.Destination -- else return2 A+ c1 S6 }8 R" V* K
then+ o1 S& @4 ~/ {( D& V/ h1 k9 S
@.Destination := void;& D! w3 q) e* @8 U; E! a ?
if @.occupied then) P4 P! M6 Q! V Y9 c
part := @.cont;+ E1 n! b4 C3 }' V6 \3 u i. v
@.transpOrder := void;+ T" ?: F9 n2 e/ f% w: v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- B& m3 ]. ?8 [7 Q" e; c; ] @,root.eventcontroller.simTime);, ?8 H1 O& J& U& v, ~7 N
@.HasOrder := false;0 Q( O+ X: a8 i7 L7 a! s" w. _6 y
@.DrivingHome := true;' q3 n' w( H: c* f( O, {# Q
rgManager.tryToStartTransOrder;& O: B6 E, Q3 Z! h1 m
if @.Destination = void+ @: _9 B9 \0 N' {" G
then -- no transport order for vehicle @
# r N3 ]# v; B- A @.Destination :=
. D# g; P9 O* {7 T2 R. [0 [ rgManager.nearestFreeStation(@,track.~);
4 |+ r9 k7 b2 ?8 I newDirection(@); ; H" L6 h. [- z7 o, [
if @.Destination /= void then
; d/ _1 d& K* W+ s8 z @.Destination.NumReservation :=
9 D. P9 s2 J4 D- {/ J) { @.Destination.NumReservation + 1;
* L. S2 ]+ l. \9 g" b; p$ U& ? end;: Q1 |- p+ W0 l1 Q m5 @( y5 G
@.CurrIcon := "drivingHome";
. E2 u- F& ]/ _) l0 u. G8 P @.DrivingHome := true;
8 z! j" e9 ] N& N$ {7 U! U8 i1 U end;" E( a" ^7 _. ^& t# p7 \0 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 T0 W6 T. f6 y! }4 D
part := @.transpOrder;
/ J- S, P$ K8 J( I" A1 j part.move(@);-- load part+ t+ _7 z* V; v* S% c8 Z
@.CurrIcon := "load";
# w7 k! Z* o# \/ T {; g GlobalDistObj := part.globDestination;/ D- D6 Q7 W+ `+ k
assignLObj := rgmanager.rgAssignL;2 r4 d1 ?, o, d$ r$ ~4 ^
row := assignLObj.getRowNo(GlobalDistObj);8 ^6 V6 O1 f7 _9 O
if Row = -1 then -- since 70
/ t# b5 \' J/ u# o# M if lan=1 then& O1 X! q5 f1 j1 X7 i, d, ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( v6 E* W2 T! d& P: h' t0 y- V
to_str("in der Andockstation: \"",?.~.name,"\""));4 ]5 C* K4 U' ` u$ `0 q' W9 f
else
, d7 {% \, v0 b8 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- X( Q2 z( w( T& P+ @1 l
to_str("in docking station: \"",?.~.name,"\"")); ( [. S L% B& l- A+ S; V. Q
end;
, D% k( S1 h9 I! F else9 M7 Y; o' q. F9 U. n; a* B. G
@.Destination := assignLObj[1,row];
- B0 b4 s- r0 Q: d' \ end;
+ M Z( j. W' U2 j# l A' V newDirection(@);( D( w* t& c' D( V. M8 G
@.HasOrder := true;5 N: l. A$ |" Z, Z% d
end;( e7 K* G& W/ m7 J0 }/ M
end;5 e6 c% Z& ?+ y9 O g( ?6 J
end; -- of the method; Q' U$ `5 t: h2 _, b
|