/* called by: entrance ctrl of the object 'track'
- ^6 K6 B9 x: v# y*/
+ I, K; E( E; w! I5 R4 {is Y8 X0 a$ D' W( a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 b4 w6 b/ J" {# v0 j7 l1 ndo: T& S3 F& u( B! k+ P: R8 _
Lan := rootfolder.Internal.Tools.AOLlanguage;
* q5 F% a# U3 Z if current = @.Destination -- else return1 V. C/ L) l$ {. ~3 `( p1 g, J* U1 \
then
& ^7 t! g! S$ Z. u7 `& x @.Destination := void;! r# w% ^/ o5 b3 x- P( N, E+ F
if @.occupied then
6 ~% g! W) R: f( { part := @.cont;
- ?* f1 i" A4 V @.transpOrder := void;
+ C- ^, \7 n2 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Y' s; |- R* J) o% q
@,root.eventcontroller.simTime);
3 e, `) M. r( f @.HasOrder := false;
6 Y. T( L8 X6 u5 r3 ^6 H4 J @.DrivingHome := true;
3 I) [. f( H. p* l rgManager.tryToStartTransOrder;# ^' o" S( y" n5 z& C% d6 r
if @.Destination = void
M4 u( x& X2 `: \3 k: T0 { then -- no transport order for vehicle @
# a. T0 u5 z% k9 R4 _( h( \1 E9 L* J @.Destination :=
1 t. \" \6 g1 T7 J k& E( D* ~ rgManager.nearestFreeStation(@,track.~);4 I/ K6 ~- K) J$ E8 O
newDirection(@);
3 D) n, A2 a( k if @.Destination /= void then
: h |5 G4 w% L" X6 i) r @.Destination.NumReservation :=9 Y8 H8 y [8 M: ]9 I
@.Destination.NumReservation + 1;
% f7 t1 u, P) H( b# k! K end;
9 ?& q) H6 x1 c8 h" R; X @.CurrIcon := "drivingHome";# H$ z. x# x/ ?
@.DrivingHome := true;
2 V8 l; M& q" B( `! h end;
& z% d0 p& S8 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 F* d+ i' |5 n8 D+ A/ \. Z/ D- F y3 s part := @.transpOrder;1 S# a6 O& y5 F
part.move(@);-- load part
5 Z( J" Y% ?$ D3 Z @.CurrIcon := "load";
2 B/ \ V; e% L GlobalDistObj := part.globDestination;
# P) n8 W5 r; j assignLObj := rgmanager.rgAssignL;
$ G4 L) U5 X" E- U row := assignLObj.getRowNo(GlobalDistObj);
9 O* z' y6 o3 Q2 \1 ^" N/ N if Row = -1 then -- since 705 N5 ]( a% J' M5 ?
if lan=1 then
- L. c! Y8 f1 F" d6 x4 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& j( p3 o/ r. d! Y to_str("in der Andockstation: \"",?.~.name,"\""));
5 O2 u% g; t6 f8 N* I$ I4 P else
; @" q, [$ o5 Z5 \& z% `4 @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" V8 p' D: X+ G/ d4 k1 l# C4 x to_str("in docking station: \"",?.~.name,"\"")); 2 g8 H5 ^6 V6 o( @; |" h) [
end;/ {# |5 Z) y% T# J; ~
else0 U$ e. {. r6 X0 _% J* x
@.Destination := assignLObj[1,row];
9 C4 ~: x9 k$ H/ T# E v, I- {, K# f end; . A7 O+ l) U2 r4 ~. L: i
newDirection(@);6 \0 r2 j+ \8 z! f5 s. s
@.HasOrder := true;
% o! e q& i. C" J$ }; o4 [3 }1 b. g end;* I6 g! ]7 A) m# T
end;
$ L' p. j0 n" s9 R8 c1 |7 zend; -- of the method
1 H/ ]0 S3 I# \4 s7 t. | |