/* called by: entrance ctrl of the object 'track' h& U r7 B% f0 a: |! K
*/4 r: S' _4 w+ Q8 ^" A
is
# T/ V& o0 G# ?. F( V, m8 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 k( c! J( ^1 Y1 i7 `9 vdo
K; P* j) s7 j2 r% ~3 c Lan := rootfolder.Internal.Tools.AOLlanguage;& T! L8 ~4 E, Q6 Z
if current = @.Destination -- else return
$ S3 r8 M) v2 n* Y- {" ^ then3 @; K9 a- c" B+ V+ _
@.Destination := void;
- r% U i0 \# z$ }3 E* I7 B; z if @.occupied then6 z: P6 u: m5 y1 i2 c: s$ ]
part := @.cont;
" p7 t) q, D4 z! E# N" M @.transpOrder := void;" R! g2 d7 e V( c8 ^4 J5 x. V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 D& ~7 G2 D$ E: J! P6 y+ I
@,root.eventcontroller.simTime);
8 b) Q( ?$ y* b; f; H @.HasOrder := false;+ K! p3 v6 m' g8 v
@.DrivingHome := true;' S; T7 [4 X1 B) m2 O1 _. Y
rgManager.tryToStartTransOrder;
9 P/ h; p4 l7 `, |' k if @.Destination = void
" W. g! E9 i; F% c2 Q+ b1 o then -- no transport order for vehicle @
" E1 c% n/ b- H' i% F9 M ~1 j7 [ @.Destination :=
$ W, `0 m" e' T rgManager.nearestFreeStation(@,track.~);
3 U% R! C% g0 x. \, A newDirection(@); 5 @ x1 r' ^7 n% N9 U
if @.Destination /= void then4 L9 E7 P `, o. w; ]8 w' @
@.Destination.NumReservation :=
; v) Z7 O! w/ W) H2 c: q @.Destination.NumReservation + 1;: D' v8 C& R7 A8 L' d5 H3 l( j
end;
0 \" o! ~6 i0 H! j$ D7 X @.CurrIcon := "drivingHome";; p' D3 G4 J+ v/ m! `: U
@.DrivingHome := true;
6 V) P: M$ x8 z& ~8 P end;* p' j, A' R) \2 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: f9 i a2 B0 R: u' n part := @.transpOrder; M) K3 ?- x/ H
part.move(@);-- load part
$ S0 [8 e/ B+ B/ M9 x @.CurrIcon := "load";% s% i8 n K* `8 l
GlobalDistObj := part.globDestination;& {2 m f( e( x
assignLObj := rgmanager.rgAssignL;( Q( C( z8 y# G i5 x
row := assignLObj.getRowNo(GlobalDistObj);1 _- A7 A+ _, k" x1 p
if Row = -1 then -- since 70& F& W5 {0 @8 g; y
if lan=1 then
, [+ y! F! Z9 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
r) w2 q" i, X9 G) G( G( Y to_str("in der Andockstation: \"",?.~.name,"\""));
1 I8 I% N4 \. Y else
2 |: e, X9 u" X# I) _7 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. o, f7 p+ Q4 Y0 Z/ y to_str("in docking station: \"",?.~.name,"\""));
* V/ }/ J$ m, m y end;
* \2 K, \* ~! S& t w% Q6 _$ _ else! _! e7 h8 [# y/ q& x3 u
@.Destination := assignLObj[1,row];$ T/ g7 k$ v) E8 `) M. _5 u. G
end;
1 d, V, H3 w) b/ L/ h newDirection(@);5 d8 i" H+ ^( k' ~" @9 f2 X
@.HasOrder := true;
. \: r5 O' L, B" {0 n; B5 c end;
& ~* O' D: z- M! ]. D# p0 | end;
3 Y1 Y6 ^$ m3 | {& V# T6 Kend; -- of the method
. g! ~% g& H! d% q2 H |