/* called by: entrance ctrl of the object 'track'' a$ O! C* ] s' N
*/
6 K: c6 E* K# U8 yis0 X4 D. t$ p; y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; h/ f: o" h9 X" B7 J
do
' K# @; @7 `. z" ?; I5 y) o Lan := rootfolder.Internal.Tools.AOLlanguage;$ o1 {! \6 c4 {, Z
if current = @.Destination -- else return
# O( ^$ q1 Y) R' Z0 i then
) z+ v( C: Y+ Q: k; e- W X6 T @.Destination := void;# K8 [1 U& l! F) l7 X
if @.occupied then
7 d6 k: B7 x. G1 M- ^7 R part := @.cont;
+ f: [" n4 `9 A P" O2 H: }+ B6 x @.transpOrder := void;
* K: \5 w. m( \6 U$ |" u! p0 P- c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
n( f! U' @% }# U) \ s$ e& Y @,root.eventcontroller.simTime);
+ x6 c& L( h8 R9 K2 @) E# @ @.HasOrder := false;1 I+ `. P! @ ^5 p3 n. b1 A9 l D
@.DrivingHome := true;
/ `4 k* `4 f9 W, B1 |# D0 L rgManager.tryToStartTransOrder;
w' X7 q# d! t/ N$ A1 n if @.Destination = void
! s. x. [. K) d2 c then -- no transport order for vehicle @
4 R0 j4 V$ ~' |' F# k @.Destination :=
/ X& U" F7 x+ A, ]. h" ?. } rgManager.nearestFreeStation(@,track.~);
$ N0 G& @" s1 I9 v% s' X* t8 x; {" j newDirection(@);
4 ?* h, a8 v+ Z H" i' z if @.Destination /= void then+ E Z* |/ W3 _2 z8 @& p9 q
@.Destination.NumReservation :=
7 F6 r4 O0 o$ }0 T/ { @.Destination.NumReservation + 1;
- s8 N3 b, g4 Q6 u9 h% `9 ^' C end;
q. ^: g& P7 _; p% x( l; J @.CurrIcon := "drivingHome";
$ `3 R/ K# y3 M: { @.DrivingHome := true;
, P5 w1 S: i; Y+ ^ end;* H' ?# U& g# s9 L8 W9 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" X; A; P5 g" l$ ], o6 V part := @.transpOrder;
3 {+ |3 a4 E: }8 ^) m part.move(@);-- load part- l% G, `4 q! h! n, b, H% R( P
@.CurrIcon := "load";- R. e3 ?! C! C' E/ W
GlobalDistObj := part.globDestination;" @8 v6 O: m8 [* u+ V
assignLObj := rgmanager.rgAssignL;' w! J) y( a5 O; P/ M" ]
row := assignLObj.getRowNo(GlobalDistObj);, n) O9 F, v1 q5 B5 Z% w
if Row = -1 then -- since 70
4 g- s, F, C3 @ if lan=1 then
' ^4 h$ O. M4 F6 F1 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ K7 k [/ h" u9 e to_str("in der Andockstation: \"",?.~.name,"\""));; Q) W3 T% |+ q S3 O) W
else
0 ~4 r1 p" |8 a( K" }6 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' `+ {, \; f7 F) k/ ^( e9 V to_str("in docking station: \"",?.~.name,"\"")); * j1 l/ k0 t) d, w
end;
9 X6 i8 j8 h( M5 i. s else1 Q+ d- _5 p9 I
@.Destination := assignLObj[1,row];6 S3 E; a6 S7 b
end; 3 `& I3 T! n7 n& }( l" Y; @
newDirection(@);/ l, U: S- `( d
@.HasOrder := true;: O% C4 }6 d; C. i8 Y. w
end;. Y% J. Z" P; G( @
end;8 Y4 a7 S& p0 t8 {
end; -- of the method
) W7 u( J, H8 Z |