/* called by: entrance ctrl of the object 'track'
. K; e* m2 ~. Q9 |8 n* h' \8 {*/2 l: b1 |% s9 {/ a
is' o; _/ y: c0 v4 k+ V' ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! o, s( E2 z: T( y
do7 N7 [8 A. m9 g, U/ `: Y7 ^, q
Lan := rootfolder.Internal.Tools.AOLlanguage;% r. d4 |" L# u3 p7 R5 v) e& t3 E% A
if current = @.Destination -- else return9 l5 `5 H/ S3 u# Z; ~
then% G3 Z) J( Z( L2 A$ b
@.Destination := void;
7 p3 u# m0 H$ l if @.occupied then
* Q* \$ {6 Q# t9 Y3 N, H2 Y part := @.cont;
- Z! q6 B' m/ u @.transpOrder := void;2 F+ P' a' H/ o6 Y2 `" q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 _8 `, |$ p0 p
@,root.eventcontroller.simTime);3 C! q6 C2 | W! `) s- }
@.HasOrder := false;# q1 `1 z- `: p! g" J% f! K
@.DrivingHome := true;2 f `/ b/ q# H, d
rgManager.tryToStartTransOrder;
' K/ g8 T& j" e$ f9 l if @.Destination = void' N/ }# X& b7 v7 c# p
then -- no transport order for vehicle @
4 I( U8 S# ~3 C @.Destination :=
; f3 ]6 H: b/ z: { rgManager.nearestFreeStation(@,track.~);
4 ]( ~$ M' O9 W) h' A8 z& X newDirection(@); ! E l9 t. k/ f7 g* W* x B
if @.Destination /= void then
" D/ E I; R, F @.Destination.NumReservation :=' B3 ~4 E% ~% Z
@.Destination.NumReservation + 1;7 S. X1 @0 u8 i; s/ K3 z" M
end;
& S, ?( U: r, M8 }* `: F1 ?& a @.CurrIcon := "drivingHome";8 G& P! {& Q6 }- C
@.DrivingHome := true;
7 B9 w6 C0 c3 a' K4 z3 Q% o) K end;4 }$ ^4 N+ ]9 `+ T; h6 m* R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 _* O- u6 S7 V/ w, _ A2 Y part := @.transpOrder; ]4 P# F! V3 {% q
part.move(@);-- load part
! L& @; F$ Z e, r @.CurrIcon := "load";, K5 r- V3 d& {/ z9 `
GlobalDistObj := part.globDestination;
% J9 y. s& k( N assignLObj := rgmanager.rgAssignL;
' L3 n! a ]& `1 ]9 E* C row := assignLObj.getRowNo(GlobalDistObj);" y: w0 m4 |/ o% h7 L; U: c
if Row = -1 then -- since 70
* K5 Z) c- N4 B4 l# Q4 V* m if lan=1 then
6 G6 w ^2 D/ e& F: L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 M1 X n4 o5 d% ?" n K! P. f to_str("in der Andockstation: \"",?.~.name,"\""));
2 p4 w' t) f. s5 v else
5 `5 T; x6 ]/ m _$ V* I) n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: O$ y+ S0 l6 z1 T
to_str("in docking station: \"",?.~.name,"\""));
- q/ O( M+ ~& n+ j0 _* P6 Y end;: z# o' |$ M! Q+ P
else: O5 b W+ m S% o
@.Destination := assignLObj[1,row];5 A5 R" a' C1 Y0 n# J! K
end;
$ F# H$ |" g' O3 C4 j newDirection(@);; k% i# w" h' Y+ S4 l8 s" b
@.HasOrder := true;" a- z0 H2 P8 b+ D9 ^( H+ L# h& J4 d
end;5 ?; B1 B! o+ ` n. e3 }( N+ P
end;: J* B0 ?6 }/ ]! j
end; -- of the method
7 _( `4 V! `: G9 G |