/* called by: entrance ctrl of the object 'track'
/ A; z1 V3 T; V* x% |*/" s" C0 y$ E0 d1 w/ X
is
3 r! [, G2 r8 T0 t3 d, j' n5 V8 D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( Q" E; ]4 s; K2 a. H/ i" z! ndo
; X, b" r: i8 I- P0 n Lan := rootfolder.Internal.Tools.AOLlanguage;! e( M& x' Z; }7 m3 H. [; {
if current = @.Destination -- else return
o% a, s1 V# E then
! Z, [3 _% L% x+ j& v8 M/ e @.Destination := void;7 a0 }7 U0 j# p3 X" Y* }: \
if @.occupied then
$ o; }; r, M! `3 t5 N7 z part := @.cont;
' _9 N1 u5 p# E" t3 y3 v: ^ A @.transpOrder := void;
2 p/ Q Y* P7 h* d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) j2 g. N% m, w' @7 ]; d; \ @,root.eventcontroller.simTime);: c3 `; M, z M! n" Y& [2 s1 P
@.HasOrder := false;7 r! q/ K2 h# }& o: Q: }+ Z
@.DrivingHome := true;
; K2 Z' Z5 l/ L4 _# S3 R rgManager.tryToStartTransOrder;
, Z: Q6 ~: N6 i$ l: C if @.Destination = void( }% N) k5 i, ]
then -- no transport order for vehicle @7 S2 |$ U1 {1 @$ n% P
@.Destination :=" r" y: q: M; c
rgManager.nearestFreeStation(@,track.~);
5 R+ b9 m0 n- k$ A! G newDirection(@);
- P) E) W' {/ {0 t7 O8 g+ a: V* L if @.Destination /= void then
& ]& V. `# Z6 u5 s& a @.Destination.NumReservation :=
; Z6 Q0 z3 D: V% C! { @.Destination.NumReservation + 1;
$ f7 W. n n# W% ] end;, @" s, `: ~: J
@.CurrIcon := "drivingHome";3 f$ I5 A% b4 z: S
@.DrivingHome := true;# @$ w) j% `2 E+ B+ h
end;! r: V7 w# l9 H' o8 p" s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 ~8 P) h9 x% u8 c# M
part := @.transpOrder;
D) c1 L O% X$ L% ^) w9 ` part.move(@);-- load part
; V( Z3 h7 w ?. c) [% z @.CurrIcon := "load";
% M9 f2 ]5 f0 Y1 F) G8 |+ S+ k# r GlobalDistObj := part.globDestination;# j3 O7 ~; r3 d m3 F+ }" G) R' j$ J j
assignLObj := rgmanager.rgAssignL;
& {+ N( a3 `3 G' }! Q& i row := assignLObj.getRowNo(GlobalDistObj);
; t$ {( I3 n5 r* m' J' P" A B0 d5 I if Row = -1 then -- since 70& D& C! C2 E8 `' w8 N
if lan=1 then* b1 H+ P: z" I1 f* D/ V, c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 L; G6 n! I+ g5 `: c% M to_str("in der Andockstation: \"",?.~.name,"\""));
& v$ P1 W1 M. }( W, L+ C4 l, t else
% w5 W/ o( u8 I; O) X& u& p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ h/ q5 S8 p C! y$ E3 o
to_str("in docking station: \"",?.~.name,"\""));
; I" _$ Z% p8 Z4 Q) x# m$ P3 v end;1 A+ s& c- m6 c( |% x7 p6 x
else
1 F3 T; j1 j o7 \5 p4 c7 b @.Destination := assignLObj[1,row];/ i% {% K I0 f$ o
end; , M4 @1 c' ~- q' _ v- A; |2 K
newDirection(@);
6 l }1 L. l" d7 ]; M @.HasOrder := true;6 r7 y ^. e' K$ W3 J& b
end;
$ Z! B2 P: H: |$ D end;
) q% b. M2 `: S: Wend; -- of the method
& b* j# W0 ]5 h& }- K9 R |