/* called by: entrance ctrl of the object 'track'
+ |( f$ i! ?, W7 U5 N/ k*/
l3 Z, }, @/ g/ D) y3 ais
. x6 ^4 H+ [0 b/ z' C* x part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 s4 t. \% N8 J+ a! d
do
D6 A, B4 X$ F4 d# s( Z Lan := rootfolder.Internal.Tools.AOLlanguage;
9 g) ~6 b( ~! i. S' u E if current = @.Destination -- else return
; ^9 j; Y& d: _$ M' H9 I then( L6 F j5 G% x7 N; T" D# P J
@.Destination := void;) b0 J D. k( ]: ~0 G, U
if @.occupied then
# W* M1 _& e* X part := @.cont; `( p: \5 m* y" x; o2 a2 _
@.transpOrder := void;/ z/ T2 I7 S0 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 a( D3 n! M! K, E6 R* F @,root.eventcontroller.simTime);( | E0 @, e! ?/ `, n2 e0 Z# u
@.HasOrder := false;3 |0 u7 f2 c- a, _
@.DrivingHome := true;
; m7 ^9 t7 |; T rgManager.tryToStartTransOrder;
* a2 [( P# C5 ^0 b0 Y: A0 J6 e& s if @.Destination = void/ d3 e: c; T, T5 B6 w
then -- no transport order for vehicle @/ M& Y" _/ n0 {8 U. `/ E7 i
@.Destination :=
0 p) c8 j, f; ?+ G& i; e! U rgManager.nearestFreeStation(@,track.~);
Q, b1 W& X4 X7 |& f newDirection(@); + H( y' h. d( b
if @.Destination /= void then1 |) s: R7 P; l2 m4 z9 E
@.Destination.NumReservation :=+ e, f0 x: ^, d5 {
@.Destination.NumReservation + 1;* s0 h' s# b9 h! m+ Z: q, F
end;, Y$ `5 a1 t/ s; Y; }) a/ M
@.CurrIcon := "drivingHome";
4 h& ^/ D7 x/ y0 V9 F- T' E/ G) G6 R) ] @.DrivingHome := true;
; p: K! B/ z6 w! r# k) V end;- K" Q& t) | b9 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; L( \, m6 u% m6 k0 v7 o& r part := @.transpOrder;( I& H# O6 X. H8 @" \6 [$ H
part.move(@);-- load part0 x* s& p7 X1 u! z* e
@.CurrIcon := "load";( B" y, D, c8 U; ^1 D
GlobalDistObj := part.globDestination;
1 b9 f* H5 q! u2 V assignLObj := rgmanager.rgAssignL;
; e( y- N. R7 T row := assignLObj.getRowNo(GlobalDistObj);
, }: s4 V/ R" I& O- L9 j) a% Q if Row = -1 then -- since 70* {9 R& h9 Y) a% ~' \3 h! h
if lan=1 then- P3 B8 w( o' N# g! r2 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" K7 u+ X( g4 H to_str("in der Andockstation: \"",?.~.name,"\""));
6 k. S: B2 e9 F( @, L else+ K5 Q U4 W7 a" ]: H, u- o" H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# g( A: ]6 E+ e to_str("in docking station: \"",?.~.name,"\"")); 5 N/ O, b. v5 F9 ?* ]4 n! M! o% C
end;: T( g7 _8 Y8 z8 `% O; L( s
else% m* n$ w& U3 A) O( ~: J
@.Destination := assignLObj[1,row];, j" t2 H! p" v" p
end; x( K* {7 v; b* e4 P
newDirection(@);" m- z( c/ i$ y# E; ]
@.HasOrder := true;5 i+ m9 i( m$ o8 Q& C
end;
# l7 F4 n' P$ u4 U8 O( ` end;
0 u( t& Z P' E. S0 _2 |, fend; -- of the method
9 h: Z! L! O8 c) B. s0 g |