/* called by: entrance ctrl of the object 'track'. b- G! y$ B) _; u0 E- m
*/7 t* L1 F9 x2 x# K; t
is
) v3 w0 {7 ^; [( Y% a* m* T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( M" p; }8 r" p% qdo3 Q8 o/ H; `. h! j& {; D
Lan := rootfolder.Internal.Tools.AOLlanguage;9 F4 R! B$ \. _3 @0 W7 S+ S5 O
if current = @.Destination -- else return, v. q& C( Z' k8 [0 r; S
then
; X4 l/ K$ S- A% A% t; d @.Destination := void;
1 G" k1 O' _/ n5 W6 |/ l6 y8 K if @.occupied then
7 a' f9 m5 q3 x t5 G P part := @.cont;: w' x" T3 ^; [1 o% l7 v2 g$ B M* ^
@.transpOrder := void;
3 |9 d& }# I# K6 h; G; n: s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 @" V: D: Z' e0 ]- s) R. V% U
@,root.eventcontroller.simTime);9 L5 @6 z9 F+ r. ~- G% d4 q) Q
@.HasOrder := false; N2 b% v( ]6 i5 V# C8 x
@.DrivingHome := true;# k/ ?/ O& m; h
rgManager.tryToStartTransOrder;
% A4 e$ t( A- R! Y if @.Destination = void7 ]( O( Q( }/ U3 H3 r
then -- no transport order for vehicle @3 J) V. b4 U) B" ^" g' f
@.Destination :=9 y2 {4 _5 l/ v; s
rgManager.nearestFreeStation(@,track.~);7 T* u/ i/ ~3 J3 p
newDirection(@); 6 Z4 {) E/ n" K7 }. F
if @.Destination /= void then1 Y& m0 H$ S- R* B; I" [. V
@.Destination.NumReservation :=
6 b) T6 c/ |2 ^; E" b @.Destination.NumReservation + 1;7 B8 ^2 i6 R% V ~; q
end;) j0 N' F5 b. T$ F! ^ D
@.CurrIcon := "drivingHome";
' V5 X" o# B+ N- e$ |' M+ b9 F @.DrivingHome := true;
2 u4 j( g3 P; Q end;
7 A( e/ f' t' V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 `% Y! N2 h _1 ~; A3 j$ U4 ] part := @.transpOrder;! r A7 N* C4 p
part.move(@);-- load part
+ R. H8 D1 {0 J/ h @.CurrIcon := "load";2 l0 x; R0 @1 k3 Y8 d @
GlobalDistObj := part.globDestination;
+ C, d0 ]" @$ L assignLObj := rgmanager.rgAssignL;
6 A! \# u, @- ?3 a, e row := assignLObj.getRowNo(GlobalDistObj);
8 N/ y$ f( Y) Y6 X if Row = -1 then -- since 70% [; r1 R$ V. u3 ]8 c
if lan=1 then' @, f2 B" l8 T( T' A. f, n' [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ `* a5 n1 b/ Y5 U1 c3 b: d o& _# W% A to_str("in der Andockstation: \"",?.~.name,"\""));
$ a D% i3 c3 O5 u! m9 y& i else
/ s' k2 [) w" N* g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; }' t3 Y, R2 Z! t. y; ` to_str("in docking station: \"",?.~.name,"\""));
% B! V2 [ Y: n" t# v3 q end;/ a K/ g( z( f) X
else: ]3 W$ q, T& f7 d N7 i
@.Destination := assignLObj[1,row];
: W! D0 ]9 k; P9 f" d7 ?0 k end;
# M, t6 L2 f' l2 Y3 f newDirection(@);
2 _7 }! z8 Y' O- \+ [ @.HasOrder := true;
& n7 t2 u' I% l' ?8 z7 @7 v end;/ W. [, V' G1 Q
end;
; |* Q( L t+ e* D6 H( R2 s; _8 Jend; -- of the method5 Q+ f/ E. I3 o
|