/* called by: entrance ctrl of the object 'track'7 y4 `7 N" U: H# K
*/( r x$ [1 W. G' p" M- M# c/ R
is
6 u9 B4 l3 ` f, W/ J# z part, GlobalDistObj, assignLObj:object;row,Lan:integer;. Y+ Y# m9 v2 W2 V) d1 ]4 v) M! g
do
3 Q( `8 r6 ?$ o1 I$ N+ e: W Lan := rootfolder.Internal.Tools.AOLlanguage;/ o ]- w7 K7 s
if current = @.Destination -- else return
; B$ O, }: d) o3 P; {7 O$ M% {. @( k then$ E( w! t8 d3 Q( N# t
@.Destination := void;
% P" K- A3 Z" z1 Y N" V if @.occupied then3 T; M" |# e+ Q- b9 F1 L# i+ J; V
part := @.cont;
7 ^1 d3 y/ F/ h& d: D1 f/ x: _ @.transpOrder := void;
K1 `- Q# O! I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 G- e9 P: X2 `6 a7 v @,root.eventcontroller.simTime);
/ o$ x! O/ X4 d4 K$ K& F4 m @.HasOrder := false;; U# G4 l: F1 o6 `, b2 ~
@.DrivingHome := true;
4 D" o1 v8 U# Q5 z. X' V. S rgManager.tryToStartTransOrder;, w6 d0 l7 m/ N2 @: j" Y
if @.Destination = void! r7 I- v1 t; S7 G* W1 R
then -- no transport order for vehicle @
/ Q6 f$ e$ u. o- a @.Destination :=
& W! ]% S. U- Z& K1 f" E rgManager.nearestFreeStation(@,track.~);8 H" `4 r% q5 Z! q* \4 u3 s
newDirection(@); $ x( W( s: z+ _: }% G9 C2 I7 t
if @.Destination /= void then
" S3 u; c. r' q' |. } @.Destination.NumReservation :=
7 h0 S) ^# P9 A' m1 F1 a @.Destination.NumReservation + 1;. S7 B; u6 m& Z. w0 e: L
end;4 L5 m7 ?3 H5 m8 Z2 K$ N6 u
@.CurrIcon := "drivingHome";3 p0 L" g6 V/ h6 M/ h/ Q
@.DrivingHome := true;. ^. A! c, n; a, G
end;, t d9 b8 t- D+ d2 J3 S) j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ~0 y0 K0 T# V8 `, b- z7 J, | v part := @.transpOrder;& Q+ `: I* B# `% Y) l- x, w( h5 K
part.move(@);-- load part2 Z$ j& S [% W- y E _% k
@.CurrIcon := "load";
, A0 q+ ]0 Y! B/ R6 A o GlobalDistObj := part.globDestination;3 `1 Y6 y2 ^$ r* Y8 U5 `; B
assignLObj := rgmanager.rgAssignL;$ z2 z8 |7 Q2 I! K+ v
row := assignLObj.getRowNo(GlobalDistObj);
3 p6 _0 w3 Y }% ~: R) m2 c: H if Row = -1 then -- since 70( m+ ]" \$ X. ]7 g! e& `2 E
if lan=1 then9 b9 G! f. \$ o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; K# Q" u1 X) f3 a& @0 [& {
to_str("in der Andockstation: \"",?.~.name,"\""));
; S: P3 e2 i$ f else6 K6 z2 J' {, V f* d9 Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ?3 m/ F9 e# u$ b to_str("in docking station: \"",?.~.name,"\""));
! E0 |) X6 v+ u( B& }# h end;% [' F# x7 ~' }4 |3 Y( \$ M
else! ]' D; W5 a6 |1 S/ E
@.Destination := assignLObj[1,row];
! Y1 T. |1 H/ z4 B: N+ h( v end; 2 Y* p( B5 t2 e- G0 o; j. P# |
newDirection(@);
; C8 A: W7 H/ L% m& U @.HasOrder := true;, }3 t( S+ o5 a. J2 D
end;
; i, R+ c: @2 \) n. e! m end;( n$ o( U. e% T# E% ?; W
end; -- of the method
1 h0 n& n# R7 o3 M: M |