/* called by: entrance ctrl of the object 'track': N% f6 a/ x, D3 ]1 W2 V
*/
/ ]1 }# V- r; v$ X5 S" mis
4 x+ v) L7 ]6 @+ Q( _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 u+ W- y5 M7 C. ?$ K( j( q1 S0 T) X
do
- w: p: V- \+ y, d Lan := rootfolder.Internal.Tools.AOLlanguage;- [/ a% k/ I6 ^; h Q0 ~! L
if current = @.Destination -- else return& d# T3 U7 M& l4 M( Y3 G& c
then7 y, S- ~0 Y. s1 O# a
@.Destination := void;5 d" d' H1 p$ I. a7 L& D
if @.occupied then; S7 F, A7 Q% l! x
part := @.cont;
. b3 o" ~" \! X G @.transpOrder := void;
( P7 ?: ~% h/ T! f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; V( h7 t; N1 K0 x9 Y* [ @,root.eventcontroller.simTime);. E8 E$ Q5 S, `( V3 [+ ]7 L- t0 p
@.HasOrder := false;- A- y5 k6 V. q
@.DrivingHome := true;/ Q5 W4 y. {/ n& Q$ A) d/ \" g2 c
rgManager.tryToStartTransOrder;* S' K" C" x1 {+ Y* ?
if @.Destination = void5 D" g$ a1 D% H
then -- no transport order for vehicle @5 S- y* v2 W/ z5 c. t
@.Destination :=
1 O f; J% {' d6 P% Y: s6 G% E rgManager.nearestFreeStation(@,track.~);
4 }/ Z2 G$ p! c- F0 C- j newDirection(@);
# u& t. {; ~# P$ N if @.Destination /= void then; @. b( b6 q' p, r: [" B1 Q k
@.Destination.NumReservation :=
# q: X5 v( G4 R/ F- q @.Destination.NumReservation + 1;
+ Y4 q' v+ R' l( z* Q end;( A5 M" t4 w! h) l$ }; G9 c
@.CurrIcon := "drivingHome";
: p9 w* g% _/ V3 r @.DrivingHome := true;
. c# v( Z: Q- c0 S F end;
: ]9 J1 n( `8 L/ t9 |/ e, t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 N' i" K1 o3 ^! c2 r8 ^ part := @.transpOrder; V0 ^+ j% d, u/ \; ?% q
part.move(@);-- load part
Z9 D5 d' B' p, y% |+ @# Z, h2 L! H' p @.CurrIcon := "load";( Q7 y4 O" A0 \3 W( K% W
GlobalDistObj := part.globDestination;1 A1 }# s+ R9 N& B
assignLObj := rgmanager.rgAssignL;
! t! v, `4 V) f6 W( ]; p row := assignLObj.getRowNo(GlobalDistObj);
( n$ \5 H; P& P' w' v: J; H5 g! u if Row = -1 then -- since 70
, A7 E4 }# e4 X9 G) Q: d if lan=1 then
5 \' r/ ^# W- X, b/ g: d \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ u! a: S3 d" { to_str("in der Andockstation: \"",?.~.name,"\""));8 i0 q& t! R2 _8 p/ C
else
8 m$ m, l: u9 Z) g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, h: D @. o+ ]: a4 O8 v) d+ U to_str("in docking station: \"",?.~.name,"\"")); & e* h/ l7 J5 B1 y' X$ U
end;
" x3 u9 f% V3 M. a% ?6 q4 K8 C else* h+ j& ^ W( O8 a0 b
@.Destination := assignLObj[1,row];' w* Z; i1 N0 Z; f. M" W, v
end; ( L: ]' E9 B1 t1 W
newDirection(@);0 U% x0 t+ n$ [4 A
@.HasOrder := true;4 [1 ?/ q3 V: I5 |) V9 q8 Q
end;
0 }1 |& H. S+ p9 @7 D# D/ a8 | end;
2 [/ |& c4 M- y' O4 @end; -- of the method2 S9 h. K7 T$ C3 d3 J" a
|