/* called by: entrance ctrl of the object 'track'4 Z! P+ Q$ m. J8 u3 Y7 M- S4 \
*/1 `7 e0 ~& i3 d! `. d
is
' m1 k* [- l( e7 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 O! W( Z1 Z6 h1 A
do( l: M4 [: X0 T8 i2 o
Lan := rootfolder.Internal.Tools.AOLlanguage;
( ]8 m0 c) b a% F5 Y3 U if current = @.Destination -- else return
' h& T! @. g8 W# D I then( p$ ^) [- O3 j9 \. {$ \. H
@.Destination := void;
0 f; Y# S8 ~% E l. f+ a) b if @.occupied then
2 M" K' l* Z C& Y6 f3 H, o part := @.cont;! s1 T0 G5 o5 r- y
@.transpOrder := void;
7 n1 I2 @2 |6 x' E4 `; ^2 X2 F4 q1 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ `* R4 ~% j4 v @,root.eventcontroller.simTime);
/ Y" Q8 v* k f- i2 e3 \ @.HasOrder := false; G5 m/ w: C/ x; k
@.DrivingHome := true;
! ~' q! i; x) J6 U" W rgManager.tryToStartTransOrder;
4 N4 D D; k, \ if @.Destination = void
, p& [+ q, p2 X5 p then -- no transport order for vehicle @
5 ?# ~9 H8 b+ P6 d* z6 C8 w& P% j @.Destination :=
+ p5 v- g! k8 P rgManager.nearestFreeStation(@,track.~);
' w7 p# B6 u3 O t, {5 `( Y newDirection(@); - @, H7 Q9 t5 ~ w- S! r$ Z- |: t7 ]& N
if @.Destination /= void then8 c; |. v2 w+ P. N j! W" F/ I
@.Destination.NumReservation :=
1 j7 o6 O: ?0 K2 C7 Z2 b& O @.Destination.NumReservation + 1;
7 `. ?' J& ]0 r7 Y0 E4 q) \ end;; j* v, b- z+ l" `' a2 F5 B. c: Q
@.CurrIcon := "drivingHome";
$ v+ K7 `$ @" T, `; A( _6 Z @.DrivingHome := true;
: `% z2 }: C Y7 c end;
, E. J$ Q4 G x, D1 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" n5 [" W& ]7 r- E/ ]5 ` part := @.transpOrder;
/ {) ]; G4 e0 ]' h0 U% q( G- F. P part.move(@);-- load part
: I) [/ l, I/ ]# K @.CurrIcon := "load";
' @2 ?8 n% r* j GlobalDistObj := part.globDestination;
& A* m6 F% \- ?1 O5 P. J assignLObj := rgmanager.rgAssignL;
/ h+ z& d5 v" L' Y" }# V/ `! _) v row := assignLObj.getRowNo(GlobalDistObj);
, r/ \8 f+ e3 H if Row = -1 then -- since 70
. {1 ]( D, `; q7 p: Q$ i7 q" R if lan=1 then# p$ w+ W' M* `+ Q( ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( A! x3 n1 F7 a to_str("in der Andockstation: \"",?.~.name,"\""));9 V. B+ ^9 h! [( \, e" G
else% J, R, K b& i/ E2 v5 h) Z0 x2 C. x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ W1 U6 B" m: A; r. d to_str("in docking station: \"",?.~.name,"\""));
4 E" l3 k6 F, Y& E' Z% h end;; H" s, ?% w( v
else
/ U+ e' [8 J# i' z" o" n @.Destination := assignLObj[1,row];
# C% q; p3 p9 v0 H/ b$ { end;
1 }+ d& t- ] K, w l( h newDirection(@);3 I1 l3 H' k, w0 Z
@.HasOrder := true;
( X' ?) o( x# f* c end;: E5 [3 B; u6 i7 Y9 ^; `) U9 ]) Q
end;
# {4 r; p x9 ?3 Y$ h1 S: v8 uend; -- of the method
/ h: y+ u- q9 T- e9 ]& k, X& g. v |