/* called by: entrance ctrl of the object 'track', v3 A! Q: z' l [8 K% ]
*/
. K, E4 K" \; ]3 uis
( t ^! N" c' w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% Q3 F/ C6 H, J! ]$ pdo/ x2 K4 C! M: j, w* h, i; [1 m6 V
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 U; D- [8 m* d8 p+ a7 @ if current = @.Destination -- else return
; c* l) f+ W, R5 t8 c then; h( }% R3 }; f" ^3 a
@.Destination := void;9 T( ]7 |0 i! R
if @.occupied then5 k! x; }5 k6 K' T- v' _( E d
part := @.cont;8 R+ h7 k2 q9 t$ [8 f8 i
@.transpOrder := void;& c: j5 u Q: o3 j9 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, e$ b4 H0 F$ f5 M
@,root.eventcontroller.simTime);% o5 _7 A Z1 M2 ~/ W3 d0 I
@.HasOrder := false;
F, ^. G `9 E" p" R @.DrivingHome := true;
1 u8 d9 A: ~9 l" m8 K% P* u) S rgManager.tryToStartTransOrder;; W/ G9 H z4 O- d' s/ [
if @.Destination = void" V/ c" n- D% T- p* f+ b: ~( f
then -- no transport order for vehicle @ O( m; J$ ?- ]( o, a7 I
@.Destination :=
4 s6 r4 m+ S" l# s rgManager.nearestFreeStation(@,track.~);
5 C' G% @% t8 Z. b4 o newDirection(@); ) c$ X7 L9 \5 @+ k8 t2 D0 h6 s1 t
if @.Destination /= void then* R d% a0 l% D
@.Destination.NumReservation :=
5 m! \. N: C3 ]( h; L8 s( Z2 n1 V9 M @.Destination.NumReservation + 1;: } l5 S" _! {8 u- o
end;
" h% e9 s5 h. M% |; T @.CurrIcon := "drivingHome";1 H. o) x/ G, ^$ J
@.DrivingHome := true;
; P% N8 t4 n \8 F+ _ end;
, L' h$ b, S5 [ T+ \0 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* A; ~2 }' u5 \: |7 } part := @.transpOrder;
* q, ~0 S( a( N1 @) f& w8 Y part.move(@);-- load part* @0 r8 L. H6 f9 S+ D) s* N
@.CurrIcon := "load";. b9 n$ G& H) g/ o- J! H3 |
GlobalDistObj := part.globDestination;
; C q' N6 u9 O* i0 _. B& v3 C assignLObj := rgmanager.rgAssignL;
) u1 c% q1 i- g row := assignLObj.getRowNo(GlobalDistObj);$ C! R* M* \7 v _6 l
if Row = -1 then -- since 70
0 ~, S1 j* m# k5 F# I3 L/ h if lan=1 then* }# U! _) F) E! w2 V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% ~& m/ \6 q4 ~: l
to_str("in der Andockstation: \"",?.~.name,"\""));% K) {& q8 W6 b+ e
else
' ?/ h- r7 J3 X0 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- B# N- A+ ?7 A: {0 w. U: F+ E5 p to_str("in docking station: \"",?.~.name,"\"")); 3 C+ J( p3 z) }$ r) I! k
end;
* }8 N) G& M) p/ H6 }1 [. V else, U: Z7 m% I1 r& [) n' q
@.Destination := assignLObj[1,row];
3 o0 u) C8 s( ~ end; % H' A& P! ^9 d( _6 ?9 i0 @
newDirection(@);9 ?8 _- y! A0 E- D4 J( Z, B+ ~) A9 I
@.HasOrder := true;& }6 I7 r% X5 j# j" b8 b
end;7 m7 |: P5 M" ^& G% k7 e% r: F
end;
) d, d, H8 z8 mend; -- of the method" s& M& w5 B* A
|