/* called by: entrance ctrl of the object 'track'- q/ C2 W. b) f- G4 }: q
*/
# |$ A, [4 |- `) Z3 }is
2 H% O6 y8 [) W+ D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, b& M4 V `' N% |" Edo
3 u& y$ G' {' ]* o4 E: p Lan := rootfolder.Internal.Tools.AOLlanguage;! c: k( t3 y0 L, M
if current = @.Destination -- else return
" Q# ?) ]& V2 z% h6 P then, M9 N& r$ P$ T+ E' k, @ p
@.Destination := void;
; R, A9 a q8 b& ]4 N& o# ] if @.occupied then% r! m, \% I7 j3 E/ F: N
part := @.cont;6 U$ o) U% A: Y$ B/ f
@.transpOrder := void;, u# h- c+ Z+ U1 r% I0 T: s4 T, T2 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: ^1 c9 g2 R" F
@,root.eventcontroller.simTime);- P( K- q3 y1 B6 s- X. ]# m& L
@.HasOrder := false;, D2 [) n+ A! R5 l# j* O& F0 Y/ P
@.DrivingHome := true;& n& B1 }6 e4 x0 O
rgManager.tryToStartTransOrder;
7 k. n. Z% ^) ]( { if @.Destination = void* P' b/ V3 d- ~. I* C# e: _/ ?& J; v( `
then -- no transport order for vehicle @0 }5 p; N+ }; |- t M8 a
@.Destination :=
% H. D! I7 x: { M) ^ rgManager.nearestFreeStation(@,track.~);) k/ g" [( O- Q4 K* Q* R0 ?
newDirection(@); - N) i% r- P, X8 C5 P
if @.Destination /= void then' A7 A1 w4 c" }0 G& L; Q& F. f
@.Destination.NumReservation :=$ n i5 U5 r& Q4 B: ?# y A, M
@.Destination.NumReservation + 1;
" J$ x6 I4 N' @5 i, W end;
; Z4 m# a2 P9 T5 P9 D+ n/ y @.CurrIcon := "drivingHome";
0 r7 B: t+ I) I" a! M. v. B1 N @.DrivingHome := true;. k7 w$ @0 t! o# I) J4 \
end;1 W9 b" Z( l* C$ G; Z! R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. r5 N- q/ k o7 U9 | N. E
part := @.transpOrder;
2 i! L, d) k! I5 {. \5 | part.move(@);-- load part& A7 Y- u7 A. @( ]5 [. o8 c# {7 H
@.CurrIcon := "load";" ? V- j$ y$ ?! S' o2 l
GlobalDistObj := part.globDestination;4 {2 s. I, B5 g+ ?
assignLObj := rgmanager.rgAssignL;) b) y" Q2 Q; ]* k% Q" d$ j! z7 F
row := assignLObj.getRowNo(GlobalDistObj);
, o0 D) C ~0 x t) e* s if Row = -1 then -- since 70
' P, l/ W3 |" B# O if lan=1 then
1 [/ \2 |. [6 }- q1 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* ]! m- L% m- t4 S& H- f$ A8 M
to_str("in der Andockstation: \"",?.~.name,"\""));5 ^: q1 [% [4 `5 H M7 g
else
; r; e: ^- ^. g; x7 f; O( d) x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), Q# t q# i j6 d
to_str("in docking station: \"",?.~.name,"\""));
; d H* r2 S+ P& ? end;
8 N. @( n( K6 ?0 b% ^/ B else5 K2 z. f) a! f0 N, U" }5 x
@.Destination := assignLObj[1,row];
) r2 T+ [+ k# k. e end;
4 \+ p- R2 G) y! |! Z; K newDirection(@);+ r) s! b% A' ] G, z G+ }1 t
@.HasOrder := true;
: {2 U1 W; n; X; f+ m end;9 U# L/ t: [0 v# \9 R% }
end;
" R8 J% x# s+ ^; C& ? o; Hend; -- of the method% I7 m+ X6 _6 ~
|