/* called by: entrance ctrl of the object 'track'
* I* b' z( L& m0 _2 u*/
6 T" E4 a1 _3 ~4 Z) ?6 }$ Uis) [ M) k/ }$ n! i# E$ v9 Q+ i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ H2 R7 u7 X% V2 u
do6 K0 R+ N# H) c* W$ v9 A
Lan := rootfolder.Internal.Tools.AOLlanguage;! ]/ p, _" X% k8 U1 }
if current = @.Destination -- else return
) V; x+ C5 l. E- M: U then
3 w8 i+ A/ v7 D! C @.Destination := void;1 n& f. v$ X) R/ z
if @.occupied then
* _8 }2 n, J$ s4 R part := @.cont;
; Y# R. Q9 s3 Y2 }/ ?' \$ S @.transpOrder := void;! q7 G& d, y- @% T1 V9 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% h$ c7 W* A" S: \$ I- k9 V @,root.eventcontroller.simTime);
! U, C+ V& y/ Q3 l1 x2 l, n @.HasOrder := false;$ f9 ~8 g3 X8 W
@.DrivingHome := true;
0 |% T! e# b( W h/ m! J rgManager.tryToStartTransOrder;
9 X$ b, h/ r. T$ I2 K& c if @.Destination = void0 w' r: a" n* H8 A% E4 ~
then -- no transport order for vehicle @; H/ G+ m0 O+ U4 k. n' B- _
@.Destination :=
* u' @3 P7 O" V3 }, k1 q% ]7 U# q% q rgManager.nearestFreeStation(@,track.~);
/ }3 P5 |: h' @) F newDirection(@); ; i, @8 s/ @0 L& f" m1 I8 R0 `" R) D
if @.Destination /= void then
) p% A" T {/ e2 T2 q( @: m @.Destination.NumReservation :=
# a& l/ H+ L! \; ^& J0 j5 g @.Destination.NumReservation + 1;: x+ l5 I% s/ d) y
end;
5 R9 w, I ?7 _: P; s @.CurrIcon := "drivingHome";
d3 l7 G" \7 o' c6 l4 e( T0 O @.DrivingHome := true;
8 x( a! z$ o* s$ \/ t& {" c end;" _9 v \0 z0 w; b# D2 o2 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 Y1 B6 d( f+ }! y( \' E% i part := @.transpOrder;
$ N3 ]& ]" ^- q part.move(@);-- load part2 x+ c( X) H' z- E+ n k% n! r
@.CurrIcon := "load";
* L+ G# Z) P" r GlobalDistObj := part.globDestination;$ s' \8 u1 ^. e5 X
assignLObj := rgmanager.rgAssignL;0 ^0 t/ |) ]( _& T6 u3 {9 c! w2 H
row := assignLObj.getRowNo(GlobalDistObj);
' C d* E4 S2 ~2 }3 I, `2 }% v if Row = -1 then -- since 70
8 t k; I7 h9 M' Y2 ` if lan=1 then
: r* L3 E- t" i0 t0 |# C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 w# J+ x; Y" @, K3 D* V to_str("in der Andockstation: \"",?.~.name,"\""));
0 v% w4 _& W( G3 { ` [5 Z( Q2 a. e! H9 b else
7 z" V: f2 P" d1 v$ F3 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ?, `! v. s0 }* I2 s
to_str("in docking station: \"",?.~.name,"\"")); 4 x1 n3 i x/ h9 S" }/ B, o
end;0 b) ~( e2 J: k& a' q
else
0 }+ |$ g% h! m) e5 ?. V @.Destination := assignLObj[1,row];
6 ]0 N: p. ~$ J* u( e end;
+ J) [. R5 z& H9 R newDirection(@);
" U- Y7 J0 H L& j& g @.HasOrder := true;" u5 K7 {4 Z. E6 f6 p& P
end;
& P) X6 O2 E, M: k6 L end;
( ?( L: q. K9 Z! [ Oend; -- of the method8 y/ F: N- i B
|