/* called by: entrance ctrl of the object 'track'
; ~: C1 c; M/ N& o, s5 v*/
* g! s: c, V' B- f5 k ois
; l4 s1 M7 X) \6 |, H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ v9 f/ {* v$ Q3 c8 _; Q8 \do+ Q) L( O0 E- \2 @) n% A
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 g' F5 g9 t5 K* E$ l if current = @.Destination -- else return
2 m" a, l( Q& R7 L1 C5 U then
& ^$ z4 W; e9 @ @.Destination := void;8 W" c$ U$ X1 ]+ L" J: j
if @.occupied then
: p* Y$ m. ]5 `7 }6 i3 { part := @.cont;
; v7 w5 K( f1 P6 v4 }5 P( b @.transpOrder := void;
7 @9 Q- |' Y1 { u5 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' H; M+ T. w9 S0 K
@,root.eventcontroller.simTime);
& `! `, j: i4 D) N) M7 d @.HasOrder := false;
0 G8 e8 N( w% M8 |! M$ O' p! x @.DrivingHome := true;
' U4 O' g9 y; K rgManager.tryToStartTransOrder;) e2 Q( W7 M% F4 ]$ g
if @.Destination = void {2 V M8 H' c/ {
then -- no transport order for vehicle @: s7 n6 F$ i2 _0 `
@.Destination :=
1 F5 y& z. ]/ V% [ C9 g0 G rgManager.nearestFreeStation(@,track.~);
9 ~$ N" m3 U0 v0 U( c newDirection(@); 6 ^4 T& W' w0 y. l# R" F( ~
if @.Destination /= void then
+ ]: X( Y" E( J7 u @.Destination.NumReservation :=
$ O. I( M) o9 }2 L' {" J2 U @.Destination.NumReservation + 1;
9 J9 G( S) S/ d, Z/ S o5 J+ L end;" t& M+ O$ E/ _) a
@.CurrIcon := "drivingHome";
/ F3 {4 l8 }4 v( [) J: s) D @.DrivingHome := true;
; d9 @1 M8 V6 e% t end;" W* [' x' e0 b: b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% j% F% \9 a7 p w! e4 F( e
part := @.transpOrder;
, x. P7 D: i# H; Q* z part.move(@);-- load part! a5 t% B* |9 f, \0 \& e: i
@.CurrIcon := "load";( u+ t7 \& S' u; ?
GlobalDistObj := part.globDestination;7 m0 x; }* r0 y4 z- ?: l
assignLObj := rgmanager.rgAssignL;5 J3 K7 h( [* Q* ^, T) q
row := assignLObj.getRowNo(GlobalDistObj);% w- p4 s1 u Y/ q' J. p2 I% P% E
if Row = -1 then -- since 70
$ \: Z8 y2 k8 n4 i if lan=1 then
. C5 j2 |4 `' y+ w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. l9 J( M, t, g0 A to_str("in der Andockstation: \"",?.~.name,"\""));
. ]; W! t9 E; K1 c) Z else& I7 l. T# D1 B- Z5 j& { W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# s" d- P4 c* ~, X# v7 M$ c
to_str("in docking station: \"",?.~.name,"\""));
) A% n! t, H8 x- _2 p/ b# t end;6 ^% f" ^' r4 r) u4 ^/ a3 f; w7 R# r
else8 v/ r( w; S7 Q: M6 o; a
@.Destination := assignLObj[1,row];2 z( g) w! F8 Q. U4 v
end; * u$ O& p A( M6 C8 c4 |/ }& [! Z
newDirection(@);
: W2 ?. L6 e2 e8 K! K% X' e4 v @.HasOrder := true;# e# K; c' p; i
end;
) N% G7 L5 }8 A1 A& q' P5 \4 } end;
* G9 D# A- f% A2 fend; -- of the method
/ {+ Q& N6 E6 j3 ]! {8 I/ _ |