/* called by: entrance ctrl of the object 'track'- d) Y# w) J- W+ B7 {: N: A
*/
, e6 a- c+ o2 X0 h+ wis8 e% m' c, {( R' S! v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 ` R! K! C2 p2 A) B& b! R" ?do$ E, L+ i$ j% Q5 R* ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
- L& \2 J+ a: @$ |# O if current = @.Destination -- else return5 q5 q; r# G/ v# Z
then+ a: H/ u% }9 W0 Q: ?
@.Destination := void;
6 D. \% K; I0 k3 ]2 h' L if @.occupied then
1 Y$ Z# ]. d' T9 L part := @.cont;
, U! d9 j- y6 ]: R. e% O- o3 K @.transpOrder := void;( x9 y7 D- E: z0 f2 p! q! q1 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 |- U9 e3 v$ y3 _/ \' a
@,root.eventcontroller.simTime);
: [9 c$ `1 z' I; l: u @.HasOrder := false;4 B4 v/ D& N2 _& x
@.DrivingHome := true;
% E% W8 S: A/ S8 ~! W+ X. ?6 P$ ~ rgManager.tryToStartTransOrder;
- f$ Z' H$ R3 T% c8 L if @.Destination = void
* S7 u' w8 D! i+ y" o& @ then -- no transport order for vehicle @8 N7 L t4 P+ Z
@.Destination :=
3 [3 D8 X0 B0 ~( L& D* } rgManager.nearestFreeStation(@,track.~);
# y; R1 V) Y& r8 ~9 k9 _ newDirection(@); 8 V# X7 ]9 l3 {; E( ]
if @.Destination /= void then0 n8 y/ J* \: [: ^7 }
@.Destination.NumReservation :=
! @4 p$ q- a; F @.Destination.NumReservation + 1;
$ H% M' l8 f6 G end;) \# u5 c+ _! {) R( s2 r+ y! n
@.CurrIcon := "drivingHome";# M- m- U3 F* y% M2 w- x% ~' C
@.DrivingHome := true;: x3 E: r, N' Z
end;) X6 ^, i" ]- ~+ {: a0 ^0 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ c5 _/ ]3 S# m: S8 P% h% j part := @.transpOrder;
" \. x% ?4 L% R& d2 I5 j1 B part.move(@);-- load part
0 z) ~( q8 Z: |9 c' C @.CurrIcon := "load";
/ z8 Q6 Z! q5 s6 w& R6 C. | GlobalDistObj := part.globDestination;, y% ?+ J8 t5 p. X6 ^
assignLObj := rgmanager.rgAssignL;& H0 i" ~. R x5 }4 a% L4 A
row := assignLObj.getRowNo(GlobalDistObj);
7 w! y0 L+ x" p4 |* m if Row = -1 then -- since 70" b [& R0 E' s7 l2 K: w2 n9 f! M
if lan=1 then
; X' X! n0 V, g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 M/ Z- a6 H/ l! G& Q
to_str("in der Andockstation: \"",?.~.name,"\""));
( f2 w3 S0 l2 O else: d: \0 e3 L O6 g& q2 z' P9 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" ?. [$ W; N& R1 }/ U& f; i to_str("in docking station: \"",?.~.name,"\"")); 8 \0 a) Q2 S) H1 h$ m
end;
' X5 N( G+ o1 e# t$ S" F else: l3 Q4 e9 p' ~# @6 g; f- d
@.Destination := assignLObj[1,row];
4 O0 J8 N; k6 { end; 4 f% w- H6 q3 \7 |
newDirection(@);
2 e/ C+ z: l& C; u) G0 W7 A( E @.HasOrder := true;/ v! ]. P: U% Z& t T
end;/ T: t! q. t; u1 G1 b
end;# Y4 \9 |7 {9 t5 o
end; -- of the method! o9 U& ~: w0 ^+ ~
|