/* called by: entrance ctrl of the object 'track'
1 G) N6 K( M ~7 p5 _# G. a g*/
- N$ F, |9 j5 l! G! w9 Yis
4 N$ J8 O6 Q. r, O. r3 P% Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 [/ t" P* m0 Y0 I# X# d* h5 e( v
do# ~2 h: `$ }, g
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 d# j* J) w. @ M if current = @.Destination -- else return
) O: ]' A! j; S then
% ~8 o+ J8 l9 k* h" ~$ N @.Destination := void;
& Z. {; H* C+ F& |5 j2 {$ H! T if @.occupied then
5 ]1 J/ b, O7 [$ H9 C part := @.cont;
1 ]+ k* _7 p# V) B4 Y @.transpOrder := void;
7 ?1 W, A8 z3 j9 Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 |, Y( R3 t$ n1 x% {. S @,root.eventcontroller.simTime);) y1 A# R* e% w8 k2 H# D% q. F
@.HasOrder := false;
. Q8 }: _* X: L7 H @.DrivingHome := true; l7 C+ @( y8 N Y( c1 O6 s6 a
rgManager.tryToStartTransOrder;3 o, l3 |" M8 A& ?
if @.Destination = void
' `& l+ l/ N8 m8 P! o then -- no transport order for vehicle @
" {3 D. x! Y. e" F/ H( y/ l. O$ n7 k @.Destination :=
c% O' h2 K6 T* J7 o# Z$ b rgManager.nearestFreeStation(@,track.~);
; T% k+ k+ J/ F/ U# A w: L newDirection(@); % u/ v3 }( d2 f2 x
if @.Destination /= void then7 \0 Z- [) j' _4 s! H" H
@.Destination.NumReservation :=" ^: b3 B, ]+ b+ _: w, t
@.Destination.NumReservation + 1;
) r" k+ C6 \2 M' v7 L0 c: x end;
: j" A6 s, W4 w9 d; k) g) [ @.CurrIcon := "drivingHome";
$ u! p, ]( s8 F7 z! G a @.DrivingHome := true;, j+ i$ |5 g. b' t
end;; k# ^ X3 J$ [; Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 } j7 i9 }' ` |' f9 d
part := @.transpOrder;
: _4 j+ k6 v) M: H% ?4 h2 T/ v part.move(@);-- load part; A3 B' ]/ A0 k$ R j& s
@.CurrIcon := "load";' [! G0 ]9 T9 Y' q% f
GlobalDistObj := part.globDestination;( j" B* W/ K6 J' [' H
assignLObj := rgmanager.rgAssignL;
- u! Q( }$ _% a$ V3 y2 W. m row := assignLObj.getRowNo(GlobalDistObj);
9 [; Y7 m, `/ D) K2 S if Row = -1 then -- since 70
" I8 b: V1 }& c9 r1 t if lan=1 then
8 x, N9 G/ x! B* Z) e: s* B1 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# `, V6 j- Z8 N) |4 C7 v* B to_str("in der Andockstation: \"",?.~.name,"\""));. i, {* t7 }$ n/ _" o; n7 P8 ?
else D7 B) k/ ~/ p0 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- | I! b9 F% l5 g! R
to_str("in docking station: \"",?.~.name,"\""));
# F" o$ C$ k; H; A& l- n end;3 u. b; @5 q3 R( F6 s
else: Y6 E& N6 H+ \+ Z) D
@.Destination := assignLObj[1,row];
2 P# a4 a( r8 h+ B3 `5 b end; ! P9 i4 h7 _% t6 h' l0 C, s
newDirection(@);; \, B/ P, r6 N! i- e/ t+ g
@.HasOrder := true;
/ F+ o" X5 a" U end;3 t# N9 j% f' [7 @
end;# b2 e- y2 ]3 W R/ n
end; -- of the method
( r1 O% K- B6 K; A! z, e |