/* called by: entrance ctrl of the object 'track'
; o9 o/ F0 a( |: h+ S*/
+ b6 T5 f; x7 s3 i/ X& g0 Q& ~8 zis
" e" B4 W0 i7 ?5 ]8 ^- O part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ @/ G+ C1 X( C Y) [+ J
do) K' M1 v2 ^$ S( |7 S1 ?' R
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ F- v9 o+ R& h* _, U4 d: n if current = @.Destination -- else return
' {$ _) B e* A2 F! W, Q then
$ y x) ?1 A9 ~2 f- y# z, f% q @.Destination := void;0 |2 p( T6 M* J4 K$ ~/ h
if @.occupied then
' C4 \' u2 N8 ^/ R Z0 a part := @.cont;
0 J3 u5 g& n9 J+ r f4 m4 k @.transpOrder := void;( K/ t8 m$ P4 W; E, g: O8 u% v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 v' o2 d4 r$ T/ S3 {) u0 C6 Z7 f @,root.eventcontroller.simTime);
! `# a" n1 q& N2 a# q, j @.HasOrder := false;
/ ]! [8 R( D U9 `$ k @.DrivingHome := true;* {+ ~8 a0 j7 l2 s1 O
rgManager.tryToStartTransOrder;# X7 E8 t" j: X1 H6 ~- \/ D
if @.Destination = void
' J# F2 @6 C$ G9 H then -- no transport order for vehicle @
6 ~& O) \9 J1 G. x2 a$ h) y @.Destination :=* r+ n7 g% s5 l; E/ b/ u
rgManager.nearestFreeStation(@,track.~);
9 @% L/ h9 W; w* C0 P. m9 m newDirection(@);
( b+ K# c& r9 K" { if @.Destination /= void then- O0 O/ X3 |% P2 {, _4 s
@.Destination.NumReservation :=
9 R2 o3 S# ^- H+ d7 Z1 e7 b @.Destination.NumReservation + 1;& f/ y6 g0 _" q4 C t9 I2 i$ ^
end;( o) P( J9 d7 ~1 C ^$ w
@.CurrIcon := "drivingHome";
* S' E3 `8 B4 O4 Z( L @.DrivingHome := true;7 R M3 r5 O; u
end;5 `7 }0 d3 Q3 w" a; u/ p' x: o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 O, Q1 q3 O8 K4 D% {2 z part := @.transpOrder;
u9 J7 F1 o' ^( ]. i' m part.move(@);-- load part
! h0 G0 h! P4 R$ f( O' I# o$ T# l @.CurrIcon := "load";9 ]1 Q3 U/ ?" A( h, m
GlobalDistObj := part.globDestination;
" R. T! @5 y1 d8 S% ?1 r$ a5 w3 T assignLObj := rgmanager.rgAssignL;
- w7 p1 P X2 @- O row := assignLObj.getRowNo(GlobalDistObj);) P" v" Q3 K' B/ F# Q) z$ F
if Row = -1 then -- since 70) m4 |# @% K z
if lan=1 then2 q& s/ ~9 H( I. W: e* ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 I- |3 |' [8 I! |. \- G9 Y1 b
to_str("in der Andockstation: \"",?.~.name,"\""));/ r+ o5 d1 j1 o4 y5 W
else
# S. f" h: `8 |6 @1 M% } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) C* L8 Z" ]9 V: t: A |
to_str("in docking station: \"",?.~.name,"\""));
: u. Z6 d; ] C4 ` end;
. O- `+ H9 r& _$ S2 z2 o& [ else
3 ~5 U; F0 e' i; x. c+ M @.Destination := assignLObj[1,row];
- f- [0 G% W3 \% |" z" C b) F l* h end;
! S7 S; ^& b( S) c: ? newDirection(@);3 O( D3 V3 c$ e8 G5 g$ N
@.HasOrder := true;
8 E% ^# [+ \) Q2 p! |8 M end;
3 n6 S! ?1 p* Z end;3 Y% o5 j' }" N2 E7 O% O: M1 B
end; -- of the method( \5 {9 f5 J( _7 Z1 |
|