/* called by: entrance ctrl of the object 'track'% _8 n- K+ S! ~$ s1 J
*/ M7 Z! m3 Z( m, Z, x% Z8 C
is
' @! p1 j9 ?4 S Z1 I$ U part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 P5 C! G5 g. i! a' x6 H
do2 k% ~. c& L( H$ ^/ J3 U
Lan := rootfolder.Internal.Tools.AOLlanguage;$ J4 f+ p& m, U9 E) S
if current = @.Destination -- else return3 J+ `% d1 x0 R F. k0 X; r
then
, i: m+ J6 g& Z' V3 ^ @.Destination := void;
c$ O( h3 c0 W5 y u; A; Z if @.occupied then
h; |2 r: u( i5 _ part := @.cont;( O }2 w9 W+ [5 ? m% o
@.transpOrder := void;5 n4 b! ~/ \# s% g$ o5 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, M6 g$ B4 T# g4 j$ g7 y# w# ` @,root.eventcontroller.simTime);( q) G) H- p" e& y' E+ d
@.HasOrder := false;$ c% r0 f4 x6 \ d# g
@.DrivingHome := true;
. Z( ?- W5 V2 q8 S( f rgManager.tryToStartTransOrder;
, K7 W! `; f* J if @.Destination = void! |+ G/ k1 ]' t) I2 ]1 `
then -- no transport order for vehicle @
1 X+ S$ } M" w" |7 P @.Destination :=
0 m, R3 P3 Z# X8 o0 H rgManager.nearestFreeStation(@,track.~);8 A4 e/ m: e; C+ D; s
newDirection(@); & Q# k+ d U- ?0 M. M
if @.Destination /= void then
, g s% f* \+ h1 N/ _0 X* D, I2 d+ i9 A @.Destination.NumReservation :=
; T8 o- M; j5 Q2 Z @.Destination.NumReservation + 1;
+ ^+ E* e% a9 Z0 v% Q# h3 I" E end;
0 m% z1 V! q1 S( N @.CurrIcon := "drivingHome";
0 q) W2 \+ t7 v6 d9 \8 B; q1 B @.DrivingHome := true;% T4 T+ V. Y5 i7 g
end;# q: c1 I8 `1 k- a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 r. c7 \9 L7 F
part := @.transpOrder;
- R7 C9 y% Q8 ?2 q% F" L6 @! N part.move(@);-- load part
2 T4 h5 D, i4 m1 N5 ^1 y) @2 s$ k @.CurrIcon := "load";
3 p( N2 s' |) h( F) n GlobalDistObj := part.globDestination;
0 V5 S4 C( H! M% Q( y assignLObj := rgmanager.rgAssignL;
7 z: ~' S: Z$ @ I; l0 Y7 v# O row := assignLObj.getRowNo(GlobalDistObj);
; c+ x. d2 W5 G if Row = -1 then -- since 700 B$ l/ p$ g- E0 G- m' `- l4 c
if lan=1 then
0 x+ R, f8 Y! T1 Y N- E; _9 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 V2 F" q2 m/ r' p7 E to_str("in der Andockstation: \"",?.~.name,"\"")); b* K/ w0 X# G9 D t& A! X
else* t' T6 ?( @, |" o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 [- D8 n! Y. y to_str("in docking station: \"",?.~.name,"\""));
& k Z3 z: Y4 Y0 B end;
m* {2 |" B* h; x* h else
|" Y0 N3 N' x @.Destination := assignLObj[1,row];6 X t- c) ~$ M/ l& n* B( N: d& ?
end;
: `" V+ m2 i0 j7 L* R0 D newDirection(@);
0 ~5 A$ f/ B; d3 @+ B) g& X3 p/ i @.HasOrder := true;
& O. }* \2 U( c- f end;5 a% c8 i6 ^/ ]
end;) b/ ^3 E0 n5 t: v# ]; x! T A9 Z7 z& i
end; -- of the method, K( U+ y4 x* V7 J0 a# [! a" {
|