/* called by: entrance ctrl of the object 'track'
p; P, Z2 b: k- D9 l1 N*/
# z, u: y: E3 J; h2 n' f; K& Ris
6 u P) R$ v1 K0 N* u# t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 V7 i1 Q3 X7 J* Cdo
: B3 N7 m! R L+ B- @5 M8 L; I Lan := rootfolder.Internal.Tools.AOLlanguage;
( l$ K9 s, b3 n( q1 C6 R+ q if current = @.Destination -- else return
5 Z+ H7 F8 b- d9 }) K% o: G then
m6 r8 q- @# B) g6 ~% i. X @.Destination := void;
/ L( D* B; B: v5 V- ] if @.occupied then
: K5 C$ |# D Q" P part := @.cont; S) L7 j" U6 J6 u3 d$ [( ]+ D
@.transpOrder := void;
9 T. m/ h, H) R3 ~+ o! c* k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 k+ v5 v; c( F @,root.eventcontroller.simTime);
) b& Y4 b8 E/ E4 K) W @.HasOrder := false;8 l$ x3 \8 j9 |, ^ a* R) q
@.DrivingHome := true;
( l0 B [& S: V/ p1 _ rgManager.tryToStartTransOrder;
; t/ J4 Z# E7 h4 x1 F% K if @.Destination = void0 B, I m% g- W' g
then -- no transport order for vehicle @0 d8 c& g: q3 y+ I6 Z d7 l7 W
@.Destination :=
# ~. M* c% [; y" K/ w" Z4 r$ A rgManager.nearestFreeStation(@,track.~);
# {" ~" ^* x9 C. z8 x newDirection(@); * A1 W, N" H6 t9 z) w& w
if @.Destination /= void then
+ w% Z* p% I8 a7 ^2 h" V( X @.Destination.NumReservation :=5 b1 H5 {% ^9 h- t/ r2 P3 N/ X
@.Destination.NumReservation + 1;
* g- N! a! U9 e/ A" D end;
; T; b& j7 ^; d9 V+ e" X8 o9 B @.CurrIcon := "drivingHome";
2 W2 R0 T% k2 |9 m: U+ o3 y* _6 X @.DrivingHome := true;
9 M2 q+ J' t9 e; m end;
9 A$ t0 ?( x) D8 U9 u else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ Y$ U" q/ z* @6 e* O, v
part := @.transpOrder;
! l. r: Q" e. m2 R% ^, U part.move(@);-- load part" T8 S. g6 W/ {: u }
@.CurrIcon := "load";
1 R; [- Q$ p! |: j# g; H GlobalDistObj := part.globDestination;4 U P& x ?* a0 f3 }) t& a/ b4 L
assignLObj := rgmanager.rgAssignL;
( p; r. t, M& D9 K" J, D& s7 R row := assignLObj.getRowNo(GlobalDistObj);# X9 ~, h1 x6 T" g. g/ n1 g
if Row = -1 then -- since 70
& W0 |2 ~* ?4 ?0 }3 l if lan=1 then9 T' q2 F: o5 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: I+ e3 H0 `& y/ F
to_str("in der Andockstation: \"",?.~.name,"\""));
: b# P! X* S( u( `+ q' j! T else
7 e+ E' b, j1 n" w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- r- W s8 k: |* V( R2 @8 ? to_str("in docking station: \"",?.~.name,"\""));
* w. ^; ^! s5 `% i/ j+ r. c end;
0 d0 g6 h8 o0 G. G; R else
% X* d. |' h8 J$ I$ u! H. z- a @.Destination := assignLObj[1,row];+ T, J M) ?, ?
end;
8 Y- W+ m1 i" } newDirection(@);
( \8 d! t5 M' T @.HasOrder := true;( a. a8 r! R6 w" c" b6 f' W
end;/ M- p5 e/ L: T; M! o
end;# R1 k3 u9 }; c
end; -- of the method
( e: U0 X. C j6 a/ S |