/* called by: entrance ctrl of the object 'track'
5 X" x* W" E& F/ |2 e6 b*/$ v: ~, f9 z& f& x/ T6 Q
is5 ^. s+ k, n; s- G5 U# b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, X p3 T4 g2 Y9 i ^: Ydo Y6 P. | \) @4 {, i7 Q) b$ a1 z
Lan := rootfolder.Internal.Tools.AOLlanguage;
* M- a. P) a8 a4 I0 H1 F" n! I if current = @.Destination -- else return$ S7 S0 w! Y/ P* `
then
h; U6 e: J% g) s$ ]1 u, Z% T @.Destination := void;
& a4 r1 D9 `6 g# { if @.occupied then
4 R5 O3 I* y7 K4 Z part := @.cont;
" g, @' }: w/ W8 T" E @.transpOrder := void;
) W9 [( A; @; b2 m9 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ^) I8 d, [! h1 L
@,root.eventcontroller.simTime);
: J+ T3 I& n; L+ S @.HasOrder := false;
8 P, L1 b- J! h( p9 x) K @.DrivingHome := true;( I! y+ o' @% m! q b6 e% o* H. {
rgManager.tryToStartTransOrder;
, h- K$ R* ^! P! U7 F# {% t9 ~ if @.Destination = void
- Z/ Q, R# t3 b+ j then -- no transport order for vehicle @# I) y, Z$ T9 j( t4 e
@.Destination :=* `( Z: I8 n5 x) m1 X9 @
rgManager.nearestFreeStation(@,track.~); P2 p$ F j" h' J
newDirection(@);
) L- ~( `4 x1 @% D+ m: \ if @.Destination /= void then+ x( O8 n* u, _' K
@.Destination.NumReservation :=/ S- ^' p: X8 H% v/ q
@.Destination.NumReservation + 1;! T2 U: O# Z/ @3 s
end;
Y2 G% W# d& I @.CurrIcon := "drivingHome";8 E" l& m) h( x7 Y1 |' |
@.DrivingHome := true;7 ^: s/ Q$ F* _: F; k% Z
end;
( K) y2 s3 }. N- y' _/ s9 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% j7 D0 G5 k1 ?3 ]3 ^; O# l8 y part := @.transpOrder;$ H: T6 M! Q. s; _7 K( l
part.move(@);-- load part
% W" F0 s% P7 p @.CurrIcon := "load";7 u! x1 S" Z% j2 S; P- d: y# s! Q
GlobalDistObj := part.globDestination;9 ?1 d$ b2 \2 `5 G$ J% {& N
assignLObj := rgmanager.rgAssignL;; x/ B: ?1 ~* ]
row := assignLObj.getRowNo(GlobalDistObj);
4 N% D6 y% \" i9 k5 b4 N- Z% h if Row = -1 then -- since 70
4 `: D2 e- @1 U8 F6 Y' v5 {9 w3 B if lan=1 then
8 t5 o- m7 |) T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# ?9 f; z, f1 l% @' F# ]% Z to_str("in der Andockstation: \"",?.~.name,"\""));
, J& x% O: j# B else
3 t% A: B" z) [) O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, `9 S; d/ \3 W, K+ Q' G
to_str("in docking station: \"",?.~.name,"\"")); 4 ~ c( y% \$ Y* L. u7 P/ k
end;; i/ W2 p% n, N9 A; ^" ^2 ^
else
$ Q: a2 S( j( t# R( R' b @.Destination := assignLObj[1,row];
3 [/ B- _4 ~9 e1 E end; ' J: B: d! e9 k' _* w4 f, S
newDirection(@);
8 G# V. N2 q0 I& P @.HasOrder := true;
5 j4 g5 q( g- J/ I" r3 r# D% Z end;1 u1 U$ ~( w0 ?# l& s) ?
end;
7 ]0 I& N0 }) N2 yend; -- of the method, j8 T3 z3 P. V( B
|