/* called by: entrance ctrl of the object 'track'! }5 h# X+ m. O K
*/
& J" z' |5 O6 J6 ^7 e/ I- yis
7 E$ ?. W( f' A2 V+ @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' G6 i4 H; R E8 Tdo1 y# U5 c& j/ m
Lan := rootfolder.Internal.Tools.AOLlanguage;
: [/ o0 }) j3 p0 U4 m# [% F. d if current = @.Destination -- else return0 t. K/ U: e* _" M5 Z" e9 V6 L
then
+ ?2 e+ A* ~& B @.Destination := void;
, |. `0 u% [7 C, ]# y if @.occupied then" \& G3 @+ }# n ^: ~: U; J
part := @.cont;+ i7 D7 V9 \2 h0 f
@.transpOrder := void;
% M9 X9 M$ R6 C) X. H8 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; M8 r6 Y( F# a4 H* G6 S @,root.eventcontroller.simTime);. _6 r4 h6 R! P' J: e% P0 h# |
@.HasOrder := false;
. _( g* _* u! ^; `, A @.DrivingHome := true;% W1 h8 C4 m7 ^! v e
rgManager.tryToStartTransOrder;
; B% p5 f) }% z9 O+ ~) q& C- _1 s if @.Destination = void
( a U3 O9 e D( j9 F# ` U then -- no transport order for vehicle @
9 ?2 i. d: h5 l6 t" e! J @.Destination :=
2 c. G1 f' Z" w1 t/ d rgManager.nearestFreeStation(@,track.~);
7 f0 R: S) i6 X' U1 d newDirection(@); 7 A+ k9 r# V4 V0 a/ ]' W
if @.Destination /= void then# W3 P9 g1 e6 U7 d& q( L0 M
@.Destination.NumReservation :=
: s) O, G4 D0 x! q* W @.Destination.NumReservation + 1;
$ e1 S4 D/ d3 v) l" t end;; O; q! n7 D+ B! V
@.CurrIcon := "drivingHome";- r# A4 b$ }1 \, x% W. r
@.DrivingHome := true;8 G, C& G; b# c6 S4 y7 O
end;4 b0 R+ s$ r+ ^+ a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 r6 [. Y9 c# A# y9 {$ f part := @.transpOrder;
0 w. |: W* m1 J) U7 w# c part.move(@);-- load part% Z2 Y% H! E' k3 z- o
@.CurrIcon := "load"; g8 h. W8 o+ n! V* b
GlobalDistObj := part.globDestination;, ~/ c4 s* J$ c) {3 x
assignLObj := rgmanager.rgAssignL;
9 t) P* Y. o1 D; ]- \2 A% | row := assignLObj.getRowNo(GlobalDistObj);/ M6 p* Q% D, R
if Row = -1 then -- since 70
0 E+ P4 D+ A8 K/ i. O0 L% W if lan=1 then$ ~5 f7 b5 x, o) S- a; K) Q7 w. g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! P2 h9 s# w, @ to_str("in der Andockstation: \"",?.~.name,"\""));
! J' \: O: x I- o else
# s- y8 H) I2 q) d5 S" ^/ R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' ?6 p8 m" q( a* A) Q3 G to_str("in docking station: \"",?.~.name,"\"")); + G3 X0 {" ?* G) P m
end;
) ~" E+ H1 @# E% t. z7 W8 \$ z else1 l8 l7 f( x# c/ n+ f2 s- v
@.Destination := assignLObj[1,row];
& f. A& O& ~$ ?, T' l) l6 @ end;
9 `8 \7 P/ v2 C3 d2 N" v4 @0 }4 G newDirection(@);& w! O# ^9 s; Y7 L+ v4 L9 a2 L
@.HasOrder := true;
& l6 w7 v" P: Z0 }" r end;1 J- [8 S7 }7 t6 A7 M
end;
/ C, C: G5 a% E% @end; -- of the method
& D3 Q5 n/ _/ [: z7 Q- S |