/* called by: entrance ctrl of the object 'track'
; d5 t5 q5 N; t" g6 b*/) {( |6 i& ~( n( F4 l G4 {
is% R G: q, b* G7 M2 I6 _" ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" u) h9 T) f- a9 B/ |
do5 ]9 e2 p3 c$ V' a
Lan := rootfolder.Internal.Tools.AOLlanguage;
# s. A3 H& o, ], `, G* O7 b if current = @.Destination -- else return
9 z0 Z' g; G' _+ w/ d5 c5 A then$ |) R( u' g9 r1 g) T! F
@.Destination := void;% K( w/ }9 |/ J( P5 |1 h, I4 [& s
if @.occupied then
- K2 R% z8 {/ P9 |( f& t part := @.cont;
3 }6 S6 L9 G; I4 z8 A( U( E @.transpOrder := void;$ w0 c- I- R% X v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' R+ K5 h, t) c7 i6 k @,root.eventcontroller.simTime);! O8 K. u! V9 b" u C$ i4 S
@.HasOrder := false;5 `$ C3 G6 p# p) i }5 f6 w0 @0 s% [+ r
@.DrivingHome := true; P0 w4 ?5 ` r
rgManager.tryToStartTransOrder;
' R x; b5 R6 E- c if @.Destination = void. D3 X7 Z4 U% f
then -- no transport order for vehicle @
8 y6 K" |3 E% \. U, }3 j1 p @.Destination :=) D( m9 U7 f0 B8 }9 c
rgManager.nearestFreeStation(@,track.~);) d+ [( p! X7 R2 \$ T l4 b% x5 I% ~+ M
newDirection(@);
8 V6 H1 s# Q! s% p' d& p if @.Destination /= void then
( u/ @- O7 [7 w5 v: Q8 q6 n @.Destination.NumReservation :=4 @2 O! M1 ^2 m: `6 H, i
@.Destination.NumReservation + 1;
/ C ~5 T2 X B. o3 }% ] end;
5 B o- Y: o2 I: ` @.CurrIcon := "drivingHome";$ w6 L: c* e. B% f8 W' F' \5 F
@.DrivingHome := true;
% n1 G- w( W' `+ D2 i end;8 r6 ?3 h& I3 R9 s- G' O" W9 e, u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 P% |4 F. I, S/ I4 o: N2 C+ U; l; |
part := @.transpOrder;( F" w$ {6 r$ m* q, Z
part.move(@);-- load part* d0 Y. d- J5 D- t2 I
@.CurrIcon := "load";
6 a. r5 B/ Y) O8 p- Y" W GlobalDistObj := part.globDestination;
5 q B; E2 H4 p; ? O assignLObj := rgmanager.rgAssignL;
" R' x! |5 R6 o: ?6 L6 J) Q row := assignLObj.getRowNo(GlobalDistObj);& }4 C N$ d* _; ?
if Row = -1 then -- since 70
1 z" ~! }3 c1 K" P. P if lan=1 then! D9 G! T/ d. `9 p3 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& [' W% K) C) E) w9 Q* i" P# j to_str("in der Andockstation: \"",?.~.name,"\""));) X5 `( N( ~- K4 M3 y; W, a7 ~* l* E/ S4 B
else4 ^2 `& ?3 W- b. f: t* x& ^$ W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# Y% K) P s1 B8 E9 f( g6 r L9 x
to_str("in docking station: \"",?.~.name,"\"")); . ?: D& i' K0 D: o# K
end;/ \% p9 j* m+ c; r
else
8 n; ?2 r5 s! E1 B0 O+ H* @ @.Destination := assignLObj[1,row];
, t& C! I& w* G2 r1 x" A! x" W( w end;
& q8 h" E: a- {! K newDirection(@);
& b! _; X6 W% y+ _* `4 m$ I9 s @.HasOrder := true;1 r, k- H! U) P% Z4 c/ U. I \2 t
end;; n1 D0 q% a) w: @! F! W- M
end;
/ H( m' f& |3 v. q1 jend; -- of the method
* B8 a! A# n! J* A$ ^4 U |