/* called by: entrance ctrl of the object 'track'
& Z4 N5 m! p: |) {+ m*/
3 J1 i% T. e9 k5 e5 v4 Qis
& q5 @/ z% v3 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& i% F9 R4 t# R1 _6 Z2 @do
& L) e/ j! V2 D* u; q6 t [ Lan := rootfolder.Internal.Tools.AOLlanguage;1 s6 h+ i, x3 k( h, s+ k- x
if current = @.Destination -- else return
, m( N# e6 E4 j then: w* K( F' g7 z2 G% s) M
@.Destination := void;2 h. R3 K/ Z: G4 b# L& R5 S$ W
if @.occupied then
7 d, q! a& f6 n1 q part := @.cont;( e$ q4 `# x7 o! r( B
@.transpOrder := void;7 q: z& x! W5 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& a7 G. Y. T( b7 D @,root.eventcontroller.simTime);) o# ^0 W" W+ X! Z# G3 u; e6 Q, W0 d
@.HasOrder := false;; r A. _+ J j) Z
@.DrivingHome := true;
1 E1 |$ F) n! ?1 s" ? rgManager.tryToStartTransOrder;
/ }, x4 E' b6 L if @.Destination = void, y# K; ~- ~' s3 N( d
then -- no transport order for vehicle @) }/ i2 Q1 w. u9 G
@.Destination :=9 D* t4 ^" n* g
rgManager.nearestFreeStation(@,track.~);- P- @/ R) K# D6 d$ \& c" `& [' H
newDirection(@);
/ v# H O8 m7 E# H if @.Destination /= void then
/ o; l6 J; d, e* p @.Destination.NumReservation :=
! B8 |7 p9 a! A" X- q' z @.Destination.NumReservation + 1;7 I4 \: K/ b" C9 G, }2 f) j( I3 x3 j3 T
end;
8 f. J7 C) P, w6 ` @.CurrIcon := "drivingHome";! f4 L" x% S/ B' Y' j3 S
@.DrivingHome := true;
! G7 x. W) T; b7 N8 x end;
; o0 w/ K, V4 ?. o else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 C% m4 h: a( ~: W6 x; K; `
part := @.transpOrder;% z0 I, ~$ h7 Z1 W
part.move(@);-- load part
7 G9 H1 a7 f7 y4 r2 c' N @.CurrIcon := "load";' B j1 L( h7 \
GlobalDistObj := part.globDestination;
" Z. m ~$ N: } p assignLObj := rgmanager.rgAssignL;
- I( d% {/ O/ | row := assignLObj.getRowNo(GlobalDistObj);- O' {) ^( k: Z
if Row = -1 then -- since 70; g: p* k# I% K
if lan=1 then% b! |3 I+ d$ r9 b. U N3 l3 R; U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 Z* W, R- g8 }, b6 b
to_str("in der Andockstation: \"",?.~.name,"\""));
# X6 \* E$ S3 g2 c3 q" i else
d0 ]! e! v$ Z2 J9 P) A/ K+ O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ @9 R5 M/ A1 ~
to_str("in docking station: \"",?.~.name,"\"")); - H+ s/ f0 Q1 i1 P+ T- m
end;8 F: x2 H% f O x
else- c! a- g+ ?( K; J1 `7 ^
@.Destination := assignLObj[1,row];
; e7 U9 ~: D; N# o) d2 p/ n end;
( q& G: c$ G4 Q$ U newDirection(@);
2 }$ y* ?4 r- A/ F+ }: N/ { @.HasOrder := true;* n# H3 [- [+ M) x# ]
end;
. T: L! c4 |0 W7 G! i0 O; N; G end;
7 W1 w8 v: U' `* j& [end; -- of the method; ~# V3 P5 U8 a7 Z0 T
|