/* called by: entrance ctrl of the object 'track': `2 r4 i$ m4 Q! C# i0 a% i/ |9 J
*/4 L# o& M7 M2 g! p5 u0 a
is+ q w! J2 w T6 B, ?9 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( l7 \ a( [6 e w
do
% F B6 ] [0 l* G Lan := rootfolder.Internal.Tools.AOLlanguage;; m( _- d: _- e" J3 Z: N) `/ n* h
if current = @.Destination -- else return! M4 L( }- X+ t" r, z2 b
then @" R2 K. C, w* @8 e
@.Destination := void;
% ~! m6 R8 z9 ?+ O s+ j- ^! s- t if @.occupied then
" d- q$ Z! E, O) { part := @.cont;, l& e+ K% Y' p6 f& r3 u; }1 T
@.transpOrder := void;0 _9 L3 I( M& P$ \3 {6 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ J# U1 L' V) L4 E+ {# [6 i& i6 b7 ]2 {
@,root.eventcontroller.simTime);
0 ~- S' ^& G/ b _+ ~& r. T$ E @.HasOrder := false;
" O p0 K- {# F# E% _ @.DrivingHome := true;
9 N6 v) G! }. P2 [ rgManager.tryToStartTransOrder;& Q- w& W7 W9 b3 D6 Z" o' }, h
if @.Destination = void$ [% @ {1 [1 a" q
then -- no transport order for vehicle @; F, t0 R0 A( {' u7 |) w9 a% M
@.Destination :=
: e" \( w) T8 d% Q p! i rgManager.nearestFreeStation(@,track.~);
2 o3 A& e2 V. t% p! v0 P+ R newDirection(@);
( g" {' K* ?4 ]0 j- W! `3 @2 I" s if @.Destination /= void then
2 ~: a" Y1 o/ M) w/ t @.Destination.NumReservation :=) j1 |! s& _) V7 o, K1 q$ \8 U
@.Destination.NumReservation + 1;
- r0 k7 d7 {; G& ]5 E! f3 L { end;
* s1 w+ h/ y1 B" i$ p1 B @.CurrIcon := "drivingHome";
; }4 |7 [8 W+ i/ ?+ F% X @.DrivingHome := true;
* K0 o) F8 T- Z' X- _ end;
* d- i7 ?" [3 u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 |1 [) z- j' U( @ part := @.transpOrder;
% C6 A) |& o/ c& o9 i' B) O part.move(@);-- load part
8 j: x' @8 d7 F# N) N7 N @.CurrIcon := "load";" s& z. _8 O) K6 A& Y$ L
GlobalDistObj := part.globDestination;
6 g7 e1 A. |+ M# Q! ~/ Y assignLObj := rgmanager.rgAssignL;
% y1 x3 y( Y( A1 i4 R6 A4 ^ row := assignLObj.getRowNo(GlobalDistObj);# p) G- g8 P5 l0 [1 P
if Row = -1 then -- since 70- G5 {+ `* {9 ^8 h/ F5 X
if lan=1 then$ q: P4 y; H, T1 C8 J6 |# Q# Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% K; H3 y) Q0 Y* ]' E6 G3 {: u% q, @
to_str("in der Andockstation: \"",?.~.name,"\""));6 I0 C6 Q* b3 S) e
else
& L/ K! T% |8 `: J7 v0 h7 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), u' b6 }: d% K7 D- U q6 W
to_str("in docking station: \"",?.~.name,"\"")); . _' ], A2 D3 O! F$ I: N* ]+ h
end;
; c' o' `! X4 q0 B Y% _+ D5 `9 c, D else2 ?1 c2 {$ t7 j$ [
@.Destination := assignLObj[1,row];
0 X' `* }0 {! x! q end;
+ z7 ^: F$ K) h8 r8 h newDirection(@);
6 L9 j! e, @# J1 Z/ p @.HasOrder := true;9 F8 V& w$ H% D. }' t
end;% n* Q' N. T4 L* `& K/ |
end;
6 y9 T6 E, \# Oend; -- of the method
+ a9 y, h& k r: U- A" O+ \ |