/* called by: entrance ctrl of the object 'track'% ?# |# B; }9 d/ r% ?
*/
5 D/ C( b' i/ M9 n l6 ~is4 M5 \6 s0 [/ Z* F& S! l0 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& ]" g7 h2 M. p) G/ q
do) e" G% X& t8 v; ?- E8 b
Lan := rootfolder.Internal.Tools.AOLlanguage;4 l# y3 [- S0 [2 u- J2 L
if current = @.Destination -- else return
6 |) T& @3 O' ?, m' G+ x then
2 M% T! t* m1 X" v4 Q @.Destination := void;, b7 ?9 Z& f8 }: d# k
if @.occupied then
* [* Q J& C+ c part := @.cont;" y' x$ [ f" g9 Y1 B
@.transpOrder := void;
9 b* H2 _! E, N: R5 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& y; B8 l2 V- N m' W! A. u @,root.eventcontroller.simTime);% s7 R3 q! q. ?1 a$ r
@.HasOrder := false;6 C1 ]+ j9 O% i# D& S8 M
@.DrivingHome := true;
4 X/ k) r) O. V( B rgManager.tryToStartTransOrder;7 X1 k% ^$ o* p6 B# s5 @
if @.Destination = void
5 x8 V' D5 g8 P3 C then -- no transport order for vehicle @3 D$ ~; q' w, }4 {) p
@.Destination :=
9 h! g* [7 R$ a7 k* ~( m7 b- C" H& E rgManager.nearestFreeStation(@,track.~);; S* f( [1 k! \3 Y: m
newDirection(@); . U5 N3 o' }2 C+ m9 I. I
if @.Destination /= void then7 Y& G4 `$ A/ y# i" g
@.Destination.NumReservation :=
: {, b4 \5 z5 T+ R' Q& \ @.Destination.NumReservation + 1;4 V. {- V1 ^0 b1 c1 m8 ?
end;
/ F' P" u: G5 [! u) i5 b @.CurrIcon := "drivingHome";
' F+ b3 p* _% \6 ?% G/ h# c0 p$ i) }, v E @.DrivingHome := true;! D8 b+ e" k' t3 u' s7 r0 Z" Z
end;% Q1 s$ s0 x* V4 ~! {; K5 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 |6 F& B3 p# ] i
part := @.transpOrder;, h! V/ q; K/ ?" @
part.move(@);-- load part
& z1 d* U* x9 \ @.CurrIcon := "load";$ o" u% }% J4 ~6 ?6 B. H
GlobalDistObj := part.globDestination;' G- q& d* ?$ U6 j
assignLObj := rgmanager.rgAssignL;/ |8 t& c- ~ k" m
row := assignLObj.getRowNo(GlobalDistObj);
7 ^# ]. R9 G U; K# i5 V' _8 | if Row = -1 then -- since 70
% n( y# Y* d# a6 f# |) a if lan=1 then
& b& h. D. ?/ f& k* s. |* Z6 z9 Q) @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) U- i/ \, |9 w. Y: T1 K6 |! L
to_str("in der Andockstation: \"",?.~.name,"\""));* c' Y+ J. Q9 b D! [( l
else
" ~* C& W# ~, y# _- w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ Y' c; P8 I+ V" T+ Z K# O
to_str("in docking station: \"",?.~.name,"\""));
, w( V' E z9 v1 W \$ p end;
2 F: ?( u/ z; u0 _4 K else1 n9 ?; `) i1 V. w0 r! F
@.Destination := assignLObj[1,row];
; u& m H- \+ B3 M) u1 E end; 3 T. j5 g/ k- r+ `. M/ S* A0 W
newDirection(@);
, Q* b) P- U3 M: f) B @.HasOrder := true;
( M1 M# E; y3 M2 }: x t6 ` end;- ` I: w! o: s% y5 y* A" \. L l
end;/ u0 s. `( y) K0 m- A$ M
end; -- of the method" c% q/ B- U8 I% w! h3 G+ M
|