/* called by: entrance ctrl of the object 'track'1 w' K4 D" b9 f* L. W
*/4 `2 d1 o0 e& y' Q
is& ~" @2 s/ E a N4 S, k- \; D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! W; s0 X4 }* i% ? _1 C3 A- a L
do
' c7 I* _ L- V3 D; @ Lan := rootfolder.Internal.Tools.AOLlanguage;
0 S( ?; d5 Q$ R if current = @.Destination -- else return$ M ]/ _) ^. E: Z! i
then
& O5 M. K& M8 N" ^ @.Destination := void;
' V; N' w; [. e0 f if @.occupied then
: W0 ~/ e* R% q1 G c2 S2 Z% O# Q part := @.cont;0 T) w, i& d4 _$ r
@.transpOrder := void;: S% N3 x2 f( d- a1 ^" o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) F5 I; d# b5 z+ [
@,root.eventcontroller.simTime);0 d4 A1 u; k* ]( y; u
@.HasOrder := false; o* P. Y1 a# a, I8 u) x
@.DrivingHome := true;
) v( A" J8 h* C" I& Q; { rgManager.tryToStartTransOrder;; v- R9 ~1 _3 Q8 K2 Z
if @.Destination = void7 E( W, g# i" h' W+ b [! |
then -- no transport order for vehicle @7 t8 }( X7 o/ N5 v z
@.Destination :=
% q5 Q1 n9 ], q rgManager.nearestFreeStation(@,track.~);3 B( [- y6 E8 C1 U
newDirection(@);
& E/ a& j, A8 W+ ~7 g. E if @.Destination /= void then
8 W- n2 f! m! W& Z" f7 ~ @" d: T: P& w @.Destination.NumReservation :=
, i! Q. I) Q& b/ ? @.Destination.NumReservation + 1;; [, d) Q: I1 d- g
end;5 e. s" L% e8 a, M- M1 L$ K
@.CurrIcon := "drivingHome";" ] S6 a* W. U1 v( F
@.DrivingHome := true;
# z3 b0 L# Z' K4 j, [$ M3 V, @ end;
2 N1 o& K' a% z# A/ z) T else -- the vehicle @ is empty, both vehicle and part are in the same dock station% u2 x& R2 \3 S d9 F o& a
part := @.transpOrder;( E2 u2 r W! p0 ^" o b
part.move(@);-- load part* _# P4 A& `# |( x. d/ Z3 z
@.CurrIcon := "load";
* m- K8 l) B3 y5 F GlobalDistObj := part.globDestination;
[4 g4 j4 J8 m6 M assignLObj := rgmanager.rgAssignL;
) ~( d$ h: U; I row := assignLObj.getRowNo(GlobalDistObj);
0 ~) ?+ |8 r- F1 d% p( s3 Z# `3 U if Row = -1 then -- since 70: g2 T8 K" y& u7 l$ Y7 x
if lan=1 then P. ?+ R W* u+ K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, F- i. Y1 s/ B, y A& F; ?
to_str("in der Andockstation: \"",?.~.name,"\""));
& G/ \, Q5 @* r! P. ? else, D' U/ \9 \& H+ p- D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: d3 U' V- d. n, ] to_str("in docking station: \"",?.~.name,"\"")); b! \* m- e+ v, l v: u6 I
end;
% E2 a6 { ~- u# C" o i5 W ~ else6 Z4 s4 A B( Y, A1 ^
@.Destination := assignLObj[1,row];0 Z) f/ T) x0 \9 B/ u. ^& X
end; - K; S4 x( m6 ^; p! l
newDirection(@);! t4 u- H) z- {
@.HasOrder := true;
' ^+ y& B" A; g9 U6 G8 M9 k6 `- M1 L end;
6 d8 D6 j& H& N! ~ end;
# h6 E9 w8 Q& V3 b5 `0 q# h1 Aend; -- of the method
% f& C5 ?0 a% q. @/ e" F |