/* called by: entrance ctrl of the object 'track'
' B. G* A+ L# t! p9 S: O*/
8 o9 B; Y4 t& `) y1 j3 mis7 l/ ^8 d! m/ V: u8 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Y7 w) s1 c. r. B/ Xdo {8 M" ~( o; G' @" g7 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 h+ V7 }# q9 |" ?# q if current = @.Destination -- else return/ P+ F8 t. `& t
then
" D8 C: H2 h$ [0 U- W8 n- g @.Destination := void;
8 Y6 V$ m3 m" H8 y6 p- W if @.occupied then* R5 ^# {& t. n! p5 h0 f( o! q$ N: l
part := @.cont;
0 d! ]' a, I2 u9 U% ?: n/ |" a @.transpOrder := void;
; y& X4 s M0 _1 u8 j8 Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, ?+ k0 H- p8 o5 n9 c" d3 Y# W
@,root.eventcontroller.simTime);
; x/ D( ^/ F M4 e @.HasOrder := false;3 I$ l' G3 V0 w
@.DrivingHome := true;7 n. J2 p: e( Q9 l" G" _
rgManager.tryToStartTransOrder;) g2 J$ r' F Y* ]
if @.Destination = void- w& B$ ^8 g4 h. _/ n* ^, k6 q
then -- no transport order for vehicle @7 ~8 q% F8 i( O T9 L+ l+ A3 ]% L
@.Destination :=8 s$ \1 N# W0 P' S: n! c
rgManager.nearestFreeStation(@,track.~);4 N( o) g" ]% I# b- E/ Q: q1 ^2 u
newDirection(@); @, s W. Y1 k" H) U
if @.Destination /= void then4 B+ e7 k' M/ o
@.Destination.NumReservation :=# e% z) C7 a _6 @1 C) K$ @& h" l5 S
@.Destination.NumReservation + 1;( @ Z/ q7 G; C
end; k( Y* ~9 [* I
@.CurrIcon := "drivingHome";9 v1 i" G. W: m* }# D) U2 [8 v- c
@.DrivingHome := true;4 T' Z# w5 q+ s7 _
end;- @/ a# [2 h; R$ D6 y3 b1 n, U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) l( M, X6 V* E
part := @.transpOrder;
0 A, v1 T% j; O, N' T part.move(@);-- load part9 e$ G1 e Q+ b6 I
@.CurrIcon := "load";
0 H+ k1 A: |: e) n* h" ^ GlobalDistObj := part.globDestination;# U) b% p$ S) A! T. s9 [/ X$ U
assignLObj := rgmanager.rgAssignL;9 Z' C" X/ A r8 ?
row := assignLObj.getRowNo(GlobalDistObj);
|# f# M. G4 m6 y4 w. w if Row = -1 then -- since 704 j5 c! e5 P5 X% g% \( u1 s" d
if lan=1 then
" A! b4 A- V& |1 ?8 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& v% k. M5 }9 u( ?7 V to_str("in der Andockstation: \"",?.~.name,"\""));9 c. ~% S; b7 Y, [
else
0 U1 o _ w- i8 J1 m& D& Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) J' X) t$ W$ C, n! a to_str("in docking station: \"",?.~.name,"\""));
. Z- E8 ?5 K' L/ {0 N- j& a/ p) L end;
' v$ X6 w5 g% u; G& y$ o else/ J+ j, s& M% ^" B
@.Destination := assignLObj[1,row];0 J- f3 @( K* Y* d/ P
end; g/ D6 u* f0 W; A; |
newDirection(@);8 I& K6 s) @- s2 n3 v- l
@.HasOrder := true; R$ m. m: z) P2 c" q% |0 r
end;
" c" k, p5 d1 T end;
% Q6 v0 v* K' S+ x- J3 l+ dend; -- of the method* C6 ]- H+ v: }0 ~7 T
|