/* called by: entrance ctrl of the object 'track'9 V5 ]( R7 D2 U$ E9 H2 P" d7 O4 I" l( a
*/) U# P* N: B$ i, c
is! c9 a! U0 Z" P4 J6 j" w* ]* e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ i4 o6 s+ u; a" ^
do
) i0 L& u7 q$ Q; j1 I Lan := rootfolder.Internal.Tools.AOLlanguage;* L% p6 ?. W( x6 H2 p- Z% @3 F
if current = @.Destination -- else return9 O0 `1 h) |2 V/ ^# X
then6 P! F4 a, O, d7 k2 z
@.Destination := void;/ D U* e1 O: q3 f4 g
if @.occupied then
4 ]# [- i( A( o" m3 x! q" x3 P part := @.cont;
4 U5 H$ j4 H: G* O+ y2 g" I' w5 W @.transpOrder := void;! h5 X! {7 b% _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ F7 \2 A0 h3 l* `( {% l9 o
@,root.eventcontroller.simTime);
3 I: L% d9 x5 ^2 y @.HasOrder := false;
, _% ~# a U/ k9 Q* W: Q, P. s @.DrivingHome := true;# j! `5 X" u! D
rgManager.tryToStartTransOrder;
* ~3 H- Y- [2 X- q0 C if @.Destination = void: o/ {) R$ P! @; u( p; j$ F
then -- no transport order for vehicle @, f* T* l- K- \5 N5 I
@.Destination :=
7 M" F: O) e8 ~: j rgManager.nearestFreeStation(@,track.~);$ o0 S5 o- N" @! B) q
newDirection(@); : Z2 e3 ?- ^' M
if @.Destination /= void then6 z/ G# E; a: z& d, k
@.Destination.NumReservation :=
6 ?* H2 [7 w1 e; k @.Destination.NumReservation + 1;. ~* W1 n7 r4 \! U# m
end;
' _+ K! Z' n% F @.CurrIcon := "drivingHome";
) n2 S* K( N) C1 w+ s! G @.DrivingHome := true;
1 D9 u8 G! x: G end;
) M7 Y+ c/ E. V& Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ p+ i" V) _3 U9 g
part := @.transpOrder;; z8 E* |% J9 c6 U
part.move(@);-- load part% e, t- @. S3 M% s9 l; f6 U7 M
@.CurrIcon := "load";
! U1 M6 X7 Z0 y2 @& c: Y5 z( i2 K! B H GlobalDistObj := part.globDestination;9 p3 T: W* D& l0 r
assignLObj := rgmanager.rgAssignL;) T. S# i" x' j) r1 `9 F
row := assignLObj.getRowNo(GlobalDistObj);
% d+ F# V. |% ~; k# F0 A9 E if Row = -1 then -- since 70 z' t. g: A! L0 a( v
if lan=1 then
( ]- t" g& {! k- Q3 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- m' K0 s J7 |+ C0 c! S
to_str("in der Andockstation: \"",?.~.name,"\""));
8 \$ o S* T( B3 r/ U6 l' O, x else
! i0 n1 R' z7 Z6 l$ z: i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
H0 j' c* x& r% y# f to_str("in docking station: \"",?.~.name,"\"")); 7 M" B2 d0 a) h+ a
end;
: P# }9 ~3 d- O" s. Z8 R/ b) X( v else
( r0 N0 @! f3 f# A @.Destination := assignLObj[1,row];9 Z! B( {* l5 M3 W5 J5 i; U
end; ; o/ r& s: b) f8 J" v2 r2 b
newDirection(@); L0 u4 q8 O: [+ b; d2 D
@.HasOrder := true;. s5 x, g& _7 A, {8 A
end;9 ]8 |+ r7 i) [( t: ]8 i) N$ D4 Z: t
end;& s5 Z4 P' c( a3 R" J. D1 O
end; -- of the method3 }: R% z$ X, k# C1 Z( q
|