/* called by: entrance ctrl of the object 'track'- N$ \0 x% m) c& c
*/
. O6 t8 ?9 w* G9 k$ C0 yis
6 t9 n# q' p9 E, S2 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 L, L& @$ f* N6 xdo& d: J8 e6 |) M# h4 h% I
Lan := rootfolder.Internal.Tools.AOLlanguage;- R3 c6 }& i/ D1 u7 h% P+ M
if current = @.Destination -- else return
8 i0 L, R4 y+ O9 d2 b ~ then2 y# A0 w+ N3 ~1 [; }1 Y
@.Destination := void;: f9 n7 @! Y# o( @% ]/ I. ?) |
if @.occupied then& ~4 i j- X7 Z1 ?; F- V
part := @.cont;
/ r5 Y9 N" ?8 k8 S% [ @.transpOrder := void;
& @. E) _) `8 ~ n5 F, a- l$ Y1 }& A0 Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 k, S9 }7 l4 p f @,root.eventcontroller.simTime);
0 Y& o# Z& |& R! a- \ @.HasOrder := false;
" R: \9 z- B8 V+ R l8 W @.DrivingHome := true;
8 _2 M* ]$ ?; N( |) R rgManager.tryToStartTransOrder;- z3 B' Y0 F% W. y9 K0 P, z
if @.Destination = void
2 l) x) k( y6 T, T Q* I then -- no transport order for vehicle @' D9 b& w' ^ ^5 _# M: o
@.Destination :=
2 ]2 r6 ]' }" r# m+ M rgManager.nearestFreeStation(@,track.~);
% Q2 _4 g* P* _ e newDirection(@);
3 i( G' S- u* ~7 D: {* F2 W if @.Destination /= void then* A" \8 h& ~ U# R/ L. d
@.Destination.NumReservation :=! ]- O2 f- G+ J: B x7 i, T
@.Destination.NumReservation + 1;
' U8 X$ l7 c& j0 C; w end;
+ {8 s7 z4 |) R6 C: k: s @.CurrIcon := "drivingHome";
D- e, }/ H- q @.DrivingHome := true;( s3 B0 B: x; f) q* H5 J1 ]1 ~. @0 L
end;7 D7 Y7 B+ p- M) W7 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) N$ q+ A5 U/ G2 H9 y6 I7 K9 \' J
part := @.transpOrder;8 L0 ^7 E3 f) x* {( g
part.move(@);-- load part
6 U5 Z* a5 d) @" { @.CurrIcon := "load";' j0 U' |" C7 `6 A' b3 w
GlobalDistObj := part.globDestination;
) l: E# ]8 J, c assignLObj := rgmanager.rgAssignL;8 W V- Y" U; V" a9 U0 ~
row := assignLObj.getRowNo(GlobalDistObj);, E' ?1 S9 B5 K" `0 H. Z) U
if Row = -1 then -- since 704 V% Y( J" @) ^' H9 u$ |
if lan=1 then7 t# r( u" m# L" f9 t* h0 Q3 n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ H$ [$ K) c; j9 F: x
to_str("in der Andockstation: \"",?.~.name,"\""));
) S/ _4 ?0 S, B6 r else5 J* R7 z) i5 Y4 P3 J. K" q e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 s& ]$ i+ r7 F$ n! \
to_str("in docking station: \"",?.~.name,"\"")); . X, x0 C6 b) G4 `) R% g1 t0 u
end;
( f; }5 u, A2 f; v+ E( Y! t4 j6 E else
% {& @8 ?( }! s9 G7 `. }1 l @.Destination := assignLObj[1,row];% I8 `6 q( b1 F4 K* [
end; 7 S$ d6 _. M6 F) z5 o
newDirection(@);
C0 e4 W6 X8 ?( m# P. b @.HasOrder := true;
& U& c( z0 c/ w; p end;
1 A% v# a" J9 `; V6 _ end;) s9 Z7 m( t( [, ~- a. u
end; -- of the method
4 A8 R. {' B, D$ ?! p, l( ^ |