/* called by: entrance ctrl of the object 'track'
% w6 }$ L, d" |" k( G W*/
) `& ^% z0 U7 |0 @. N4 f& lis! }8 ?( j3 g5 j4 s+ d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 S/ M$ d- Q. R
do! u3 n0 f4 g$ Z* f
Lan := rootfolder.Internal.Tools.AOLlanguage;
- u; h# {/ v, |5 ~6 Y1 e if current = @.Destination -- else return o) e" w. m5 D# j
then
2 l! S- @' t2 j# \* D3 y8 X1 S @.Destination := void;1 {" {" M" i$ O
if @.occupied then2 k6 t7 J& j) N0 b _% g
part := @.cont;7 m A) F, ~# w9 F3 H6 H; w, T% s
@.transpOrder := void;; b$ j/ S. D9 C; {! }3 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, @# k# ^* D R" K
@,root.eventcontroller.simTime);
8 J& u9 Q% w t+ w, a. z( } @.HasOrder := false;" z# k2 E, V3 G* Z
@.DrivingHome := true;
) l2 _3 H# k$ c6 `7 t rgManager.tryToStartTransOrder;
7 z/ i" n$ t, x1 c7 u1 [3 |5 O if @.Destination = void
# d6 M! T% a) i then -- no transport order for vehicle @
; l# ]5 N8 I A$ c0 @% a7 i9 q @.Destination :=
: j Q U p @ rgManager.nearestFreeStation(@,track.~);
& `4 s8 K1 f% O) ?, y( m+ { newDirection(@);
7 Q: m. Y2 D! L) T1 Z% F4 x if @.Destination /= void then
$ n2 [% O% R( W9 S F4 K/ Q @.Destination.NumReservation :=' e! ?, g; E4 e( @, I/ a; W
@.Destination.NumReservation + 1;
+ ]( L+ l' ~ D, _- G4 {2 L$ W5 q5 x" D end;6 h6 o* g0 l& J% n7 S
@.CurrIcon := "drivingHome";
; A1 `% c# x% n6 h' K6 [8 y @.DrivingHome := true;
) g8 X0 x, c+ p- p! X end;
. C; X( }0 h- z1 j) e3 { q6 g4 R2 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" {* T! t& C6 n% f! M1 Z part := @.transpOrder;
: m' ?3 I' O- f7 F! ]% d" a+ Q% ] part.move(@);-- load part/ D$ p- O* n( i1 U2 \5 V
@.CurrIcon := "load";. S7 q# D* J4 c1 d: ^
GlobalDistObj := part.globDestination;
: N2 L0 L! H8 m' a0 S assignLObj := rgmanager.rgAssignL;
" }! U: ?4 ~! v row := assignLObj.getRowNo(GlobalDistObj);
: Q2 j9 L, f" Z8 b if Row = -1 then -- since 70
- Z! c9 \ j- ~$ ~6 e if lan=1 then
; P6 N+ s$ d% z1 t2 O6 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& y- Z5 I5 s* M4 k8 K. ^ to_str("in der Andockstation: \"",?.~.name,"\""));
* _/ y$ ^! \8 k else
; w% A1 U+ M& l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! H5 O2 D. B- ^6 _1 X# k" j to_str("in docking station: \"",?.~.name,"\"")); # n! N$ V! i& o/ R
end;: _+ m: v; `, o% c
else
, F+ E$ @" U5 R! v1 ~) v @.Destination := assignLObj[1,row];& y1 ?9 G! Y# s+ f) d4 b# o
end;
X5 h! F9 L: [# V9 U8 X/ w newDirection(@);7 W# r5 A& w8 F2 b; Y0 K- c) g
@.HasOrder := true;$ L8 L6 d6 I4 \# s* f2 I8 u8 q4 g
end;
( `- I! N0 Z$ m f0 ] end;3 [( {' N- k8 s# l8 H4 t0 H
end; -- of the method
% H" ` `- k$ l9 m2 m; o9 O* E |