/* called by: entrance ctrl of the object 'track'
. G9 ^; @ a' l, Z5 A. u X*/: R' B2 ^! \/ E Q! L
is
7 D: ^+ I8 k: _& D* L/ C/ r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ T4 c7 m6 N3 A4 |5 Z8 U0 t7 m2 qdo
[9 O1 O) \0 k3 V Lan := rootfolder.Internal.Tools.AOLlanguage;0 w8 y6 O, K: ?/ }3 j
if current = @.Destination -- else return
5 ^ O8 f7 g8 {0 q- F0 \ then V: E/ J- X! m. c
@.Destination := void;6 W3 C, L/ B9 |" V! k# C' W. {1 d
if @.occupied then
7 H& t b+ |7 P! ~7 k- m9 z part := @.cont;& q/ ]; d. o( B% P9 m
@.transpOrder := void;* t: t( H X2 c6 f1 r5 j3 Z7 i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* n7 K G( S0 o& @9 N
@,root.eventcontroller.simTime);
n* o4 q6 k( o8 G. c( i' o @.HasOrder := false;
5 E4 G* Z* I& r ]2 ^ @.DrivingHome := true;- I2 ?% I! @, w- e# M
rgManager.tryToStartTransOrder;- q+ u! `- x! h( i7 i c: z
if @.Destination = void6 p- h% w: U/ i' P3 V. m
then -- no transport order for vehicle @4 i( ?, s; u' ^/ n+ i
@.Destination :=
( K' L' o( O; M rgManager.nearestFreeStation(@,track.~);, p! `4 P; Y9 Y' I4 L3 O
newDirection(@);
6 W' I7 X* E3 s6 w5 O* \, O if @.Destination /= void then7 F6 p* Q( ]4 ~7 o1 j
@.Destination.NumReservation :=
4 z' y9 p+ K6 q, g @.Destination.NumReservation + 1;
2 y+ y' c0 c* Q0 C end;) ]& R5 K7 m! M2 C' Z
@.CurrIcon := "drivingHome";
' ~$ v% e! _% T+ m4 T, u @.DrivingHome := true;
9 P, C6 R6 w: ? end;4 ]( I" V1 U. j6 e. `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 H9 V5 M( G4 C! Z6 i
part := @.transpOrder;( C- y+ ?: ^$ B* O6 X# P# h% |
part.move(@);-- load part
" D" J2 L6 w0 |& W @.CurrIcon := "load";
* w2 d8 Z3 C7 Y; n GlobalDistObj := part.globDestination;
" p) _; a9 y/ _" f5 f2 p assignLObj := rgmanager.rgAssignL;
; u( i: p7 |3 v% e2 j9 ?, Y8 Y7 E row := assignLObj.getRowNo(GlobalDistObj);/ V" D- K% O2 U. u: g" ^6 e5 D: w
if Row = -1 then -- since 70
b% S7 |( B! Z! W0 e if lan=1 then
* D& J) r% J( B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ _, {' j: Z* X# [) E& E to_str("in der Andockstation: \"",?.~.name,"\""));( J. u6 T" H- i2 U, Z( {
else2 e4 Y9 g$ m+ A5 Q3 J6 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& }: V! z1 Q8 h3 ] to_str("in docking station: \"",?.~.name,"\""));
( t- J$ v" C% A: K end;
, y! a( c: r" O" [" K5 U: F, c# X else
. ?3 N% p+ S$ N1 h2 P @.Destination := assignLObj[1,row];+ U1 S$ \( n3 r8 d, n" [
end;
' f( X) S$ q: B7 P. a _/ z) B" T newDirection(@);
& B2 M' S, {8 G9 V6 x @.HasOrder := true;
9 @5 ^$ i' I" t) V( R t end;: B+ Y* l( g: \+ C: j& J% \2 L' Z
end;* E" {& N: R* Q1 Y' u
end; -- of the method
/ G* [% m; O# c8 u/ k! @ |