/* called by: entrance ctrl of the object 'track'+ S" i. B4 j3 {5 f1 Z
*/, A, F8 f: U* p: O- L
is
: N' F" O# g+ J1 @7 Q1 e! a part, GlobalDistObj, assignLObj:object;row,Lan:integer;# [& t% V3 ~# @) D
do
5 @; B3 U4 @+ ^- _. H" j Lan := rootfolder.Internal.Tools.AOLlanguage;
; Z( S! o* X6 S4 H+ D7 d3 p if current = @.Destination -- else return! D$ P* B. o' N
then& ~9 x( `5 N: t5 K: b( I+ o h
@.Destination := void;# f: B6 a9 b0 w; J+ ?. U5 Q
if @.occupied then
+ |, A+ \; N L: W* m: h4 J! s4 c part := @.cont;
" @" o; I6 \4 @0 w @.transpOrder := void;& E k! a; z1 H1 C+ J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ R0 V8 z6 N! Z( z, \. ] @,root.eventcontroller.simTime);" Z- `2 I. ~1 v. U* g0 x
@.HasOrder := false;
' P$ W9 a/ e! s: q! S @.DrivingHome := true;
7 L* o5 V: k$ U1 Q rgManager.tryToStartTransOrder;7 P2 S" P6 {* e, B+ S) H* r
if @.Destination = void7 S0 v- l& V# F1 }1 y' }
then -- no transport order for vehicle @! R) `2 q, w$ w
@.Destination :=0 J/ N) j% C( |1 L( X2 P5 A b
rgManager.nearestFreeStation(@,track.~);& P: W( G* r2 ?; U& Q
newDirection(@); ; g# ^) m2 T0 ]) T
if @.Destination /= void then* ~2 M* z0 s5 j7 r( S; ]
@.Destination.NumReservation :=
$ H% Y, r: f' ~/ L4 O @.Destination.NumReservation + 1;( K4 ^ Y% n& {& f
end;
9 b# V7 D+ b: m2 n @.CurrIcon := "drivingHome";/ A$ P' C, D, d% T( r8 f$ V8 |
@.DrivingHome := true;9 u0 U$ W3 Y: ?& Q2 s5 k3 |! C7 N' h% ~
end;
' [; G, A- \: t0 i3 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 L5 M3 d" N4 }/ [ part := @.transpOrder;$ O" W3 j7 i( a8 G! g
part.move(@);-- load part
: `8 ~1 { B8 O0 g& R. P% T9 m& A @.CurrIcon := "load";6 J, O% ^% }8 U3 C
GlobalDistObj := part.globDestination;
% H! d3 [- w7 q4 g assignLObj := rgmanager.rgAssignL;( |8 t1 X/ ?; {7 R! y3 x$ ?
row := assignLObj.getRowNo(GlobalDistObj);
8 ^" Z) B; |6 O9 p if Row = -1 then -- since 70; _! N/ w m8 V# J2 j* u
if lan=1 then
1 O7 y( m$ \. |' G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! d5 t* r# F3 u8 ^6 y4 i: W to_str("in der Andockstation: \"",?.~.name,"\""));
4 k) B6 O# y' W3 `5 D else$ z- ^( n% e m+ l; q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* F2 J+ e F7 D _3 J+ K to_str("in docking station: \"",?.~.name,"\"")); 8 G' O. n, G0 b2 m) c% v
end;
8 j+ S" \5 W, Z$ z( s3 Y else! T; g! I9 V) f& ~' K; g
@.Destination := assignLObj[1,row]; R5 z0 c( c8 ~9 M1 z
end; / x3 n9 D. J* b: H
newDirection(@);
( h, z. {9 V/ P7 \5 E. U @.HasOrder := true;7 V& \, |& t5 C
end;2 x- r; X w% L! Q* C, \! [
end;/ Y) @$ G& h* d/ Q" |. Z& _# r
end; -- of the method
" j+ k4 N" L1 U' @5 G& k/ Z j |