/* called by: entrance ctrl of the object 'track'
* K- i+ j& B5 T/ r' j( A! x3 {*/
* b/ K. S9 f9 ?# kis
; E8 p( }7 u/ a7 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ J' ^) h+ f; X4 D3 pdo/ v2 q4 U3 k" g+ D5 l+ w* `
Lan := rootfolder.Internal.Tools.AOLlanguage;
" d7 V+ C! `+ u6 Z if current = @.Destination -- else return$ W6 \6 v4 B; m5 H) P
then! O) v2 M$ x1 P: g* y) Z+ L) ~3 d
@.Destination := void;' U3 E6 ^- V0 J5 [3 N) [7 J7 e4 B- u& I
if @.occupied then
$ c& f' _3 {8 E- U6 l2 | Z* V0 {& P part := @.cont;3 P6 V# o- j5 ~* J: f
@.transpOrder := void;
7 `3 Y( T, g, N1 J3 U9 R) x/ g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- |" c$ w/ ?& p+ z @,root.eventcontroller.simTime);
7 \" S6 K" I' s& L8 r @.HasOrder := false;: k2 ~% h& R4 W1 v% f# ]4 D; [+ o
@.DrivingHome := true;# Q) }. e5 m8 F+ o7 }, M5 J- @
rgManager.tryToStartTransOrder;$ G8 Y. f$ [ {& \* Y
if @.Destination = void( G: s9 y: Q' B4 {( _: u- N# [0 r Q
then -- no transport order for vehicle @5 q- n0 v' t* N- S6 Q
@.Destination :=
8 m4 i0 M G; ~ rgManager.nearestFreeStation(@,track.~);
$ y- Y5 p% _ k) R newDirection(@); : J6 w+ ~1 P; C+ @6 t% _8 C' A' u T
if @.Destination /= void then+ q8 H8 ]( M" F" b$ ~
@.Destination.NumReservation :=
# B8 d& E+ H2 U @.Destination.NumReservation + 1;
, ?6 t( x1 J2 C end;
M( C: n' ?% O D/ s- c @.CurrIcon := "drivingHome";8 a+ z0 J# ^$ D7 A/ h4 ^" p
@.DrivingHome := true;( W1 \- X. k4 @! j- U& g) R
end;: o) I8 G* z4 w2 ?" X1 [% T3 F5 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" O8 o7 G- G6 C( [. c; v
part := @.transpOrder;
7 a b+ \1 A- T2 N4 e I part.move(@);-- load part& I0 X. R- n V1 M
@.CurrIcon := "load";
- A/ a9 f- b: W2 {$ _ GlobalDistObj := part.globDestination;
1 }: `1 j5 |: v3 G5 f2 y assignLObj := rgmanager.rgAssignL;0 E6 W3 [2 G. z
row := assignLObj.getRowNo(GlobalDistObj);7 k. _- `' `1 L: ^' L6 M* Y# U0 o Q
if Row = -1 then -- since 70
+ R, \% D8 D7 G( G# U; b! | if lan=1 then" e0 i+ [% C+ Z: g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), \; _0 D2 z# @5 g3 w$ @& ], E
to_str("in der Andockstation: \"",?.~.name,"\""));
% I, \, t4 X3 N* P C else% h! Y5 T0 N# {3 T( A0 H' ^5 P5 w6 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 Y: v* B* Y f& R2 Q$ y8 T
to_str("in docking station: \"",?.~.name,"\""));
8 f, a4 @$ h1 r' O! c end;
7 ]3 q2 E/ S0 l else
6 I' v& _" U/ x% ~3 K @.Destination := assignLObj[1,row];8 t6 B: g; Y3 w" M) H3 W2 `; ~( P
end; $ \& V5 c9 {7 p0 i: J9 Y, W! K
newDirection(@);
- w" u; c& y# {: V5 _% R @.HasOrder := true;, v9 w: R* G, [# E" s- A
end;
3 k, A) a: T! j end;+ p5 g/ O6 v) n! c. c; I% {) Q
end; -- of the method
# }7 ~) g& g) \) B, m |