/* called by: entrance ctrl of the object 'track'% Q2 _& G9 |6 |' ~. M: X& J
*/
# c# D% A e5 B% @5 w8 Ris
: i7 a @7 v/ U part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ \% V% p# O6 T5 t+ I% _9 w
do
: X3 j+ a8 q: B Lan := rootfolder.Internal.Tools.AOLlanguage;
" r1 @( \% d& U if current = @.Destination -- else return
4 L! M7 P0 S6 P7 q0 m- d9 ? then
0 V, B A3 N0 ?* g% ] @.Destination := void;& n' h9 v0 F) h2 e/ R
if @.occupied then
6 }& c* u/ n& h- a; R9 j& U2 R part := @.cont;. ~ S! l' x; a0 ~) P$ P' l& C
@.transpOrder := void;/ N0 D, y6 m7 F; r7 M0 {* n& F* R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& M0 E. K$ P$ ]) g @,root.eventcontroller.simTime);2 n" \( o- u/ U# U
@.HasOrder := false;6 }& L! P3 Z: t% V8 f; i9 r5 e5 J/ L; x1 V
@.DrivingHome := true;8 d# K: w: r( Q: T, l# V* m
rgManager.tryToStartTransOrder; _) W" @4 \, y$ S ~
if @.Destination = void+ i+ x& K7 p; u+ n ~
then -- no transport order for vehicle @
' q7 S; ~1 W4 F7 l$ F; c& j: h @.Destination :=
3 h2 v7 u }! ~" p! o) w. B rgManager.nearestFreeStation(@,track.~);
4 m) ~- a! d7 }' U% O0 K- @ newDirection(@); , n; E8 v8 g6 w! D% E8 G) m8 N; {7 n
if @.Destination /= void then+ f6 v+ n3 Y% M# V, O" U
@.Destination.NumReservation :=
, o1 O) S* J0 g" I3 Z @.Destination.NumReservation + 1;
/ U* {, M' B0 I- S9 j& F end;, b" [& B6 T1 b* u! q$ B
@.CurrIcon := "drivingHome";
6 }& m# P& i& k @.DrivingHome := true;
4 ]6 T, Q4 u$ A: V5 c3 m" b$ z5 j end;
* h! s+ P; i! |' [( C0 x$ s5 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station% c6 d6 E6 t) D$ s# U5 k
part := @.transpOrder;" q/ e' C9 O3 S( {! \% r" Q8 b3 B: B
part.move(@);-- load part
/ X6 u( F3 m* l: u/ y' s @.CurrIcon := "load";7 w/ v+ c* V7 e( ?
GlobalDistObj := part.globDestination;
* n8 J1 E, a# z9 a assignLObj := rgmanager.rgAssignL;5 c Q* n' R; O! Y
row := assignLObj.getRowNo(GlobalDistObj);; O7 j; {% L$ I3 F& S
if Row = -1 then -- since 70
# Q' r( t/ b9 F* { d if lan=1 then: b1 S/ S9 l3 A+ ^( L- n2 q' N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 `4 s7 G) W/ u" W& z to_str("in der Andockstation: \"",?.~.name,"\""));& w2 [. {; O6 |( ?; d, [8 W! E. y
else
* G; ^0 M1 H- g. D ~! R( |# c/ a0 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 \& @1 g# _/ h to_str("in docking station: \"",?.~.name,"\""));
7 V, ?1 b. F& V- n& x. f end;
9 z3 V1 I$ r1 ^ else V7 W* Q4 W j
@.Destination := assignLObj[1,row];5 D7 P1 ]5 Z5 W4 k9 D& c$ J
end;
. M- v* d2 b4 o7 I; ? newDirection(@);& ~: B+ s6 s$ Q. q4 H0 T U+ G
@.HasOrder := true;+ k' D: M7 z' q. k5 T: E
end;1 q6 M! c4 M0 i
end;
# b5 u+ s, @5 k% E' @3 M- ^end; -- of the method+ W# f' ^' w, N2 r t% k( j, G
|