/* called by: entrance ctrl of the object 'track'! G. k: ?$ ^8 r6 z8 I% R2 R+ D U5 j) @
*/4 ]& x9 `) u6 \/ x7 V4 g
is1 b! d9 \$ A- U9 r, q7 H, b! E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 q* w* j2 @( ~6 B9 G% i# \
do
; q4 @: d$ a; A# w5 r0 B. { Lan := rootfolder.Internal.Tools.AOLlanguage;; ~4 _ h$ c9 B# s8 v: z
if current = @.Destination -- else return( S5 e: d7 X7 N9 D% `: c. U8 l$ W% X
then
" h* X, v$ R5 t5 J( K @.Destination := void;( K6 Y; _7 ~) K
if @.occupied then
- T; @$ k7 ?! b: x part := @.cont;) B3 Z4 c) y* ^2 t$ {7 p' M
@.transpOrder := void;. Y: i; s5 k* _( O( j% v1 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* _3 \) {: F+ ~/ ] I2 a: V
@,root.eventcontroller.simTime);
, g- F2 b, j0 E v @.HasOrder := false;
* X, }4 I9 a4 ^3 R$ { @.DrivingHome := true;
: X% b3 D% h9 {8 e% z4 \& u rgManager.tryToStartTransOrder;7 e6 b; j3 i% p6 f1 m
if @.Destination = void' O/ d( y) O% h3 ~: j9 d
then -- no transport order for vehicle @3 J% A+ l; W0 ~' r# f! R) o8 B5 P
@.Destination :=- P: P# l. F7 w. z; |2 B
rgManager.nearestFreeStation(@,track.~);
: F4 Z( x# x2 i. ^1 k8 Y1 C newDirection(@); ' W: Q3 O3 ?, C" c! M. H
if @.Destination /= void then
/ [; n7 b; U, @% ]# E ~ H6 [ @.Destination.NumReservation :=
5 u4 d% G" [2 Q' v6 r @.Destination.NumReservation + 1;
2 V7 u$ B1 b! p+ W% V2 b end;0 R" J9 B# o7 {
@.CurrIcon := "drivingHome";
+ N) x9 z9 i# M2 }# I6 n @.DrivingHome := true;0 V# v/ j( x3 C0 {" G/ N4 p
end;
2 M. |0 f, i2 u1 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ I: j8 ?- Q6 q' `
part := @.transpOrder;
h- R+ b$ z8 c' ]+ S$ k1 U part.move(@);-- load part
: P+ R" z' g7 j5 z, }- M @.CurrIcon := "load";
8 ^1 y; E- S4 ]( k x GlobalDistObj := part.globDestination;; w( \: n. X/ H9 D
assignLObj := rgmanager.rgAssignL;
' H4 v2 ~7 ?1 q6 ^! O8 {7 e# ^ row := assignLObj.getRowNo(GlobalDistObj);
8 z% _! ^5 i6 v4 _! z1 ~ if Row = -1 then -- since 701 E' {: y* h7 i" N9 n( s- K/ K
if lan=1 then
8 Q: a) C/ o2 x O5 u" f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Y7 l# K% \. }, I( s" o to_str("in der Andockstation: \"",?.~.name,"\""));
' R8 c+ f& M2 @- Q) s else
' |" [/ n/ A7 i s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: u v \" b; T6 j% C: j6 a( X! ? to_str("in docking station: \"",?.~.name,"\""));
% V$ _2 y `) Q& f$ P' ~+ O, H2 P. S end;
1 h$ C) e3 b8 z3 \ else
( \1 h7 C, n1 B @.Destination := assignLObj[1,row];
3 c6 N: S0 j7 F5 a1 X8 n end;
. I$ _6 c( O5 _4 d0 a( U newDirection(@);; q% i* m, O8 g. p" W! D7 d
@.HasOrder := true;
1 J7 |- m9 `# ?- U end;
/ m& a4 S! j# U7 t. o end;8 M3 \- z& n7 [& Q3 j
end; -- of the method
5 I9 H! H$ n) `' ^ |