/* called by: entrance ctrl of the object 'track': Z" n2 P3 w7 K* R
*/
/ g" G' R0 W4 y6 E$ D. n/ @is
, l* a' e: B- ^, y& T# \3 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Q( r: b; k$ @
do
) @1 i7 q( k1 T* Q9 B- v6 ] Lan := rootfolder.Internal.Tools.AOLlanguage;
- x2 y) J* i5 ~. d( Y* p if current = @.Destination -- else return
- u6 n9 V& r. B' g0 X& C2 r# I8 Q then% `' F- R) {& P1 \+ Y
@.Destination := void;& h' b& ^% z/ @, j( A0 ]
if @.occupied then
, L( @7 M" @1 t1 A. W part := @.cont;
& j! F( Q# q7 S* c @.transpOrder := void;+ W6 L' `+ a( m5 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 V+ e8 @& G' j4 m1 ]! o( \
@,root.eventcontroller.simTime);
( Z+ t* S; ^. x- S- w& D @.HasOrder := false;
/ l& X3 z/ [4 I* b O @.DrivingHome := true;( @7 W4 Y, F' F) p4 m+ {# q3 g
rgManager.tryToStartTransOrder;
3 W& y) l9 d. d6 T8 X" R0 N" U if @.Destination = void
5 u0 o) Q$ U; J/ o4 v1 S then -- no transport order for vehicle @. Z9 H; n ?1 C5 ^ W! m' J( |
@.Destination :=! I8 F5 O+ N& G
rgManager.nearestFreeStation(@,track.~);* V) H! _8 `$ Y* T* ^
newDirection(@); ) G% \# u8 g: n; P
if @.Destination /= void then/ v+ d. G( t& h6 G! Y3 ]$ Z" B& t
@.Destination.NumReservation :=$ p7 C5 R* B; |+ b- v
@.Destination.NumReservation + 1;
' R5 Z9 {, a' b. z. x9 E6 M end;
9 @: P6 L2 g8 O @.CurrIcon := "drivingHome";6 \( h& t; T) ]/ `% c( x' _
@.DrivingHome := true;; z$ E# o' ?- ^: ], n) h
end;
3 m% Q5 J' M# ?& G2 i" j; f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ O, _7 \) ?/ s7 |* i. S5 d" i3 U part := @.transpOrder;
9 W; o5 q5 C( p part.move(@);-- load part
. L7 l# K z c4 e$ E @.CurrIcon := "load";8 q- F, s* b9 X) E/ }
GlobalDistObj := part.globDestination;5 L% _& _# m/ C0 p5 q, M7 A
assignLObj := rgmanager.rgAssignL;
( O+ G5 |7 ] n; F3 i0 r row := assignLObj.getRowNo(GlobalDistObj);
6 d; V5 \8 X& y! _$ M2 t if Row = -1 then -- since 70
4 `1 l. }, O# w" \* I0 i if lan=1 then7 @. g$ U9 e2 A3 t4 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 J( E& n. y: g9 [. ^8 A, K to_str("in der Andockstation: \"",?.~.name,"\""));
$ l$ q- [1 C) L else
8 U: U" N! x2 z; K; s( U; l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- [2 P0 Y& y& L9 o1 ?: W1 u to_str("in docking station: \"",?.~.name,"\"")); 8 J3 v; K) W# I k( A- j; L
end;8 v# u" y6 i6 ?6 [' C0 d
else
2 w, v: T/ P9 G) ?, T, `7 { @.Destination := assignLObj[1,row];
+ h" O! g, ~ k end; 2 R+ k: E5 B) n" T
newDirection(@);
& \7 z* I% ]$ C9 M6 B4 z" f) L4 q @.HasOrder := true;0 r) t q& e. L' [" t
end;# A' L. A5 V4 e
end;
5 w' W5 E3 @" qend; -- of the method
& b, W" \- N. ]0 N, j |