/* called by: entrance ctrl of the object 'track'+ [( J* R3 s% m8 s4 F
*/% e' Y! I4 ]8 f7 n. N/ u# P
is
8 U- u3 j/ ?; m part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ^' t/ b( R6 G6 }0 b# H
do% A8 ?9 A% K$ z& |$ K
Lan := rootfolder.Internal.Tools.AOLlanguage;, `# Y( A5 ?2 A# R. |
if current = @.Destination -- else return
) T, j& ?% ]! x5 P* K ?" n4 k then
1 b% m$ k ?9 m4 @& L @.Destination := void;4 f- r5 w' q, s# N, D
if @.occupied then
4 }' {! r/ p7 A& U& T4 | part := @.cont;
/ u0 F, B( w3 @& @ @.transpOrder := void;
+ J1 ?( e3 ~5 O9 U% h9 z* h# l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ R+ u/ \2 y( V _: m& j$ W% e9 w
@,root.eventcontroller.simTime);6 ~$ Z W0 D' O5 U
@.HasOrder := false;
6 u, y! f# L8 i$ v8 V @.DrivingHome := true;) A6 g" n6 U3 X" x1 @
rgManager.tryToStartTransOrder;1 g& Y4 x: [) A. ^9 e. V; ^
if @.Destination = void
* S" F& x! \ R" A then -- no transport order for vehicle @# m$ y( [/ b. p
@.Destination :=8 ~$ f% Z# W4 O
rgManager.nearestFreeStation(@,track.~);
+ `, C8 \# G! V9 K' Y newDirection(@); 8 V/ s) @: S. {' V) [+ F8 b
if @.Destination /= void then% r: O1 {8 a/ {! v) k4 B3 q2 ^
@.Destination.NumReservation :=4 g9 }, D1 M& v. z+ H& L7 W
@.Destination.NumReservation + 1;
4 I' O4 f) l! X* A end;5 X! ~5 Z+ f6 T* G* o
@.CurrIcon := "drivingHome";; c/ K0 |8 T/ Q* d [# t
@.DrivingHome := true;6 ~6 G- `+ J/ _- l+ x
end;5 P+ m2 p4 x% h, x4 v+ M8 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 }$ r& b- T2 I1 }
part := @.transpOrder;
0 [" O: F) P% G$ D+ S. q' M part.move(@);-- load part
3 a8 M6 s1 l) q8 s" z8 B9 f0 U @.CurrIcon := "load";4 ?6 U8 w z( @8 C+ y* B
GlobalDistObj := part.globDestination;
" s4 j* a0 l# C# d assignLObj := rgmanager.rgAssignL;4 g3 M; m3 I" F& E
row := assignLObj.getRowNo(GlobalDistObj);
3 a3 {% Y, I$ a' `. o, v if Row = -1 then -- since 707 W2 H& ?/ B0 S+ B' {5 F% t3 R4 i
if lan=1 then
1 c6 [+ `. v9 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: w1 {& A7 g, l7 G, P to_str("in der Andockstation: \"",?.~.name,"\""));
, z; N: ~7 ]* i, t/ | else3 S+ r0 \6 g2 B% q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. H! G P6 G/ h( V6 r8 _ to_str("in docking station: \"",?.~.name,"\"")); % G, F2 e8 o( C; Q
end;! H6 B# p" z" R! L, f
else
+ c& U/ X, u' O4 r' a/ C @.Destination := assignLObj[1,row];. p) y) [& h4 f" L& u( m+ [
end; - A; A, y% X" g" F7 Y
newDirection(@);
$ Q- y" p" T* E( M c) D @.HasOrder := true;
& Z6 Z2 G& Y$ Q: f4 w end;5 |+ c r. S0 p1 e2 U, C7 c: c
end;& H% T( l* o* `; O
end; -- of the method! y' f7 {- R: f: j, i; t) y
|