/* called by: entrance ctrl of the object 'track'1 P# R( q m7 B0 g. q0 S
*/: Q' V) M" K6 D) d }
is( A+ J. n0 [/ k9 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 d0 }1 y% u$ a" E
do; D0 }8 J. O# F5 u% [
Lan := rootfolder.Internal.Tools.AOLlanguage;2 V6 `& s5 T+ k9 k1 u
if current = @.Destination -- else return
% E, k) y! ]. r9 ^ then
( S) h# \, e4 Z+ J. Q3 O @.Destination := void;
( l, D, g- A$ M/ @/ v. ?+ H if @.occupied then. T( C4 R: ~ E/ u( Y0 Y( Y9 y
part := @.cont;- P8 C6 M1 w: z6 X/ J. l
@.transpOrder := void;. ~/ [. i6 x& {) u! t8 Q9 j& x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* S* u0 N9 ^2 l' y7 }" f" h
@,root.eventcontroller.simTime);
5 [) X5 }( j# n" g% S; O3 T @.HasOrder := false;
8 q/ N- ^( n+ I4 S; N @.DrivingHome := true;$ @4 y3 b2 m& p
rgManager.tryToStartTransOrder;
$ p; f; S' _) w1 |8 Q7 X if @.Destination = void4 W! o- j2 ]& Q5 @) Z
then -- no transport order for vehicle @0 F1 s6 ?6 }1 ~9 D
@.Destination :=5 R' X/ D$ ], o
rgManager.nearestFreeStation(@,track.~);
/ h& r8 k8 D( d newDirection(@);
0 d- S* s; M& M if @.Destination /= void then
; m& B" d" G: h8 y2 H6 s6 i; U @.Destination.NumReservation :=0 N, y" X1 j6 x2 `3 {
@.Destination.NumReservation + 1;
/ X8 i5 v+ _/ ?/ L% B end;
$ |( h) k- L: {9 j$ l5 W' s @.CurrIcon := "drivingHome";6 g$ f: j' ]' O
@.DrivingHome := true;
. M. h& y! c2 k end;
) B/ i0 y* @8 T; t/ L# c6 n4 `3 u2 H1 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 J9 Y4 M8 ?- p( l. ^2 q
part := @.transpOrder;6 v/ R4 H9 Q: o* h3 U
part.move(@);-- load part
/ S8 b' @& A5 E8 k @.CurrIcon := "load";( q' P6 o2 ?. Z) f' a6 x2 Q& s
GlobalDistObj := part.globDestination;
1 O' w5 T# H" A0 R assignLObj := rgmanager.rgAssignL;
1 v, @9 G( P4 b9 E4 E/ w( j2 {, J row := assignLObj.getRowNo(GlobalDistObj);2 S3 f0 o% y0 e9 q- D! G( {
if Row = -1 then -- since 70
% O0 \! k! N3 N1 E if lan=1 then2 D3 C* ]# n7 B; `. F: C" ?( O1 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' u& C- t3 U) s6 k
to_str("in der Andockstation: \"",?.~.name,"\""));
. z0 w! t" {; [2 X! h else2 [7 `2 o Z1 W' s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. N8 c" u$ ~& [ to_str("in docking station: \"",?.~.name,"\""));
: e4 G6 [4 d( D0 F% @$ d end;
1 a& J0 f8 N9 }) j else
1 Q. C6 f0 i9 b$ B$ S2 X% _* r @.Destination := assignLObj[1,row];4 z" \ o% Q4 z9 f3 f& M. Q0 d
end;
" g2 ~* O& V6 H3 s* c newDirection(@);, f e7 h& d/ r5 l# A
@.HasOrder := true;' y: ?* r6 m3 b, N" ?2 E1 ?
end;+ e! F+ \5 \2 b2 ]* B
end;; [3 ]0 T: s6 D! \( e
end; -- of the method7 E9 I# y$ u4 m4 T
|