/* called by: entrance ctrl of the object 'track'
$ p2 h, q7 V: O X) ~*/
& y* ^+ x9 f' a% bis
/ P9 `$ n; }5 h* N" _( O& Z x part, GlobalDistObj, assignLObj:object;row,Lan:integer;( g/ J" Z- F7 A! f7 R& x
do
3 z- H R! j, G- ]8 e Q7 q" \ Lan := rootfolder.Internal.Tools.AOLlanguage;. v. J; l {$ c: W2 r
if current = @.Destination -- else return
. y7 l' r2 A$ T then
6 b4 T# ?3 ] F( D7 r* ^2 x) @ @.Destination := void;
9 Q8 R7 g0 C, `3 C if @.occupied then9 _+ \7 G$ L6 [, U9 N5 n" T- D# |
part := @.cont;0 w" c6 y# [' k$ o) Y7 U
@.transpOrder := void;4 R* h; @0 E! i A( M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# r$ k7 z B% L- ~9 ~, y
@,root.eventcontroller.simTime);
" V# U& H* I, y/ O+ x8 s7 l: L# ~ @.HasOrder := false;( [* l, g( t" R% q' z8 s
@.DrivingHome := true;% j# W$ S( G, b" N# M$ G7 Z" c
rgManager.tryToStartTransOrder;+ e# e+ M y8 z: {+ E% ^
if @.Destination = void' W2 I0 P6 d X0 Z0 q. G
then -- no transport order for vehicle @4 K! q& k6 P7 q- F$ r/ ~0 Y0 b" q
@.Destination :=
G: z; k$ G/ B7 y rgManager.nearestFreeStation(@,track.~);
' _8 q# L) y6 h- _% Y% z9 e newDirection(@);
* K& j+ M' G: n D# [. `( ~ if @.Destination /= void then5 Y* b0 w5 H; h; `, i( Q: [5 Z$ }/ {2 Z
@.Destination.NumReservation :=; ~5 H6 V, D9 g X
@.Destination.NumReservation + 1;
. g: u" B4 q: e4 Z! W. ?# w end;
`1 i# i' |2 L+ W3 Z* C @.CurrIcon := "drivingHome";
3 K: H# O( p; C2 @" e @.DrivingHome := true;
" o1 ]2 a1 |; ]# y end;# N6 T) [" U4 m9 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, T# u* y5 `5 r% ^2 t4 g
part := @.transpOrder;; O4 Y4 ^6 T/ N7 Z }& d
part.move(@);-- load part% v3 }3 m/ @) f* f
@.CurrIcon := "load";$ h, z. g) c( D. S5 }3 z
GlobalDistObj := part.globDestination;
* ]$ V+ ?8 A6 ?6 I( e assignLObj := rgmanager.rgAssignL;
8 ^8 t( O) d4 x) r8 R9 Z6 C row := assignLObj.getRowNo(GlobalDistObj);: O% n. x" F$ E+ W2 K w1 ?
if Row = -1 then -- since 70
$ y- k0 {3 G+ b) u8 Q if lan=1 then
2 L! c) ]/ S8 j4 S8 a& v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; a/ f4 i2 j5 ^: w# y- w+ j
to_str("in der Andockstation: \"",?.~.name,"\""));# ^5 k. B. \ p E! i+ I6 V6 F
else
* f, Q1 h& I- ~- ]5 r% q9 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; h+ T& M0 R7 p7 B7 J
to_str("in docking station: \"",?.~.name,"\""));
: V9 ?. I! D# R# {/ ]! r end;
7 Q2 B" F6 h' t else0 `( W2 }. Q; H8 g1 y4 L4 e# p: C. H
@.Destination := assignLObj[1,row];
6 ~& _+ f0 i, T9 H- r3 O" ` end;
/ ?/ d+ B( e) y$ r newDirection(@);
( ]( v4 w$ e7 V" x @.HasOrder := true;
3 |1 d1 e; h; z- a- O: V( E end;
6 _4 }- ~! o! M" n3 j+ [; Y- Y end;" H/ v6 B# o- v
end; -- of the method
& z1 \1 h8 l3 u' ` |