/* called by: entrance ctrl of the object 'track'6 R, c7 @9 ?6 K! f+ x& i
*/
2 H% z& v' T+ ]* w% eis
: [$ K# m# b" v5 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 M0 a( T( p9 H) E
do
" b( ]6 p# [6 W r L Lan := rootfolder.Internal.Tools.AOLlanguage;* Z/ L& r. _3 y L8 b
if current = @.Destination -- else return
0 g* h6 |4 w# Z. G7 L- y then* W1 ]$ U2 j( t# q. m! t. d' g+ E
@.Destination := void;
! `) Y, p6 a# ~2 C- K if @.occupied then( ?9 j" p4 z I# d6 U) T3 L
part := @.cont;, X/ H8 g- y0 A Y; O
@.transpOrder := void;( K1 l1 j+ I1 k) I H/ _ z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, L N1 r$ q% o7 d# W; r e/ _3 \
@,root.eventcontroller.simTime);* C7 T2 Y; p( r% _2 _. v" c1 H
@.HasOrder := false;% \" k. ?6 G2 z2 K. f: F
@.DrivingHome := true;9 f; b6 r% W. M* P1 M2 i
rgManager.tryToStartTransOrder;
& G d+ w- ^3 c+ ^# r; i# g s if @.Destination = void
5 A2 _' f; ~. l then -- no transport order for vehicle @# n( T. H, }/ W j* J7 z1 J
@.Destination :=
6 M. N( Y9 W/ C, r1 P( B; U: c rgManager.nearestFreeStation(@,track.~);
' f7 ]- e; l( t8 l, e newDirection(@);
0 H' p2 L# U) C' T/ W i% l if @.Destination /= void then) k7 m: O& {; s" N
@.Destination.NumReservation :=0 d: f* R$ i' ~7 a
@.Destination.NumReservation + 1;
! h+ I; j# z7 j7 D end;' }9 e5 p: z% w/ u7 ?
@.CurrIcon := "drivingHome";
4 M! y/ ^% z; a0 Q9 S8 U9 o @.DrivingHome := true;
. F0 i$ K0 y4 r, c$ z end;
. D' g1 O- ?: E2 I6 h! X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 s$ Q( `: E8 n2 X, V& }3 z part := @.transpOrder;
* l+ C9 D/ J+ `$ J% s4 a6 D part.move(@);-- load part0 L7 c' ?, r2 A! e9 V. I
@.CurrIcon := "load";
5 p4 `+ D2 f( a9 N/ k, C GlobalDistObj := part.globDestination;
4 p& n9 j! K+ ?7 e. P+ p assignLObj := rgmanager.rgAssignL;
( a: k; P* J8 b0 V' P row := assignLObj.getRowNo(GlobalDistObj);
7 L5 w. |! Z+ j/ N4 R" ? if Row = -1 then -- since 70
: `3 x1 a( a+ m1 y, D. e: E if lan=1 then' B9 l! M0 n9 m+ y5 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: r. o& K- [+ |# {/ w7 J. p
to_str("in der Andockstation: \"",?.~.name,"\""));5 I3 D0 A4 q0 L
else8 R+ H. L. L2 e: h" k/ T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 X. m7 K' j' y. ?! w7 S' ~* t u to_str("in docking station: \"",?.~.name,"\"")); / z0 o! L4 U J
end;
, D( l' `; C1 `9 o else% T6 t( v4 ]. x4 W% _
@.Destination := assignLObj[1,row];7 S0 ?1 m' E( ~
end; " ^* f; u) }; ?
newDirection(@);: I! p5 [4 K8 q( D! f% R
@.HasOrder := true;5 p# w1 b- g! e" E2 Q0 w2 J
end; p3 y3 q6 A; P
end;# H4 \8 T* J+ m, s
end; -- of the method" E# a7 c1 b( n! q R
|