/* called by: entrance ctrl of the object 'track'0 f8 B, W6 C! V% Q# ?' d" o
*/
3 c6 V5 \& p' t6 h, z% r, M, h/ Yis
4 g2 s4 j1 X; e) B0 R3 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;* G6 W8 H' v2 a' U
do
) ]+ X1 \2 M0 ^* t2 w Lan := rootfolder.Internal.Tools.AOLlanguage;2 u# N% a4 g! F6 B
if current = @.Destination -- else return* T' X b9 m! I' N' D+ R
then
J* B9 K* w& S$ P7 w @.Destination := void;
1 {+ Q1 ?, A- \" @0 z if @.occupied then
" n! N( L4 X, J% _6 |/ l' ^ part := @.cont;
/ h" o4 o' ]$ ? p2 W" z' }- t @.transpOrder := void;
( w* [# P% L- T5 o/ p, C; V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% p9 p4 g. R1 u' P2 a# T ]9 ^9 s @,root.eventcontroller.simTime);
7 d, t t, k. f0 g% @ @.HasOrder := false;0 [* A+ P' T/ f
@.DrivingHome := true;
% s* @7 E5 u. Q) A9 V0 o( \* V- n rgManager.tryToStartTransOrder;3 D( @8 h! l: \/ C6 w: j
if @.Destination = void/ @+ [( a$ C$ @2 l( ^1 L0 F
then -- no transport order for vehicle @. x3 {. E3 L5 R( x0 e8 F: N
@.Destination :=1 k& \# P; M2 S; @% p% Z
rgManager.nearestFreeStation(@,track.~);! r M: ^# n+ {* r
newDirection(@); " \6 @6 b7 [3 p6 M5 W8 I5 ^
if @.Destination /= void then
. \, r5 D/ Z9 \ @.Destination.NumReservation :=
" I1 g) E2 Z" D7 h @.Destination.NumReservation + 1;
M$ y5 U! h0 b+ ~- M+ d7 [ end;+ A0 u, p! K5 v5 ?* |: `" F
@.CurrIcon := "drivingHome";
6 w0 H7 ]' q0 I9 O% ? B$ Y @.DrivingHome := true;7 {1 D3 y3 I4 m5 }4 w
end;
0 |7 a" X7 Q+ E4 Z- X else -- the vehicle @ is empty, both vehicle and part are in the same dock station: p9 @; L5 F3 M, W8 |
part := @.transpOrder;
% E( l/ E1 R8 U* a. s9 q part.move(@);-- load part
; F, I. R# ^. ?. F2 i! u/ D* `/ c6 J @.CurrIcon := "load";$ v8 _# f8 ~8 I/ O, u2 ~
GlobalDistObj := part.globDestination;! U/ z6 O" ] `8 i+ R
assignLObj := rgmanager.rgAssignL;
! X. j5 \8 x. D( S6 F row := assignLObj.getRowNo(GlobalDistObj);
- z1 u. n; Z3 J5 |" m- p if Row = -1 then -- since 70
, F( G" e2 p- |0 n3 Y% m if lan=1 then" k( _1 n8 L" e3 t5 Z# C! F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ P1 m! G$ V- T: r, I9 `
to_str("in der Andockstation: \"",?.~.name,"\""));- R8 T; ]3 y! a; E+ N; F2 h
else
8 R# C c, L, a2 Y3 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 K! f K. `, P; e
to_str("in docking station: \"",?.~.name,"\""));
' j# j5 p- {/ G, d' c. y' V end;4 y* A' y h, a* P; _2 g
else* B* s2 ~. F6 q9 M* k$ t" N* J K
@.Destination := assignLObj[1,row];, d o+ o: h% w
end;
! H, C7 f |$ c* [ K) {" a newDirection(@);
- ? R7 m; u$ A @.HasOrder := true;
M' z" `$ i3 Z$ V4 d end;( r" d' |$ z) i! X6 w
end;" Z( j; i7 w0 h' ?7 p+ ?. f7 E
end; -- of the method
. [5 e _6 j4 L- @5 q* T |