/* called by: entrance ctrl of the object 'track'
; c; x ^# K3 p*/
! [# H8 c3 [* r9 M3 b0 h2 T# `is1 E! g& [- u4 ` V: B" m5 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- R* t5 g1 _2 M. F& N7 ado9 s0 z3 Y5 k7 J6 z
Lan := rootfolder.Internal.Tools.AOLlanguage;8 [; M \. |/ R' ^: Z
if current = @.Destination -- else return' s9 b& S3 `4 A" d2 H1 ]7 P
then
* z* [) c; g0 i @.Destination := void;
# X& Q0 y @) @ if @.occupied then' \. L3 w" o! k! F
part := @.cont;
+ ?/ y6 ^6 s* z: ]0 W6 `# R# d Z5 ^. { @.transpOrder := void;( x0 \) w. ] _' Z' z' g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. f( I# e" n3 n! q5 z# s
@,root.eventcontroller.simTime);
]# z& N0 |9 T) m; t' N @.HasOrder := false;* r0 q$ h1 K, u O/ b/ U$ Z Y5 B
@.DrivingHome := true;: M: B3 v b" S u
rgManager.tryToStartTransOrder;! {# D: v" R" s8 J. I0 n
if @.Destination = void
1 I+ T/ Q2 J; e then -- no transport order for vehicle @+ ?7 ~. T5 G: i% X
@.Destination :=
3 `) q* i0 |: ] rgManager.nearestFreeStation(@,track.~);
6 e; S. ], W" r9 Z! e9 G- b newDirection(@);
+ T( H. r. z/ x' S9 u1 w( F* m( r! \ if @.Destination /= void then# Y0 A1 d( ~& B+ ?6 g6 b( R6 j) m5 P
@.Destination.NumReservation :=
( I& I2 v$ L4 O0 T( K @.Destination.NumReservation + 1;8 n8 @% \6 C9 o( F. q- W( c- _
end;
$ V! C% J% J i+ S" L1 p @.CurrIcon := "drivingHome";& X& y- O8 `% q: X( t3 L
@.DrivingHome := true;
& v% b9 L, N. S% _( Y) g& M end;
: h8 Y. E3 `8 Q; T else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 o% w3 L: H. M2 X: e. M
part := @.transpOrder;) N& Q2 L# Y4 E1 w: d3 g+ k
part.move(@);-- load part8 w/ m: W# g! I( u. K' r
@.CurrIcon := "load";
# W( X9 `4 u. g* y GlobalDistObj := part.globDestination;* a4 ]$ X- h$ z" J
assignLObj := rgmanager.rgAssignL;$ T; w: [7 z! S# r) O- i: e6 l% }
row := assignLObj.getRowNo(GlobalDistObj);/ e; Y3 L. |2 P2 P6 ~1 ~
if Row = -1 then -- since 70
' w& A# _+ y, U, ~8 e( `# ? if lan=1 then
/ y0 G; ]4 s q& T+ P/ H" H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% p- A5 X# z% m Z9 o. `/ S: \ Q
to_str("in der Andockstation: \"",?.~.name,"\""));6 f6 ^9 P2 ~5 P' ?9 s5 @9 d
else
7 }0 i) l; }" B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( p9 r4 j& q5 B6 j7 t to_str("in docking station: \"",?.~.name,"\"")); ( P1 [- W7 ?8 W' F+ k
end;
4 R9 Y% {) _ Q# c* W0 }0 z else
3 W# T- R4 p+ i! j @.Destination := assignLObj[1,row];& y- N& {4 Q7 C; J- D X
end;
# V5 q' x j5 m5 s: q& _ newDirection(@);
( z) B: F8 |& s0 y @.HasOrder := true;
- }- s( `" S/ \% x( E end;
% n4 e8 w4 H, m end;
5 Q7 C, ^: O, h+ g8 c2 send; -- of the method
' A* C& C/ y+ ?+ y) p- M" _ |