/* called by: entrance ctrl of the object 'track'# \* C; G( {9 ]( a
*/
8 E' W" @& P+ ois
2 m/ Z. z' {+ W: ~. m/ Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 r" D1 r E5 r( [5 n+ m
do
( z8 ^! m: u7 f$ U! Y0 o Lan := rootfolder.Internal.Tools.AOLlanguage;
" o7 ~7 O: \3 e& b if current = @.Destination -- else return
) j8 A/ |% T9 Q3 A/ R then% e8 q0 W7 ^4 q3 R) f; n3 w& P7 E
@.Destination := void;
2 J+ V6 i" a2 p/ t8 t. P: V4 s if @.occupied then# J5 z# P( x+ G. D f: w
part := @.cont;
) V* t, H. H4 v @.transpOrder := void;
# w2 f8 j$ V& E+ F" W& n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: y! Q! T0 ?; L7 p, N$ T5 d2 g @,root.eventcontroller.simTime);8 f" B: ~5 c$ d! e# Z! C
@.HasOrder := false;8 ?) L: Y; [7 X: t/ }1 D
@.DrivingHome := true;
5 s! i: H) w3 } rgManager.tryToStartTransOrder;: z! Q( u @6 ^. E! n6 Y- k4 G5 C3 k
if @.Destination = void
; e$ w: I7 ]) y* n3 [# l% p then -- no transport order for vehicle @. Q2 q4 T7 H# c& i# Z. o
@.Destination :=
6 s5 ^8 }& |) {; B3 e rgManager.nearestFreeStation(@,track.~);# S/ d9 ^3 X% X# g- f/ g$ x0 }
newDirection(@);
* B( L7 ^) t" O) D" x if @.Destination /= void then1 ]8 L( @- d, M N" j% p1 [
@.Destination.NumReservation :=' Q6 B+ P& X4 w& I
@.Destination.NumReservation + 1;
. z8 O1 @" x& d, d; U5 Y* u( |7 v% I end;
* G$ q+ e5 ~' y; j7 t' l @.CurrIcon := "drivingHome";: }' v* {' ?1 K3 k' H2 A, |
@.DrivingHome := true;. p; ?8 |* C) z
end;
$ a Q9 E9 c4 M6 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 S( z: j& p4 I. L5 r( j part := @.transpOrder;; {0 E! `# s! f3 Y' b& o
part.move(@);-- load part
4 K m9 [6 f+ ^ F | @.CurrIcon := "load";
% o" s- f u3 K: s GlobalDistObj := part.globDestination;
0 D, ]; t% C7 D) h( q+ m! R4 J* D assignLObj := rgmanager.rgAssignL;# n0 j) h5 ^3 g3 z4 S
row := assignLObj.getRowNo(GlobalDistObj);) X: k" D1 [7 p
if Row = -1 then -- since 701 F2 H5 T! O: o' i' Y3 W
if lan=1 then. ^0 `& N4 B1 J1 Z; O/ o# Q2 `7 M2 L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 H L% O/ u$ _5 ]/ ^! j to_str("in der Andockstation: \"",?.~.name,"\""));
' a- l, x4 ~1 `/ ~5 j8 t6 @ else: K7 ]+ C& a- \: f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- P( O# r! ?6 L to_str("in docking station: \"",?.~.name,"\""));
4 J1 m& k) Q+ w. M, q: G! ? end;. i6 g. k" q7 S2 W+ {9 F
else
. D) u9 s* s. @! h: m' v- W @.Destination := assignLObj[1,row];, g6 w" E0 C+ }" t( l$ c
end; 1 A3 q4 N5 }; }; {
newDirection(@);
5 y, H) C1 S/ O7 A @.HasOrder := true;" R: y' P6 p4 e* b& z; |' L
end;7 i; Y# N2 }8 D: l% e
end;' \' ?+ v- g; I' u7 ~
end; -- of the method
4 G7 `& h3 P* H; D0 \- r |