/* called by: entrance ctrl of the object 'track'( d( s+ k$ ]$ N. T$ z" c# G; \
*/' i5 A8 h) K$ o1 Q
is0 h0 z9 z# P; d- W/ P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 |) d% [* u' H$ j% i; Zdo
* @ G: S( x9 O) P Lan := rootfolder.Internal.Tools.AOLlanguage;
# x9 B7 f" E+ I% j2 h# F" `2 l6 h if current = @.Destination -- else return
6 K6 {; a' Z7 j. \; o4 d0 r( z# e then
5 ~5 V/ g+ j* c3 o1 l @.Destination := void;
( T6 `& y0 `1 A" n, n0 B7 _7 E7 _ if @.occupied then/ }9 r! H0 K$ M h: J7 P d3 ` |
part := @.cont;" x' Z8 N9 v! G7 X
@.transpOrder := void;
+ Y9 g) _$ a# I* o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' }+ {" V1 E4 e5 {9 l- i
@,root.eventcontroller.simTime);
! a$ X! J" h8 d8 M4 Z @.HasOrder := false;* N+ p$ `# R0 i( k6 @
@.DrivingHome := true;
" N4 K5 h8 i/ }* {% p/ a3 L rgManager.tryToStartTransOrder;
! s0 {2 m; ^ k1 M, m1 \. ]' L if @.Destination = void( n/ c$ {! ^. B. V) n8 h
then -- no transport order for vehicle @
" A* A2 p+ d8 o. D4 i @.Destination :=
4 Y2 a5 t" }- s rgManager.nearestFreeStation(@,track.~);
2 I% C) e4 v: u$ I3 G2 j, j newDirection(@);
; R6 C0 ]( W. d, [: Y+ H: \; S4 w l if @.Destination /= void then
6 j2 H+ r6 w# u9 `3 t @.Destination.NumReservation :=% U0 e6 b" ]7 e' a6 ]
@.Destination.NumReservation + 1;
7 D5 P/ E# V. Z3 d& w" `1 K end;) }& J# c/ f- D- O
@.CurrIcon := "drivingHome";% s$ B+ R3 {0 K4 v% Y
@.DrivingHome := true;' M0 B* A2 s8 Z- f: t
end;2 r: i3 E7 j% P) X4 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; j9 s" {) w7 e( d part := @.transpOrder;7 I9 @# x: g R) g5 @
part.move(@);-- load part
% N! z& p c1 F& q. i) l5 ? @.CurrIcon := "load";" |- v$ q s! L* J5 C
GlobalDistObj := part.globDestination;
% l) o2 M4 z r% A, J' O- x assignLObj := rgmanager.rgAssignL;3 j ? x. W/ x( m4 A, \: N0 u
row := assignLObj.getRowNo(GlobalDistObj);
& o; @/ H X! j6 {# x4 ?+ R2 C if Row = -1 then -- since 70
( i' Q1 A# g1 e if lan=1 then! }' F% |1 H; l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, e. I3 w0 V0 g/ T8 s5 y: a to_str("in der Andockstation: \"",?.~.name,"\""));; z$ g* e- w: J$ c8 C+ O' _8 `
else- W. U8 R0 x9 W2 X- j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! P7 ?& {: K0 a7 _
to_str("in docking station: \"",?.~.name,"\""));
! R. P; ^$ d8 ]5 [- o end;
. v. d0 O6 V0 h( I2 O9 F+ q; K else
8 z4 J- f* r% U; t" j* v/ r @.Destination := assignLObj[1,row];
7 ` |7 Y! I% \+ Q- R* D- k end;
& F# R2 J- M2 F% v/ H7 U: @6 v newDirection(@);
, j1 \+ x: N6 l @.HasOrder := true;
# d& u5 V9 @% X, c7 ?% Z2 A+ | end;
) a8 d/ J0 A8 y B end;
- c0 D$ x! t+ a l ] m- Wend; -- of the method
i! ]$ Z& h x/ ? |