/* called by: entrance ctrl of the object 'track'3 C2 p( i5 [/ y$ y# ^ d: g% Q
*/8 M+ Q3 L: [: [: S# j A9 F
is
4 y J( c9 N0 _! G4 D3 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;. C, o5 F7 F2 c) D8 B2 _
do
2 i/ G. H. \! K& |/ B# h' ^5 }5 P Lan := rootfolder.Internal.Tools.AOLlanguage;
* v8 Y2 \9 g- e" u( Z% X if current = @.Destination -- else return1 h( v: f0 t+ y# s% O4 |1 C
then+ u8 {/ Y& A7 Z. b; x2 y
@.Destination := void;
3 d0 d, B! w N, O3 O) r7 x6 C if @.occupied then+ s8 F7 G, u: K C
part := @.cont;
: k6 V! K4 G3 a$ s4 ~- p6 z+ | @.transpOrder := void;, P" i6 f, y' e- @' g8 ~6 H! Q! E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 ^4 |9 L8 u6 a7 ]
@,root.eventcontroller.simTime);! m' S( g& s; h
@.HasOrder := false;1 I- H+ F- W' U
@.DrivingHome := true;
/ H3 N Z' X( N1 p* q5 z# R rgManager.tryToStartTransOrder;) a8 e9 @4 i# {" p
if @.Destination = void( s" ^5 @' I: c+ U/ s
then -- no transport order for vehicle @
1 E2 K3 G6 ~ s( m6 x7 |: o% n, v8 T @.Destination :=0 k4 e3 K L; O s A, u) \6 ?
rgManager.nearestFreeStation(@,track.~);
) i1 V$ h% H: ?* i newDirection(@);
* Q1 V+ B# p6 r. z% ?' ^ if @.Destination /= void then$ B$ O2 I0 {8 u$ z. w6 ?9 a
@.Destination.NumReservation :=+ m& K6 G+ \5 l5 s/ @& U
@.Destination.NumReservation + 1;
9 I7 e3 s: s% R4 M6 E end;* O" q# d3 E# u5 F' y! K
@.CurrIcon := "drivingHome";
" N1 u5 Z$ }2 b3 f3 P4 q2 b. ? @.DrivingHome := true;' b- \9 i9 s' V$ v: y6 g6 F1 B: _+ L+ ?$ c
end;$ E# Z' ?. u0 Z, r4 _6 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ ~' I2 g. [4 h2 }9 S7 E7 T1 ]* | _
part := @.transpOrder;
4 D& P6 b1 `3 T0 V; y part.move(@);-- load part
9 b$ j" x" g' [9 C @.CurrIcon := "load";
( V7 O8 a* j: g' G1 `6 @6 c o& ?; { GlobalDistObj := part.globDestination;( X6 r* e2 Q: \8 \
assignLObj := rgmanager.rgAssignL;5 s/ V' c; S) Q2 z) y9 ]7 n$ l
row := assignLObj.getRowNo(GlobalDistObj);% Y" ?2 {$ j& \7 L& ?/ z c
if Row = -1 then -- since 70" \! i& ^" ^6 g( ~% L/ t
if lan=1 then
9 @1 L! |* L6 h4 b! A* a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% i t/ N, s, s. _
to_str("in der Andockstation: \"",?.~.name,"\""));
2 a! N3 F4 [* w# W: a else9 Q* V. i- z/ Z: n, z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 F3 y; q. C, W" ?5 f' [( b# A to_str("in docking station: \"",?.~.name,"\""));
6 s1 M, @. k# e' | end;
% p7 q7 u) s7 I9 J9 u( i6 ~' j2 M b else' C" M. l( x5 [5 h t4 f
@.Destination := assignLObj[1,row];5 b U9 L( _' K h6 w2 {* H9 F) Z
end;
: C' z) t% ]# n newDirection(@);
! @( j' N! }+ E5 V2 \6 E5 c @.HasOrder := true;% i2 T! y) i3 A6 J7 ~% E
end;
% c7 l0 A" a/ Z$ { end;
$ j) y, h7 |, e4 b6 H9 t, Gend; -- of the method) v; i) }* v! A r* f% q% W. J
|