/* called by: entrance ctrl of the object 'track'# G% y7 c- F* C, A
*/
8 R: K9 w. ~1 l/ X+ W' g0 pis
8 g. ~ O& f: u, E! U/ \* Q f' x part, GlobalDistObj, assignLObj:object;row,Lan:integer;- g. {/ g, P9 [* [- o
do: Z6 u# k/ ^2 K/ z
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 E$ W& k" O. x8 x1 U if current = @.Destination -- else return: E; _- K t' h2 _, x
then1 _ E9 d6 w! j; |. y
@.Destination := void;
+ T$ Q1 h* x7 X- Q T if @.occupied then
! v; Q5 c( g0 H( z part := @.cont;- a# Y+ p. t8 ~. e$ b5 C( U; P
@.transpOrder := void;
* F1 t+ d2 ^& T% i7 _3 I! J# C U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 j+ ?$ U- G$ l) P) z
@,root.eventcontroller.simTime);8 i8 }7 w' L @' q' m2 L
@.HasOrder := false;3 f+ p9 ]- C, W
@.DrivingHome := true;
5 P' C. M' \+ {* ]1 o Y' @ rgManager.tryToStartTransOrder;' O( u, s3 b/ P( b; @2 V
if @.Destination = void2 J- P9 n' I" i/ ?1 a6 N
then -- no transport order for vehicle @9 G+ h" c9 I% }) x
@.Destination :=
' K* Y3 ~" [3 l4 K2 t/ m8 M9 m rgManager.nearestFreeStation(@,track.~);" Q2 D" ^4 y% v1 L! M; p* ~
newDirection(@);
3 ~! R/ Y) f9 {3 g, Y+ I% y o* J if @.Destination /= void then M9 c) G( E7 J' ?
@.Destination.NumReservation :=
6 E* n* {1 u2 Z# W% e; { @.Destination.NumReservation + 1;
! h9 L& C* R! z2 W) z4 q3 a end;
. s; A6 ^0 H9 S( }% b+ S @.CurrIcon := "drivingHome";
$ s9 ~8 ?2 l7 C6 i8 { @.DrivingHome := true;3 L$ t9 `. Z$ c& }& y: l
end;
# D+ x$ X$ _8 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station: A) _+ O2 e$ U
part := @.transpOrder;1 S" q* O2 N1 `
part.move(@);-- load part0 m/ f( H% {$ c; k
@.CurrIcon := "load";
h# q) I' R, ~ GlobalDistObj := part.globDestination;* R" ]! y' e; k4 q5 V
assignLObj := rgmanager.rgAssignL;" \( s$ W) F% i j, K
row := assignLObj.getRowNo(GlobalDistObj);
4 h$ y% b- _1 v7 h2 D# R if Row = -1 then -- since 70
$ d* M. w9 `. d( z4 @ if lan=1 then I) W" [) _2 O- ]) [9 K* ^: s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. F% S& R$ y4 s9 `( w
to_str("in der Andockstation: \"",?.~.name,"\""));) J2 ]+ C6 T% i
else) X! a/ N5 f' c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), v% O ]4 R4 w8 D# R% f% Z% w
to_str("in docking station: \"",?.~.name,"\""));
' r# H7 `# K! z* ]0 K$ V: [$ {& ~. x end;
5 j* S0 Z B3 c% [ |4 j% G9 d else( F a3 c3 K1 h- @9 v
@.Destination := assignLObj[1,row];
. p3 T+ R U9 m( J6 s end; 5 x! I" J6 u3 C- F; _& |# s% Y
newDirection(@);. h1 a/ t" @! R$ {9 A& h2 D! _- Z
@.HasOrder := true;) ^+ ~9 T; C. J0 N
end;
& h$ O$ a# P0 m5 E end;
S' D$ t4 M! H, Wend; -- of the method' ?( I, B4 q: m2 h+ {
|