/* called by: entrance ctrl of the object 'track', i) b, Z4 ?$ h+ Y0 P
*/* |1 U/ q) u$ |3 e' M- j# I+ R
is
. ?& W! ^3 `. Z+ ~4 E9 J7 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;) y4 l# o1 b$ m4 k$ N2 n6 {4 M
do; U3 e7 H0 E. h& O
Lan := rootfolder.Internal.Tools.AOLlanguage;3 s; n8 j, Q$ f( G/ O
if current = @.Destination -- else return
1 r/ u6 n% [) y6 ?7 ]: m then
% Q4 [) ?: T+ u. P! x @.Destination := void;/ G4 f/ I, q3 H0 h* q
if @.occupied then
4 q; A/ Y' W0 y; O3 f5 G1 X( H part := @.cont;. ~/ b3 J8 K/ G& H
@.transpOrder := void;* |& K( C7 w% J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ S) A+ v' W+ X' n! z! G& u% R
@,root.eventcontroller.simTime);# O ]% ?! S. P- Z0 F
@.HasOrder := false;: b. O6 A' _3 |- x- c# R
@.DrivingHome := true;: N0 O" Y( A6 Z; ]6 u; l, E/ Y% S. h6 k2 ~
rgManager.tryToStartTransOrder;2 ~- ]2 D2 v( c, q0 W
if @.Destination = void
/ C( N, q4 f5 u% b: z6 P \ then -- no transport order for vehicle @
5 T& v @% m! B; n& E# [ @.Destination :=& q; i( i2 x+ N3 {+ ?( ~
rgManager.nearestFreeStation(@,track.~);3 x# R4 L! A8 [5 ~0 p7 t0 f
newDirection(@);
; L, r% M4 p i8 B. e. t if @.Destination /= void then, m+ {4 t, b4 l9 |2 R0 _' c( W. W. P
@.Destination.NumReservation :=: ~, r6 B. a+ L' ~5 w. ^
@.Destination.NumReservation + 1;: A- U/ |% @* G& p p
end;
: A O' @! g& v$ w* u @.CurrIcon := "drivingHome";* D D3 v a0 I
@.DrivingHome := true;
7 }' \, w9 K- B! c end;
( K1 G. q# ]4 Q* [) L% { else -- the vehicle @ is empty, both vehicle and part are in the same dock station, }; z p+ ?3 |1 s) d
part := @.transpOrder;
1 k% a) P }% I; n part.move(@);-- load part
. I5 V4 h1 e, D" n0 l# w z& X @.CurrIcon := "load";
. F+ W, b! u! M$ _4 p0 c3 i GlobalDistObj := part.globDestination;
# A; h6 \7 d9 q/ `2 X9 k& w assignLObj := rgmanager.rgAssignL;
' K6 H- v/ |$ r0 m. J$ ?4 F row := assignLObj.getRowNo(GlobalDistObj);0 y8 w$ {7 Z' m( J2 E
if Row = -1 then -- since 70 T% P, K! V1 M$ i: w; h+ _
if lan=1 then. V8 Z4 }, a, h) m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 ?2 V1 m0 n# \
to_str("in der Andockstation: \"",?.~.name,"\""));7 N) S b# n2 G+ \! K
else2 \ \6 P/ `/ w1 Z# _2 _# j( ? }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ M: u6 B0 g0 [) v to_str("in docking station: \"",?.~.name,"\""));
: F! [& A4 u4 |1 E end;
$ s/ ^: i4 M8 [ else) E: E4 t- W! H |) V
@.Destination := assignLObj[1,row];6 z" B8 P- S: d' Y- @
end;
5 Q8 F" H6 g; L3 l( ` i$ @ newDirection(@); L! s" ]( O/ B0 n$ O
@.HasOrder := true;7 V; \6 V% Z4 i- }! G) J3 X
end;
4 l! k. g+ R8 S. f$ a$ e8 w end;
! [+ R# R% ?9 i: p7 [+ Y& ^end; -- of the method1 ^3 v Z) w. z! }# D, N% l% ?
|