/* called by: entrance ctrl of the object 'track'
% }$ h. F; n ~/ C: l7 g*/
1 m* P) \6 `/ ? p: X3 v" w/ {# S% iis' c. R& K2 v' Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 l7 y) a4 h9 z7 X/ Ido
+ E: ~; @/ }0 l: s: V3 u/ c n8 j Lan := rootfolder.Internal.Tools.AOLlanguage;
g1 @6 R, ~: e8 \7 k1 w+ B if current = @.Destination -- else return j7 N1 a! A1 |4 t
then
7 K9 }- M' X/ }& R @.Destination := void;
, F7 |5 j4 r8 K" q) \. h( v0 J if @.occupied then
" T( j* z6 ?) E2 C% ?! M part := @.cont;
" H4 `$ n2 l- c/ J @.transpOrder := void;8 E7 W+ D. R2 a0 H* c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ p% B3 c; ]4 M0 l' U
@,root.eventcontroller.simTime);, _. w8 r2 h6 @: w7 u8 y
@.HasOrder := false;+ h5 [$ }" x0 o. N2 {$ t: a9 Q
@.DrivingHome := true;" U( o2 W3 |' n% d4 q5 u
rgManager.tryToStartTransOrder;0 T$ s& ]9 p1 k! V6 z& I) U; g5 t" T
if @.Destination = void
# y" H: E" { q# p then -- no transport order for vehicle @& _+ x+ p/ W' L$ }# P
@.Destination :=7 K$ {* _0 B9 ^7 p. T% y$ y! }
rgManager.nearestFreeStation(@,track.~);+ e6 Z8 l p0 v4 Q
newDirection(@); , ?) e: i- x/ x+ q' C0 ~6 I
if @.Destination /= void then) G9 [- E4 f) N1 S
@.Destination.NumReservation :=* j) ~$ `9 ~) A9 H
@.Destination.NumReservation + 1;
0 v7 l- ~1 F0 ` A end;4 X) L( f Q* x' \' u% ^
@.CurrIcon := "drivingHome";0 o0 c$ b' X& ~5 R* {. a
@.DrivingHome := true;
2 G9 G0 k7 G* W$ J end;+ S" l1 r6 }, C. m0 y+ u$ Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- p/ O. x9 T5 @+ h1 e) i' q# c
part := @.transpOrder;
6 a: w; ]( F; M1 d1 B, M' U part.move(@);-- load part
, j: b+ F+ H$ h3 k4 ? @.CurrIcon := "load";
( M: g4 L% @) i. |: K GlobalDistObj := part.globDestination;
4 _% r6 _4 r* e! `' `" m* b assignLObj := rgmanager.rgAssignL;
5 R# W2 X2 }2 M2 V8 Y. r6 W row := assignLObj.getRowNo(GlobalDistObj);
. N, k T# r/ e& S0 L& d if Row = -1 then -- since 70
/ L$ T2 |2 k6 D- F2 w if lan=1 then
/ ]) M- r& g( Q# r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 F3 T; d- |' T, s$ p3 y' ]6 a! l
to_str("in der Andockstation: \"",?.~.name,"\""));
' l: W4 w6 k' w- N, w# `6 x* L! m else' Y- k" m0 {) s2 r2 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 @, Z% Q' {' O- h" O2 v7 s to_str("in docking station: \"",?.~.name,"\"")); 1 R+ ^5 C+ p* Z5 i3 F: J% H
end;7 ~% t1 s* M! G5 T R
else
( s# Z7 [2 _" {4 |( H @.Destination := assignLObj[1,row];
; H& w- V @. e% N' ` end;
9 s; G" r- p( B7 M4 B$ L newDirection(@);5 a/ @$ H. l! l1 w
@.HasOrder := true;2 [, D- `7 F& |* G
end;3 h5 M- x8 b6 w) W- z4 U
end;
) n1 j3 g" v# D; K% h0 dend; -- of the method
( p5 V1 z2 p3 G- L7 d- _6 {( y- {7 N |