/* called by: entrance ctrl of the object 'track', M: J [( h' W
*/, B3 L- ? C$ ~4 x" V4 _ Q% _
is0 e% T& ]7 g1 n$ U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 C& N8 V5 G+ P( k2 pdo% `, ` }: I- t: [. c1 S
Lan := rootfolder.Internal.Tools.AOLlanguage;
# U$ G6 m$ d* J4 p/ F if current = @.Destination -- else return
9 I2 _! W; A5 A# M then/ J- G/ U- F7 t# b/ Z. O
@.Destination := void; d H1 |* k* O% Z1 ~6 C; q6 I! Q
if @.occupied then9 D( p! T& {4 A* j# p2 w, U1 n
part := @.cont;/ c, e3 M! h3 F. K' d+ i5 V
@.transpOrder := void;' }" H# b l L+ l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! j: s) `( W* z* S0 G
@,root.eventcontroller.simTime);$ Y7 ^+ m( ~% C
@.HasOrder := false;
+ l. }) i. Y( m5 u' b @.DrivingHome := true;4 _' L7 J5 V. a
rgManager.tryToStartTransOrder;/ E9 g2 j6 B5 e, F
if @.Destination = void/ |7 z O3 ]2 @* ?5 ]0 }7 q
then -- no transport order for vehicle @) O' R" W2 [! y
@.Destination :=
8 \1 B; u% ~- l5 J8 a( o rgManager.nearestFreeStation(@,track.~);& u v+ `3 O- B% g! R7 J4 e4 t
newDirection(@); & T$ v+ h$ p- G
if @.Destination /= void then
: A: X, D" B9 L; L; p3 ] @.Destination.NumReservation :=7 b! D0 x Z4 j3 G. M: _
@.Destination.NumReservation + 1;$ x. M; ]! ?) L; Z. p3 p
end;, R; B! B+ n7 _: }$ _) B
@.CurrIcon := "drivingHome";8 w. G$ A6 R6 ]) ^) r# Z
@.DrivingHome := true;
* k# q3 ^5 C/ k3 `% U! ?; D end;, a* z! ?4 ?3 @: \0 ]# H0 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 q4 e& G- J. ~, m
part := @.transpOrder;. m* X* Q8 x0 d2 w
part.move(@);-- load part
$ c; w' v6 U9 E: o1 I @.CurrIcon := "load";
" n C; D/ ~. R D- ?* `9 [, | GlobalDistObj := part.globDestination;
1 ?" }/ n5 k, b/ R7 K assignLObj := rgmanager.rgAssignL;1 A6 u- Y( `" F6 e/ o
row := assignLObj.getRowNo(GlobalDistObj);/ W+ E9 e) d" R+ v- ]- p
if Row = -1 then -- since 70* z' m, }0 V5 |9 F3 s# z
if lan=1 then0 A) o7 H7 Z% Z7 j; |( p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 @' O, E1 z0 n" j. L. g0 g& [
to_str("in der Andockstation: \"",?.~.name,"\""));4 m( G L; {; R" G9 I( ?
else9 j% L; J5 J% e( j3 |6 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 ~2 [. s" l4 N6 O8 e/ F7 M% K) \ to_str("in docking station: \"",?.~.name,"\"")); : P: n1 T1 F+ ^! }) U# F9 R) F1 Z
end;
! a' A% s# o3 Y+ @4 t. \ else
) W! i6 B0 c3 z5 | @.Destination := assignLObj[1,row];
9 c: U: e ?0 J( y; y V end;
6 n& B! k! V; }1 G; D3 D/ `0 i newDirection(@);4 N- N7 u% Z" a3 F2 G
@.HasOrder := true;7 v" t8 M( g, l+ ?/ x! D: N
end;+ g/ \; z( |+ [9 G( @1 y
end;. N& x. U9 A" s. H6 r3 b
end; -- of the method+ o5 e O- b4 @' f+ K9 ?& U
|