/* called by: entrance ctrl of the object 'track'
% t$ O5 }+ w& s8 [2 P! n*/
) g( k V; y6 I. u% Jis
+ l8 q& N. ]1 n% } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, G5 G: @" Y& P; N4 M4 Udo1 i/ K9 G* n4 O. R3 V! P8 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
" \1 _4 b2 y" v0 e; u if current = @.Destination -- else return1 I) F8 i% N1 Q4 l1 T
then
, ]. D2 F% Z# a @.Destination := void;1 n2 B* w$ j3 G$ t( W
if @.occupied then
. v" v% B- N2 F1 O part := @.cont;) x X- k; `6 B
@.transpOrder := void;/ D# w! K2 G' W1 c6 C2 ~6 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," r$ h. Y1 Y, ^* C2 B: t
@,root.eventcontroller.simTime);. O' t$ m( b: S
@.HasOrder := false;
, p2 v' [# O. h1 b8 t4 \/ a @.DrivingHome := true;
3 |+ Y! G3 K9 Y7 I rgManager.tryToStartTransOrder;" `1 v0 \& e, m0 r# [
if @.Destination = void
2 n+ \; L8 q: M) |2 M, U7 k) e+ ?+ t0 L0 H then -- no transport order for vehicle @
3 u3 r4 t2 q( M" K9 z. }' @4 e9 t @.Destination :=$ ]9 |4 J9 w S( [2 [
rgManager.nearestFreeStation(@,track.~);( k& c& z. o4 w$ ?3 q# ~
newDirection(@);
* T; s( _' n: E. A$ K' ^; h8 O if @.Destination /= void then
# |5 v& U8 B- l+ Z2 f* f7 @ @.Destination.NumReservation :=
5 v- A7 g+ _9 U3 R @.Destination.NumReservation + 1;
6 k) c8 V5 e6 ^ end;
/ E( M2 K& Z, s+ a @.CurrIcon := "drivingHome";
! V" A/ Q9 F; k [1 E7 v0 m Q @.DrivingHome := true;; u/ ]* ?0 a( u
end;
8 t C9 B! C ], P' ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
A' K( ]1 N! k; Y& y4 R part := @.transpOrder;
) `+ q# Y* H: X8 `; y* h/ `! L part.move(@);-- load part
% E6 F- p4 n# E8 N @.CurrIcon := "load";! g! [2 b8 P9 \) g1 b
GlobalDistObj := part.globDestination;6 C" K+ p, Z: Z: y1 b, z
assignLObj := rgmanager.rgAssignL;
: o1 f# T" Z7 C% X; ~. r8 W4 W- V5 i row := assignLObj.getRowNo(GlobalDistObj);
5 b5 D& Z( g( z: I7 c- S if Row = -1 then -- since 70
: E- ^, B/ z M+ t, K! v if lan=1 then
/ ~5 @' d7 u0 V& a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 ~' @9 {1 P7 d0 m3 J to_str("in der Andockstation: \"",?.~.name,"\""));$ G- ]; [+ V( {. d
else
$ P1 k. z8 o4 F- n4 `1 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# f) s% n) P- e4 e) ]8 l to_str("in docking station: \"",?.~.name,"\""));
$ K. f, M7 v" u. c, }6 M1 H end;
4 Y9 T- {3 N' T( ~- }7 A else
6 Z" m! J6 X) d3 K. D3 R- ` @.Destination := assignLObj[1,row];2 B, X5 @9 n& C8 |8 m$ i0 @
end;
7 R# N8 R* w! J6 D: l& y9 k newDirection(@);
* M9 f; g5 O7 J8 j. b# u @.HasOrder := true;
$ o& N( T: y* Y1 p& ^! ] end;
3 C" X6 r, y W3 ~/ n end;2 L. E, r/ ?: ]# W( D* W
end; -- of the method+ e: H$ b6 J( s; } I) [5 i
|