/* called by: entrance ctrl of the object 'track'4 J* w6 ]8 A3 S k6 P
*/
, l. M! s1 S4 m! i- m3 V( Lis9 P5 d; G1 r$ O7 o( R# T- F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. B+ n) j3 O$ e, ?! @! O
do
" c" _* C m4 |, E Lan := rootfolder.Internal.Tools.AOLlanguage;
, T( l% C }0 Y if current = @.Destination -- else return* O1 ~6 n. Z# ^) |
then. U4 l& Q$ h4 S
@.Destination := void;
: l+ v2 G! Z* O. k: H, I if @.occupied then
7 {, ~$ G/ L) v% K: h part := @.cont;
. u2 |) l! ^ ]9 a [( U6 I4 ^ @.transpOrder := void;
# L% E# }6 Y2 E8 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 U0 |3 d+ T4 l( @$ o* g# g
@,root.eventcontroller.simTime);' R: E; q2 p! T$ i/ M
@.HasOrder := false;
+ |% |' v* T5 F3 B# |' Q: A5 g" C% ^ @.DrivingHome := true;& z; C4 p G& K2 Q2 \
rgManager.tryToStartTransOrder;
$ z9 s8 \2 V7 A( B) @ if @.Destination = void
- O9 t' J; s0 G$ A' _: W1 C then -- no transport order for vehicle @
$ F+ N" M/ x4 ?5 j1 D% F4 f( u @.Destination :=
6 _+ |/ n$ ]$ _ rgManager.nearestFreeStation(@,track.~);
/ P# _: P T* R' g9 \4 I+ d! u newDirection(@);
3 m3 q) [* R. l6 u% k+ t" ?, ?2 U+ Y& [ if @.Destination /= void then; ?' ^* e1 z! a6 Q, m
@.Destination.NumReservation :=
2 w( u2 s$ @; c* O @.Destination.NumReservation + 1;$ b# n+ E. {6 c& R- O {! {: f+ V
end;( K( f8 O: H8 q @' C
@.CurrIcon := "drivingHome";9 V: b- x* |1 ?3 c* H
@.DrivingHome := true;
$ _' L- t# {( ~# ] end;- ?! p; x) Z% k0 ~, d0 Y3 L5 U. O, @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* T6 P9 V, S6 L. H
part := @.transpOrder;7 Q$ f0 A- K" l
part.move(@);-- load part
9 o0 V2 c' B/ D1 a7 Q4 _4 t @.CurrIcon := "load";, d) r7 U a: G. q+ t0 f4 u. M
GlobalDistObj := part.globDestination; O( {; `* _, F$ \4 c. h! u
assignLObj := rgmanager.rgAssignL;# O7 }" P0 I- y" B; L6 ?
row := assignLObj.getRowNo(GlobalDistObj);( ^8 U7 `% V9 @3 w+ r2 g! r
if Row = -1 then -- since 70. F0 d8 m3 F' N% o3 n
if lan=1 then
9 g p2 m) E; S8 l ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# n; R" ]* g3 C0 @" p
to_str("in der Andockstation: \"",?.~.name,"\""));
6 Q& k. }; k6 T& n. R( G" p else6 ?$ M$ ^* ?$ `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 u9 k: N; M% N1 b
to_str("in docking station: \"",?.~.name,"\""));
! U7 w6 r. f% T# g/ G' d end;( F! a+ N1 y' T! `
else0 Z. ]: c7 I+ I5 X1 g
@.Destination := assignLObj[1,row];# _. V' C# B0 {! R( h# j+ F. t( t, l% o
end; ( I- |/ ~5 z2 w
newDirection(@);
; m% F: S+ w4 ^& N0 q1 O) B: W( |) p9 @ @.HasOrder := true;( r# j+ y. D2 a+ i. M" u
end;- O1 C: L/ I! m$ C ?4 p
end;6 W! s6 K4 L1 O% ^5 a. B: I: j! [( n
end; -- of the method% S+ U, X; x: Z: e
|