/* called by: entrance ctrl of the object 'track'( }: v6 b7 A* `, W+ d m
*/
: G" b% T* H( g- \% h1 r0 gis
l2 T* o. M$ Z/ R3 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;! T, X+ m) T3 Z2 |+ ]5 D& O
do
* M- y3 g$ Q% `' [ Lan := rootfolder.Internal.Tools.AOLlanguage;
; x' H2 p W- R! S) V: ^- p4 M3 H: j if current = @.Destination -- else return
5 D _2 D/ \" T4 k" Z then
8 `5 C9 {/ C3 N2 h @.Destination := void;
1 N$ \6 l- k- Z/ e& Z if @.occupied then
# E& c4 S3 O# m+ ^# O part := @.cont;
$ O; P& D5 w8 q' ~ @.transpOrder := void;, i+ G: X) }& @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 \, w5 f( P \! \: \; ` @,root.eventcontroller.simTime);
0 v$ F3 b( E! U$ E$ j @.HasOrder := false;
& N/ U2 p0 d* Z2 S) |8 P @.DrivingHome := true;- W6 K5 D5 z, C
rgManager.tryToStartTransOrder;+ }. A9 O f* [6 ?" {9 x
if @.Destination = void
; ~; o% ?/ k% z. w' d( p then -- no transport order for vehicle @
- w5 p; D. p, e- U# V- X @.Destination :=
% j1 _; A7 W% \" G& Z rgManager.nearestFreeStation(@,track.~);
: x! s+ H0 l+ ^7 j4 @! u. @ newDirection(@); ; i' Z: f5 b( F) d6 X. N* F
if @.Destination /= void then. f9 V! W1 m1 V4 P) o
@.Destination.NumReservation :=! j) Z- N' V* E) }! x! U( h4 h0 m1 P, q
@.Destination.NumReservation + 1;
- O9 O% k7 j0 b7 a# ^5 ?3 V- ? end;
, L' k! E; G) f" n9 l @.CurrIcon := "drivingHome";3 q: u' A, c, ?' A* S& `
@.DrivingHome := true;! S% `' [1 D) o/ N$ A" y
end;' T9 L5 Y$ t( V6 r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" `4 P! y, i; p; T: K# M5 a) k) s" h# [
part := @.transpOrder;
% |! {6 E' Y- c2 ~, u! s1 P: J) B part.move(@);-- load part! ?; |4 x0 {) x& @
@.CurrIcon := "load";
D% @8 Y8 U- v GlobalDistObj := part.globDestination;8 I9 {3 {, F( ?% k
assignLObj := rgmanager.rgAssignL;* C# S7 ^4 |5 J+ P0 l& |! G" M/ S
row := assignLObj.getRowNo(GlobalDistObj);: `4 }* n* q1 L1 C1 p7 L& e) R
if Row = -1 then -- since 702 d0 n. Z8 ]* H' j0 _
if lan=1 then
% a( @6 Q7 }+ V& `5 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 J" M0 G- f. P( K
to_str("in der Andockstation: \"",?.~.name,"\""));" m. H9 a- y* b6 u$ K" t' \
else
4 L# |9 U# p5 U2 ^* q6 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 h$ t7 u. S3 p6 T0 d6 @$ E( \ to_str("in docking station: \"",?.~.name,"\"")); ' `7 K7 c3 H6 H4 p3 A. A
end;
# x+ C0 h1 b k5 D e else
2 q6 Q- T8 @/ A$ j4 c3 j* Z @.Destination := assignLObj[1,row];" D+ l% f. w* U
end; ; B$ ~2 ~/ l# g" d0 S/ g
newDirection(@);
! K/ H2 F# ?% e+ _9 \3 w @.HasOrder := true;# G) n C+ C4 {" d/ z1 Z$ d
end;
6 [8 x0 x' e1 c& k end;
( @) F" n+ b3 f; H( f) M4 D0 mend; -- of the method
- _- G) F1 f5 j2 Z1 W |