/* called by: entrance ctrl of the object 'track'
+ y# h8 Z0 o/ Q8 A+ u/ I4 g*/
+ t) B& g/ O2 Z+ I1 Vis* J. Z0 ?2 l) Y, [) J4 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ~, E9 x2 A c' z4 h3 s+ `do
- Q) v/ Z" _7 L: M5 ?9 z Lan := rootfolder.Internal.Tools.AOLlanguage;+ i2 Z. A- h! F2 F0 Z0 {/ a- Q b* s
if current = @.Destination -- else return0 `' M% B: Y, t3 U) W! l; l
then9 q- i) \% _8 n, z g
@.Destination := void;
/ E4 q* F5 c: k$ J2 v if @.occupied then
5 D% |# Q0 ^8 ] n/ O( W/ q9 c2 E part := @.cont;. `# N) x0 w5 Y+ w& \& R
@.transpOrder := void;
8 |/ b: W7 C } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ Y+ V3 n5 E; e/ _: h8 _ @,root.eventcontroller.simTime);5 H; g' H( g# Z) ~* F% d
@.HasOrder := false;8 n7 S' j$ N5 {- O
@.DrivingHome := true;: t( o# S! i% V
rgManager.tryToStartTransOrder;
" ]& u5 i- ?: \+ `1 } if @.Destination = void
2 D6 Z: W) N1 @ P then -- no transport order for vehicle @
: @% b( m5 e* \; H) g h @.Destination :=7 v) ?; X2 }* j; H! @
rgManager.nearestFreeStation(@,track.~);8 M. q3 U' _0 F3 ]
newDirection(@);
% c, E) b! @+ p9 G/ V if @.Destination /= void then) ?$ C3 G1 S( W; D) s l
@.Destination.NumReservation :=
" c0 }) j! G( x- [' I1 t) O @.Destination.NumReservation + 1;# A9 U6 e2 A& H9 g5 S
end;2 x( V: d% }" |$ k
@.CurrIcon := "drivingHome";# h" c; T3 E! ?- R
@.DrivingHome := true;5 x2 O- o* v' B) X
end;" ~. K: K( `) L; U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 k/ @. v3 V" a9 o
part := @.transpOrder;
|6 N# \5 M& w% U. n$ J part.move(@);-- load part) |: Z* Q8 w9 ~: W
@.CurrIcon := "load";+ U r% a! A: l, X: ]# R
GlobalDistObj := part.globDestination;
* f# @5 D* ?6 O8 {! H" [ assignLObj := rgmanager.rgAssignL;6 E! q' d* n G8 } T) `
row := assignLObj.getRowNo(GlobalDistObj);5 O! I& D( _8 P$ j5 c6 C
if Row = -1 then -- since 70) U+ W7 c; f8 O
if lan=1 then
% k2 _" |+ O7 @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 k/ x9 B' o* Y( o
to_str("in der Andockstation: \"",?.~.name,"\""));
1 ^; f. O" d- r. Z1 Z else
7 y2 f! ^+ }" c. C0 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( W* O- H! m# y h/ _" [- T7 j& d to_str("in docking station: \"",?.~.name,"\"")); 1 J3 ` s& l* s, w1 w# b2 r
end;
; U# n' Q: ^2 g6 d: B+ H8 Y! j& s3 i' k else& _ N9 h+ w4 X+ ?) B
@.Destination := assignLObj[1,row];
1 b1 Z9 |) _' c, p* }$ R end; * A4 p0 K% E. n% b& Q* R: F
newDirection(@);; ]; s U) U+ R% o5 G
@.HasOrder := true;6 S8 l4 y8 G/ [ c0 N# P; P
end;* P! L" C" W: k5 W+ a
end;
# ^6 H8 e( ~% n9 J! X8 l4 mend; -- of the method% i j. ]5 B9 ?8 Y: H% c {
|