/* called by: entrance ctrl of the object 'track'" j6 D- Z$ e; I0 W
*/
. M( Q' ?* P0 ]. iis+ f& l$ l* F0 e0 }2 U4 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% D- @/ Z4 @ Y/ W3 A: r
do
; s, v2 t; ?7 ^& c2 c7 g Lan := rootfolder.Internal.Tools.AOLlanguage;
/ }$ l Z- d& M4 u if current = @.Destination -- else return( |, J# I: q, j3 E$ i7 A
then5 I* L+ l; Z) z1 }1 o3 u2 J
@.Destination := void;
+ z/ T% O6 O# j4 B j if @.occupied then
' x" M- x# K' h# M4 q: m: w part := @.cont;! m0 `8 F b: k$ I# p1 f" k" a
@.transpOrder := void;
# \) g8 t: }& R& e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ A; \! a* ?( V$ Z7 d
@,root.eventcontroller.simTime);9 k8 D0 D: ^; K D0 O) W
@.HasOrder := false;
9 F' J- s1 N; ?6 Y' m( y; [ @.DrivingHome := true;
% ? @" X& q$ r8 p/ U rgManager.tryToStartTransOrder;
% ^: i( F. T# m; A6 G( {! o if @.Destination = void
$ `( ?% `: f$ H \# P+ V/ l. w% P8 g ^ then -- no transport order for vehicle @2 s/ ~9 A N: Z. `4 T
@.Destination :=( k: j3 W: n2 b. k+ |
rgManager.nearestFreeStation(@,track.~);
& j; Y0 t l( @+ s newDirection(@); 4 j3 Z- l O8 Y4 v
if @.Destination /= void then# H0 r {; g# Q; S! [6 ~
@.Destination.NumReservation :=: |, i3 Z4 g1 C/ j# ]
@.Destination.NumReservation + 1;
9 o; K5 @7 S1 |! f( i5 \2 z7 I end;
( b7 M8 {, K+ o6 R @.CurrIcon := "drivingHome";6 x9 v1 q1 L: v& _4 t
@.DrivingHome := true;
& r' E+ [9 a; A1 k1 A end;
. H; L. F$ B5 H* A; b else -- the vehicle @ is empty, both vehicle and part are in the same dock station; i3 K0 y9 c$ t ]2 ?8 A
part := @.transpOrder;
4 Y1 r" q' t; }( t1 F part.move(@);-- load part$ N) ^9 v/ O8 m- p
@.CurrIcon := "load";/ D! [( {( S$ Y/ y, z
GlobalDistObj := part.globDestination;/ K6 m' f6 v) U) w% f ]8 V
assignLObj := rgmanager.rgAssignL;
3 e+ K( {6 w, i7 P; p0 m! \/ M* x row := assignLObj.getRowNo(GlobalDistObj);
2 c* T( \0 q& z8 | if Row = -1 then -- since 70
( e: s! d; K4 K. Z if lan=1 then) T2 E) Q, A* k# K5 c2 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# T ^+ I: W4 q& D to_str("in der Andockstation: \"",?.~.name,"\""));5 a5 L' H0 [1 N3 l+ F( \
else Q ]5 w+ n* ^5 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 M, r' S9 s7 m8 c% R to_str("in docking station: \"",?.~.name,"\"")); 8 O6 [) k/ f; b$ Z
end;) o8 ]- g/ m- e9 G6 y% H( i- T
else
) a6 F& o( c- Z @.Destination := assignLObj[1,row];
6 x( E3 P! ]- _ end; : _: F5 D; h; ?2 v$ H' h+ J
newDirection(@);
" t" ? d4 L* k5 a @.HasOrder := true;1 q8 }' x m( O" a- N
end;
2 G m, z" ?7 n end;6 [$ e) h" u( `. h0 k
end; -- of the method, P5 B* d, R1 R% P. b3 z
|