/* called by: entrance ctrl of the object 'track'
3 o L$ C; N+ w% x$ Y- v& j+ }0 `*/' ]8 N/ a, |' T" M0 _9 p+ H5 C' @& E5 n
is
3 U( Q: R( [1 i. Z& M: P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 `0 p/ M2 d; H _! g$ ido
5 k4 e8 h0 _; n* f4 W3 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
8 G, J: ]) \- B0 n$ B if current = @.Destination -- else return
/ X3 s* [: T/ X$ F then
2 u5 y0 I6 C9 i @.Destination := void;
" L4 D$ o( n9 ^1 a7 { if @.occupied then4 U4 k7 x0 f* l/ C! k& N: f
part := @.cont;5 v- W8 U3 H" D V: [
@.transpOrder := void;& i. |2 c- W7 F! U( m& |9 \6 p; _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 Y4 D% o; \. y- I/ ]8 f @,root.eventcontroller.simTime);' J' c7 R N: W0 y
@.HasOrder := false;" S4 U. a, J3 o/ g0 m3 ^
@.DrivingHome := true;2 s3 B0 r8 w3 e2 C* V4 ?
rgManager.tryToStartTransOrder;
3 f1 W1 U% k& e0 X if @.Destination = void! `8 a# B/ P& u9 z* ]3 ^
then -- no transport order for vehicle @% C; X$ V# r; Y) E! s2 E
@.Destination :=4 ~( D ?! f. Z) a$ @& H9 x
rgManager.nearestFreeStation(@,track.~);
* T4 H; N. S G newDirection(@); ) X5 S' i( H" r6 Z4 J1 T
if @.Destination /= void then' o& W" o4 g" L/ {
@.Destination.NumReservation :=8 }" e* l* _7 E6 u
@.Destination.NumReservation + 1;
' f1 v8 a' T4 ^% T/ l3 X! t8 s end;$ ~( i1 q5 p% g( P4 S: e* v
@.CurrIcon := "drivingHome";2 g5 }6 u) X9 d$ V0 C
@.DrivingHome := true;
# Y0 R! }2 M% n4 S& f end;% D6 D% }2 {% w) [4 ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. b5 y% v5 H! K( L* G$ Q0 d& s4 C Z
part := @.transpOrder;
+ C8 t2 ^3 P' j8 _. E: g part.move(@);-- load part" E4 L3 i+ W8 j; ]
@.CurrIcon := "load";6 M4 Q3 M3 q0 c( J( }+ ?1 o
GlobalDistObj := part.globDestination;* E# k W: W. \0 e2 J
assignLObj := rgmanager.rgAssignL;
! K1 e! O# E! T3 }5 l( V E row := assignLObj.getRowNo(GlobalDistObj);7 r: h8 e: i- |1 ^
if Row = -1 then -- since 70/ S3 k5 g# B* u7 W5 z& U9 D
if lan=1 then- j" I8 e" i, p" P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 D' e% ?1 @* Q/ H7 _" V to_str("in der Andockstation: \"",?.~.name,"\""));
( |7 `) o2 S, { else0 I7 F3 u) ]- [" }! \/ y$ [9 @% u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) X: f# A/ R2 [4 h) H
to_str("in docking station: \"",?.~.name,"\"")); % ?' J$ B! S" j: M2 w
end;
* _ g4 f9 g( q4 f* }4 X% q" ]& v else
2 v( P7 v0 {. l @.Destination := assignLObj[1,row];
2 T9 b" ?* B$ A8 Y7 }$ Y# ~$ F% L# I1 N end; $ R- ^0 m [/ O5 C
newDirection(@);( y' T4 ?5 p8 b2 O. G% r; l4 _
@.HasOrder := true;; S0 E, y$ n! V' U
end;
% m% B0 Z1 @, K- g" n6 k+ ^( Z" Y end;: I, L/ d* S, d! Y
end; -- of the method
1 x. X5 ?6 c; k ^ |