/* called by: entrance ctrl of the object 'track'
6 O. u8 K" |; V% S4 ^*/
6 G( D8 `+ d" Xis3 `6 W( b, @) i6 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) {- I* U' q) P& T3 O# O* bdo6 U3 @; T- @: B$ b* ?& d
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 y5 ~- S ~9 \8 P1 s; d3 x if current = @.Destination -- else return
' _* E- V1 X' _ then$ i2 R8 T5 x5 S* \, s
@.Destination := void;
; D+ E( w5 @8 D if @.occupied then/ s+ r! k0 L: X o
part := @.cont;
3 p1 l1 [" Q( O5 o: i0 ^ @.transpOrder := void;( Z; @2 Q. p3 j8 K5 d+ S* }9 f% g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: c- p/ {1 ^& c5 k8 o: z% D' r @,root.eventcontroller.simTime);
! q4 P: p& G- U9 W) H @.HasOrder := false;$ b, v- S& l+ [( P) @2 v1 w
@.DrivingHome := true;
8 i7 Q* O p. q% [ rgManager.tryToStartTransOrder;
# q% U# E. R5 f$ E if @.Destination = void
& Q3 X- z7 Q& ?- ~' Z then -- no transport order for vehicle @
4 G" c6 j% m9 x! H2 o @.Destination :=
+ W( L1 {' m, I0 L. p" q rgManager.nearestFreeStation(@,track.~);0 Z7 X2 ^( w9 Q: \
newDirection(@);
( B' B3 }) t& O B0 j if @.Destination /= void then
1 F9 b* g& c; R( B. t @.Destination.NumReservation :=
$ w4 j# v) b P2 Z* r7 S& s @.Destination.NumReservation + 1;/ c ~, g$ I. }4 l8 Z' o1 d
end;
$ A) x- _5 M9 t/ X& i! Y _ @.CurrIcon := "drivingHome";
8 H) O) h7 ^2 m" f) T @.DrivingHome := true;
: r* w, I( L3 c2 b$ b$ ~. m. x end;
: v2 V- K! I9 ?5 v4 {* q else -- the vehicle @ is empty, both vehicle and part are in the same dock station# g/ `5 K6 p& A, @9 T3 s) U# A. Y
part := @.transpOrder;
+ r, Y. w( n* o part.move(@);-- load part2 y/ x* M' E P$ d9 y+ Q3 ]
@.CurrIcon := "load";3 G* T0 \; _# T& _- w5 n3 n
GlobalDistObj := part.globDestination;. T- f! V/ U$ k( j
assignLObj := rgmanager.rgAssignL;
: _3 x# C1 c+ N2 s& z4 E. b1 v$ q row := assignLObj.getRowNo(GlobalDistObj);
1 _0 H9 P" f0 G- r) O3 v if Row = -1 then -- since 70+ F+ T% \0 d" C, W% B
if lan=1 then
( @% s4 u; B. f) L; W$ A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 ^6 O+ K! F5 A" I! p8 o% R |& @9 ~ to_str("in der Andockstation: \"",?.~.name,"\""));8 F# o, V. W& {: }2 a
else9 c) P) D: [2 L1 b: J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* k. B" X( Q0 v8 X( L9 J1 q* k: G to_str("in docking station: \"",?.~.name,"\"")); " I8 \5 m8 Y9 w$ H0 q4 b6 N: t
end;- V% N# [; j0 a4 O/ M6 F
else/ F ~( m4 P- w! {
@.Destination := assignLObj[1,row];2 i3 @: O; m9 t9 Y) D
end;
4 T L% d% Z1 f9 f. t newDirection(@);8 d2 s7 R' C. ~! O( r* p# L
@.HasOrder := true;
D7 l& c9 o/ F; W! `4 t3 S end;
9 x* l D/ C9 _* ]2 @% P7 W end; G( W6 d6 y8 y9 ]# B4 R& H
end; -- of the method
8 p6 O: e+ t9 L; g ^ |