/* called by: entrance ctrl of the object 'track'3 r% a- v% E- v* U7 s( B5 K
*/$ B7 J6 r" o9 r9 M( u; w
is
# F) H' I o/ t/ i part, GlobalDistObj, assignLObj:object;row,Lan:integer;: B3 v$ s1 n; Y
do
9 n; U3 m- z8 n7 b! B. P/ f$ s Lan := rootfolder.Internal.Tools.AOLlanguage;. @ S0 E) t2 \. g7 e' q) d7 y- O% G7 }+ B
if current = @.Destination -- else return
3 [; d- f w N$ }. y$ M/ g then
, Z/ f: A8 |; J R6 d @.Destination := void;
1 E. g5 ` D3 }( N# \+ w5 E% y if @.occupied then$ J$ T3 \ z5 [* ^
part := @.cont;
1 x5 ^. [+ z u9 F" [$ |. E @.transpOrder := void;
# q& ~5 ?# w/ G0 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, C) H) H$ P* l3 o, r @,root.eventcontroller.simTime);
1 z- Y) Q) p: l- t @.HasOrder := false;# e: D- @2 [: _; i- L
@.DrivingHome := true;
& }! @) X k, } P. G rgManager.tryToStartTransOrder;
& y9 w) s. H! f1 ~/ { if @.Destination = void6 q! `" I! Q# b/ f4 F
then -- no transport order for vehicle @; i P' |" G5 {. ~
@.Destination :=
/ U2 ]- S: G) C1 b3 O1 U, [! E rgManager.nearestFreeStation(@,track.~);
& d0 b7 V# Q# {# a* g newDirection(@);
\" v* R% U1 ?% A if @.Destination /= void then
& D ?9 @% h2 E# p8 k t3 F+ U- w @.Destination.NumReservation :=! ?# L! P- u7 Y/ e( b
@.Destination.NumReservation + 1;
/ H3 V3 z4 ]% s2 m* W4 X6 F end;
3 [& r% e5 f. V* g* N' R @.CurrIcon := "drivingHome";
7 h# ?" R, O1 j" {* r# ?1 b @.DrivingHome := true;
& v# I. C+ Q' P% Z' Y7 P( R5 O end;. V0 W* {6 ~5 e! z3 j! p& w9 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 ?5 m( F: a1 i/ L part := @.transpOrder;
( _5 G& ^+ L7 ^# } c. \' P& v part.move(@);-- load part
& @! m' }3 b7 o# f1 J @.CurrIcon := "load";
% v) U& N z4 ~8 ]7 b1 D GlobalDistObj := part.globDestination;' n+ Y5 e7 z: P5 n* P( H$ w! X
assignLObj := rgmanager.rgAssignL;7 J8 L; }/ k% ]( V" ?/ ~; ^
row := assignLObj.getRowNo(GlobalDistObj);
% H- i/ m2 f2 v3 ]6 a if Row = -1 then -- since 70
% U% w$ z7 D! b if lan=1 then4 x0 }: n3 X6 v0 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" \) F. f0 h7 ^ to_str("in der Andockstation: \"",?.~.name,"\""));; H. K; p8 w" ?- M5 g g* B* T( t/ ?
else
6 b/ e9 b$ {# e" N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) e8 R9 P4 O* k5 i: `7 J' W9 a8 { to_str("in docking station: \"",?.~.name,"\"")); . ?6 @, x7 U' q" R3 w" \
end;+ o0 Q& U8 y1 W! t9 r7 Q- D
else
8 ~5 e: g1 s3 @8 n7 P( d; J @.Destination := assignLObj[1,row];
1 g9 P" L$ p. s& }' n end; . ^1 N5 ?* _/ O! T0 Q; A
newDirection(@);
8 Q& `. c3 y5 V- ^# A5 x9 _ @.HasOrder := true;
$ o$ e, g% c A9 |+ k2 p: B end;. O* U( Y$ \ l! A5 a
end;' G3 \1 ~+ W* { M9 q5 b; z {# x! l$ v
end; -- of the method
; k6 t2 m" C" `9 ]% ^" N |