/* called by: entrance ctrl of the object 'track'8 `% G! H6 y* J
*/
& C: ]9 C+ u% z- j. E* ris
# t: A3 L8 I1 j; K part, GlobalDistObj, assignLObj:object;row,Lan:integer;( u3 C' C2 z' P" }
do, L9 C9 C2 S. J* \: O; c
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 [$ }$ N) R) G. v if current = @.Destination -- else return
' ]' b9 Z) G4 m8 k: T then
! [2 K7 C6 N) Z' V7 T. I @.Destination := void;
* L1 _# N$ k w/ X1 A if @.occupied then
3 k3 V0 Z* b) b* l part := @.cont;: k7 n7 [7 Q5 Y, g8 R
@.transpOrder := void;5 q3 [1 `; \* [; ?8 t# r' ]) O$ T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ w8 w& I# _9 x- w @,root.eventcontroller.simTime);
. H- I9 i( i: W3 s @.HasOrder := false;
4 Z( A3 H4 F2 R* s2 S# a$ S& N7 _ @.DrivingHome := true;
* U; [$ J% m1 a& t/ C5 h1 f2 J1 J rgManager.tryToStartTransOrder;
3 n1 L u0 e( L+ l6 ? if @.Destination = void
3 t; m& [1 u0 U, W( k% k4 } then -- no transport order for vehicle @
9 K: \+ D) r' B( b5 h @.Destination :=- S$ |- W1 @# B
rgManager.nearestFreeStation(@,track.~);
8 u9 ?8 D, D2 k. F5 A `4 L newDirection(@);
' B8 S! ~! s" c7 E+ O4 n) S) v if @.Destination /= void then
' |* v- \& J! x% R @.Destination.NumReservation :=: S. @2 G; U" V) m+ j
@.Destination.NumReservation + 1;
y x: t1 o1 X* T& [' q end;9 ]- `: _# w+ D7 t5 k2 y
@.CurrIcon := "drivingHome";( B5 F% R+ r3 j& R
@.DrivingHome := true;" i. e: B3 r. d; f
end;! M4 j* p0 Y0 v3 I% a) j" ^9 ?; i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 m! r8 [9 w; Z. U& ~; a part := @.transpOrder;7 p3 Q# j' m: E q) o) L/ y$ ?
part.move(@);-- load part# p& S1 i; R, ]$ r* T
@.CurrIcon := "load";
! ]' L0 ]/ X0 z1 `# N: O GlobalDistObj := part.globDestination;9 N& e/ n" l s6 S6 ~& o; w
assignLObj := rgmanager.rgAssignL;
. h6 K7 E4 F1 \* j* V row := assignLObj.getRowNo(GlobalDistObj);5 v' d1 P+ }5 ?$ d& a
if Row = -1 then -- since 70
6 ]8 d$ D3 }3 b5 @& Q if lan=1 then
9 x# _; N: G8 Y9 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* y. x4 v- k7 U+ |+ a0 D to_str("in der Andockstation: \"",?.~.name,"\""));
. n* K/ y/ o5 K* K$ B7 i6 O; T" @2 A else
3 m1 T) W( h$ L( b6 [6 d& N4 o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ m0 s8 e1 H y! K0 ]& r; I
to_str("in docking station: \"",?.~.name,"\""));
( V/ C' R* q/ _( m5 w# w end;: {5 r, O Y- e) Q
else
8 Y5 Y% w1 u, K7 v' q9 h @.Destination := assignLObj[1,row];
; Q `/ N8 c8 }# I' h: Z: P end; 8 J7 Y) `, H, j; r6 e2 u( C& i- Q/ [/ l. Q
newDirection(@);
6 F4 j4 s5 R( g9 a& y5 E @.HasOrder := true;" F$ e6 h( J5 S# L1 U& o% v* W6 O
end;4 j& S1 R7 ] Y. d4 F
end;/ Y/ M4 F" }+ p, f5 T- x
end; -- of the method
" M: f7 N/ u% Y" }! o1 b3 b( ~ |