/* called by: entrance ctrl of the object 'track'
' Q) q8 T4 ?( m8 X, U3 `/ g*/. w7 ?- X1 t) g3 s
is! L$ Z: K+ h) l, q9 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 u- M: K. D7 V. v' \2 r1 r
do
# ]5 [; L3 d1 N" G Lan := rootfolder.Internal.Tools.AOLlanguage;4 l! g9 ^. H( Q2 y8 O- o0 J
if current = @.Destination -- else return
7 |4 h& h: t' c: U1 w then
1 D0 g+ s$ Y( |/ `* h; y @.Destination := void;
8 X+ z# A* {7 }4 F9 T4 S if @.occupied then# U) E, T {( K& d$ [
part := @.cont;
* J& n6 K% _: b/ ]) F @.transpOrder := void;
7 a& R$ o8 E' E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 B- ]$ A' _: x5 f+ ~; B
@,root.eventcontroller.simTime);
8 G- e2 u5 h( v0 ^+ u @.HasOrder := false;2 x2 k D+ t! { ~ @9 k
@.DrivingHome := true;6 g- ~4 U( H7 V; B- r
rgManager.tryToStartTransOrder;
% D# b2 |7 Z% Y% a9 I" p if @.Destination = void9 b- S9 R5 H" D
then -- no transport order for vehicle @5 R! t/ B/ R! d% Y P& `" I. Y' X% S
@.Destination :=' a5 s" G4 W7 R/ d9 G
rgManager.nearestFreeStation(@,track.~);9 S% A3 q. r7 P2 s. @6 e, G
newDirection(@); ' _& a5 k: {' @1 Z4 T6 X/ x
if @.Destination /= void then1 a! Q0 P9 g, E' E. E
@.Destination.NumReservation :=
) y; q0 H' W0 S5 `" _/ ] @.Destination.NumReservation + 1;0 d3 Z; a! [% z% r" p! q$ h! L" @
end;. T+ {! X% j7 ?8 G |# A; B
@.CurrIcon := "drivingHome";$ f) h& S* U9 e& |& l: @2 `# u
@.DrivingHome := true;
1 j8 X) l; A5 I8 n end; s! K0 v1 e- r% `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ F5 i7 |# G; ]5 X3 M; C; G
part := @.transpOrder;
' D0 n0 r3 k) p. j, N: y( u( ` part.move(@);-- load part. B- Q% t3 q3 V& m/ T" @# p- X' h
@.CurrIcon := "load";
8 h4 \3 [" F4 K) c6 A) ~/ T4 b GlobalDistObj := part.globDestination;8 \+ z6 ?2 m3 n5 e: }3 {
assignLObj := rgmanager.rgAssignL;
% r) x% A! X6 Q! F: e) y row := assignLObj.getRowNo(GlobalDistObj);3 A# ^5 p3 c& q, q
if Row = -1 then -- since 70
/ T0 ^+ l" w5 V if lan=1 then
. c3 K+ a- a$ _$ f) C! \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; w' N. @: d) g. F0 `% c
to_str("in der Andockstation: \"",?.~.name,"\""));3 `7 ^. ]: {# ]( H6 n/ y7 V; o3 Y
else
( E- [8 F4 n9 A- u t! [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. ` j0 N1 @+ t6 P9 J9 q0 V to_str("in docking station: \"",?.~.name,"\""));
& K* S$ ?( g6 J1 w \$ Q end;
) l& H( t$ r9 v: v/ @$ T else
- C1 L9 v" a+ L$ h- {6 m# k @.Destination := assignLObj[1,row];8 T' ^! V3 Q& [/ O# W
end;
, b* ~( u/ u0 }1 a8 T5 ~3 L; P newDirection(@);" A+ \- {/ A) S9 G: p& k
@.HasOrder := true;
. T3 w: L5 s* `# \ end;9 N# L" H1 P K, W- }0 r4 ? }4 _
end;$ G `" X$ N# i- i: {' t
end; -- of the method) W S/ p9 C2 Y+ r! n9 p3 M
|