/* called by: entrance ctrl of the object 'track'
7 i6 W: \/ s+ S*/; M7 E5 o0 |0 f
is/ D' }& y& e1 o! n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 B5 D$ {" W+ X5 u* x
do
9 |7 P4 |7 `& V& N' t% Q* N" w, u Lan := rootfolder.Internal.Tools.AOLlanguage;9 T3 z6 V" d5 Y+ q
if current = @.Destination -- else return0 F) R7 h0 u# V+ Z) r8 p
then& Z% k7 \' W: t' a
@.Destination := void;
- }0 p3 y( T2 n( @ if @.occupied then" \/ c: `3 `! Y
part := @.cont;
' ]4 H1 m- u8 ]& w, S9 W# Z2 V @.transpOrder := void;
; y3 L: z' L/ {" |6 t4 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) g: Z0 I2 n7 U8 F. X8 i& e) H @,root.eventcontroller.simTime);
: `, [4 r+ P( j @.HasOrder := false;
. q. e v3 c, }! I/ W0 R @.DrivingHome := true;$ q, l1 Q2 x- O: ~
rgManager.tryToStartTransOrder;
3 L& m$ F' V& p# ~4 f& A0 j if @.Destination = void
/ o) H) Y& C) G: p2 | Y1 H$ D then -- no transport order for vehicle @
# l) W/ ?/ P/ m- [, q: _8 \: m! y4 X5 n @.Destination :=' ^7 r; P/ U8 Z5 S
rgManager.nearestFreeStation(@,track.~);) [" J' N9 n% H. }' ^: W
newDirection(@);
/ }2 q3 o& j! A# _1 ]! o7 O$ S- K if @.Destination /= void then
, F" G! O$ t5 W9 x/ F @.Destination.NumReservation :=1 n0 B! l7 p7 z2 t
@.Destination.NumReservation + 1;
$ a, H! T. s. V: A8 z, u! o end;
) @8 s( t6 f/ [2 _ @.CurrIcon := "drivingHome";, c; r3 l$ F7 h' S: ^
@.DrivingHome := true;7 h4 r) f1 a2 [, k/ T
end;
0 Q$ K6 z, U+ Z, | else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 j/ g, ]' b* F6 Z! z5 @
part := @.transpOrder;
! i; q9 S1 H& @7 }# S4 |1 |! W8 S part.move(@);-- load part1 M2 ~" I9 n0 X6 d9 _$ L( k6 e
@.CurrIcon := "load";: c n# x: a- \% s. ?! q9 q
GlobalDistObj := part.globDestination;
: n& G2 Z7 r2 B assignLObj := rgmanager.rgAssignL;
% a+ p6 [7 l5 B% w' v8 g row := assignLObj.getRowNo(GlobalDistObj);
) r( H: w, K) n; O if Row = -1 then -- since 70
7 a) [1 z( Z4 q# d6 [' j if lan=1 then( Q3 e* I# e1 e$ b& h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% c3 c) B* t' L6 i i; |* x
to_str("in der Andockstation: \"",?.~.name,"\""));
* }" }5 ? h I$ t, j5 }" S else$ F) z! E2 M# ~- O4 f" \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 A8 L2 |0 o/ t- b9 V/ h
to_str("in docking station: \"",?.~.name,"\"")); ' N2 G ^* Q/ _! e z
end;/ `! e" a0 |8 }& j" y
else. E3 F0 @* D6 }4 I4 o: t- W
@.Destination := assignLObj[1,row];
7 M& ?; W& Z. H end; 3 g# k3 ~3 h% d
newDirection(@);9 m0 B, X, l9 n5 b$ {1 m9 A
@.HasOrder := true;
4 N& }* r% Z% v6 r end;6 T8 {6 ]- \3 m1 ], w! d1 e! c2 M/ J
end;
% P8 c+ A- v- T1 p5 p0 Gend; -- of the method
# v- k. V$ X z* z) d$ ] |