/* called by: entrance ctrl of the object 'track'
! E/ }. K$ p% O- A% c* i9 f*/
0 J/ b/ |7 P+ k3 M. mis2 m) e- u. t6 X2 W( \# z" }* K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 X7 ~/ j: @2 Q
do' r7 Y1 K5 M0 k* o
Lan := rootfolder.Internal.Tools.AOLlanguage;) f$ f. X$ m0 T1 V: ~
if current = @.Destination -- else return V; Y7 T7 u: g' i0 l
then
# N: f( E. e0 q! x6 e& G @.Destination := void;
+ q0 ~, q& P5 Y( { if @.occupied then/ C6 q3 W1 @& b$ E
part := @.cont;& v6 B. V9 W" F B5 |$ w- p( q Y
@.transpOrder := void;
1 P3 Q' l' u, h2 o9 @! L% S! |4 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# V' s4 x' a/ E @,root.eventcontroller.simTime);
" |* I' x' _% F, A @.HasOrder := false;
7 O2 t Z% N% I/ \2 {( E9 }/ V) k @.DrivingHome := true;, S# z$ j7 |3 m
rgManager.tryToStartTransOrder;; i8 E$ J# B. P9 o5 e6 g5 M
if @.Destination = void" c+ }1 W! t1 ?7 ~7 b4 n4 y
then -- no transport order for vehicle @
" z% D8 u9 V6 k1 b! w% N" t) ~ @.Destination :=
3 B) d' T! p' b1 \ rgManager.nearestFreeStation(@,track.~);$ I( j4 I) @ R/ f& {
newDirection(@);
6 n+ {+ r1 x! e" B* I if @.Destination /= void then8 P8 d2 n/ s0 E5 H) e/ I7 c4 \) g
@.Destination.NumReservation :=9 y6 L1 U$ r9 G2 F) Y
@.Destination.NumReservation + 1;% r: B( U; q2 x( K
end;7 A. t" L7 ]' q" m9 g
@.CurrIcon := "drivingHome";4 a! F& v7 m, V( D5 T
@.DrivingHome := true;
: J; M4 q$ I2 s) {) S; @ end;
3 q. m+ b& C6 q1 c% f2 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. t2 ~( W! Z& f: N. X+ ^; N part := @.transpOrder;
) ^; j* g& K% \6 {8 L6 T part.move(@);-- load part$ P) }! `' `5 i
@.CurrIcon := "load";
6 L/ p: F9 [+ @! i/ p GlobalDistObj := part.globDestination;5 q9 b9 ] U3 ?, y) W) Q7 \
assignLObj := rgmanager.rgAssignL;: ]. B Y) n. V7 w5 z
row := assignLObj.getRowNo(GlobalDistObj);
8 p5 @6 U* k l' a# z if Row = -1 then -- since 70
% d$ c& r$ w( J( R if lan=1 then6 k' D8 @8 ~* w" T" T: N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- [* V# u1 Y( t3 B" P: b
to_str("in der Andockstation: \"",?.~.name,"\""));
0 C! M/ ]% }2 i; h4 t else
8 X; x9 M4 n6 H) E& Q" { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 n. }* B$ Z( t* s" R; i' e4 v
to_str("in docking station: \"",?.~.name,"\"")); i1 b& K6 y) r& s" a% Z. |! o+ K
end;; X `% a" R% g3 R
else6 Q8 ?# \- f9 I6 h
@.Destination := assignLObj[1,row];
* h* I1 g. r+ G end; : X! i- d! C: t6 o" Z+ H w
newDirection(@);
: z1 j( h F4 G- d+ ^ @.HasOrder := true;7 W2 K* d$ J3 c4 S4 h, U
end;
& q* T( f4 j3 @$ L K6 K end;& B, V8 i$ d7 |% a
end; -- of the method5 A* y5 E/ F T' v( m& [
|