/* called by: entrance ctrl of the object 'track'% E4 y4 M V7 [# p% M- A) ~
*/
I/ G: g( z: r( pis5 I4 z& Z2 Q, \) T+ Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 j) I8 ?. X: P, c3 L' Ido
! ^* q/ n6 C" W0 U+ k! o3 q; u Lan := rootfolder.Internal.Tools.AOLlanguage;
( q5 @# O+ i2 e' P1 e3 ]3 c if current = @.Destination -- else return8 x5 B8 j# u9 C6 A
then
& W! L7 I4 J' L @.Destination := void;
1 ~' V" {( {/ y if @.occupied then) v# c1 y8 d# }. ?5 a i
part := @.cont;
! u% P" Q- _# \- q @.transpOrder := void;* G/ U* |- ?. p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 `) h) N8 h; S1 Q2 V C
@,root.eventcontroller.simTime);
' \0 \2 e7 ]- H$ V5 J: V& P @.HasOrder := false;
; z3 J: f" h* N @.DrivingHome := true;
- g) d5 G' {9 e1 D* \ rgManager.tryToStartTransOrder;# A6 x7 s/ c9 O" J5 J; F, ?9 h
if @.Destination = void" [ e% M+ {) ? _
then -- no transport order for vehicle @
) V5 Y3 l3 ^; { @.Destination :=& F) D# s5 `4 I( o* g, u v
rgManager.nearestFreeStation(@,track.~);; W) @$ ]( {& h; ]8 r8 {
newDirection(@); 9 }/ O! e8 m2 v( h1 x8 f6 G
if @.Destination /= void then
9 V2 p1 g$ W" u u9 z. x1 a @.Destination.NumReservation :=) T9 L8 m |/ _+ v$ `4 Q
@.Destination.NumReservation + 1;
0 f5 _1 f6 j4 v' x" ~ end;5 d: |4 r1 Q6 N' M1 k$ r# C
@.CurrIcon := "drivingHome";' R* { r" w5 N. f2 @; D! ]
@.DrivingHome := true;) c. @9 v0 [& R0 C4 J3 C$ k* i
end;. ~% F/ x; X3 k T/ k) W) n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 w1 ?) O8 L: J/ X part := @.transpOrder;
, j } j' f2 S( g7 O+ y R part.move(@);-- load part
# P7 C" W `: ? X/ l/ G9 [% g @.CurrIcon := "load";
, Z6 M" U. x& W/ H0 M& t4 o, o# t GlobalDistObj := part.globDestination;* q. Z2 _, S& l' j4 |5 K. M
assignLObj := rgmanager.rgAssignL;& o7 M- c( m5 @6 c3 Z
row := assignLObj.getRowNo(GlobalDistObj);
8 j- S, D& z. B if Row = -1 then -- since 70% [: a4 }7 l9 ]( {8 ~/ o/ h- a
if lan=1 then% B) J& r8 X4 A4 K( {1 l- t) b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 A& g( g; Y8 M" `4 ` to_str("in der Andockstation: \"",?.~.name,"\""));8 I7 x" a. J) K% S3 R
else
( {# w- v9 J& N @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 n) B! y1 n: N to_str("in docking station: \"",?.~.name,"\""));
6 A! R8 l7 X/ V1 ^9 E; N- V end;: [/ X3 U4 ]% {: _7 T. _
else5 `: v. {+ S8 M- j, b+ y9 U* F0 z
@.Destination := assignLObj[1,row];( q1 F" j' N# e) I) V2 v) L2 G
end; + y! y, l% T% b4 |- W3 \
newDirection(@); d* L$ R3 J5 a( L8 }& Z
@.HasOrder := true;$ O% u! k# [ ^' m' C `; a3 o
end;
. N8 ?6 b7 j, u- C% h end;& T3 ?( a* y- O+ M
end; -- of the method
^& C- V% j/ h- p0 M |