/* called by: entrance ctrl of the object 'track'" Z! D: }( u% M# R2 u" G
*/
& {* m" M( w6 His
4 M7 U9 a/ x; R+ i4 f* } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 C2 G4 N% b$ I! v4 @do; J1 `9 P0 P/ f- V
Lan := rootfolder.Internal.Tools.AOLlanguage;
) q$ g. p; U/ Z9 s2 } if current = @.Destination -- else return
/ r' ~% B# H% \$ x: _ then
' k9 o$ E+ q% m0 m4 v. ~ ^6 o1 S e @.Destination := void; c( y$ K, v- e
if @.occupied then
+ u6 O# |- X4 R0 j* G- b$ F part := @.cont;0 U1 m2 |8 G( _( F. T. W* ? }. D
@.transpOrder := void;
: q7 p8 [6 s0 w% c7 b9 J' ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) I) B( }: C) \5 r" C; D3 N @,root.eventcontroller.simTime);$ w4 q* Y/ d3 w
@.HasOrder := false;& ?# d1 |( E, o* i* G
@.DrivingHome := true;
2 L% ~. R1 W5 c" R rgManager.tryToStartTransOrder;
# h% e: \3 X* J1 ]/ ? if @.Destination = void" z3 Q' s3 P& I# x& Q! Z- ?! h
then -- no transport order for vehicle @5 @' S/ Y) O; U2 S) y
@.Destination :=
b& `8 s! z+ I) o* D rgManager.nearestFreeStation(@,track.~);$ D% T' A( |* l, m% f* f
newDirection(@);
' O$ t5 ~" R/ p( e6 a1 O if @.Destination /= void then" c$ E. S2 c' z# V- O' Z. E
@.Destination.NumReservation :=
+ i9 `7 Y7 [" E @.Destination.NumReservation + 1;
$ V# W( B; T0 X' H end;/ q. {) O. f4 `& y: }" t
@.CurrIcon := "drivingHome";8 l6 }4 s) Z) ^6 j7 X* |& z
@.DrivingHome := true;
8 V. Z0 y+ h7 N end;
V9 o1 a4 {7 G' C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. s! a& \1 I2 s) z( I part := @.transpOrder;
) G3 d& [: N# x& f8 ~5 d9 N part.move(@);-- load part
! _, h) l. R5 u' }; u) O9 m- {9 y4 z @.CurrIcon := "load";
5 e& z8 F. E5 \$ x+ c- C GlobalDistObj := part.globDestination;
0 H( Z* {. h, h$ Z: o) Y* S8 ^( N assignLObj := rgmanager.rgAssignL;
. l8 W! q$ K1 s$ r9 e row := assignLObj.getRowNo(GlobalDistObj);
; t7 z) A2 R- k, v9 k if Row = -1 then -- since 70 o2 ~$ {0 }7 O7 @
if lan=1 then7 m4 G" u4 b0 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 W8 K( d3 f7 t to_str("in der Andockstation: \"",?.~.name,"\""));+ Q5 E% S M1 W5 u9 W
else
- B S6 ]1 |0 x* g& l3 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 O7 z3 K% ?( ~+ o+ R4 o9 e' V# W to_str("in docking station: \"",?.~.name,"\"")); 7 q t% k1 Q: W/ l3 |
end;
H4 H! D' W+ [1 ]; _6 C6 F else5 l+ f/ y8 g" J- t/ d. o
@.Destination := assignLObj[1,row];8 f/ @6 v+ g& v* w& I
end;
4 e' X4 e( S" y% t newDirection(@);1 i" W; A/ U4 ?5 D
@.HasOrder := true;$ J& X, g) V! z( i9 g
end;
! C, n2 v; N% e$ g4 M" g end;' L; h, p" D. k2 n. J
end; -- of the method
# _% ]/ L% Z+ `- k3 L i( Z! A |