/* called by: entrance ctrl of the object 'track'
+ I* k3 T( v) ?/ j7 w*/7 I' f% c+ C4 x+ Z+ Y7 ?2 B
is
; G9 e+ A; p) b6 u. t# [) o part, GlobalDistObj, assignLObj:object;row,Lan:integer;' o4 Y" D8 b' T; ]3 Q" s* s
do9 ?" T- ~+ E0 W v5 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
% j, h7 J }. Z; y1 i7 k8 x if current = @.Destination -- else return- R. J* `# p7 t" M0 Y
then
8 C+ j$ i- p q& ]2 r @.Destination := void;, {9 p% g; j. ]7 C
if @.occupied then
( D S3 R) Y# Q/ o! W part := @.cont;
" C- _' Y2 ^. o3 y3 v) ^5 d @.transpOrder := void;
& U+ W$ n3 n2 L' I% f3 V7 S9 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* W2 `# z4 x/ s- ?+ B @,root.eventcontroller.simTime);. g# ~$ ~- K5 T4 x$ B
@.HasOrder := false;
3 a& @' o$ }7 L @.DrivingHome := true;" j/ g/ w8 o! b& U+ }1 ~
rgManager.tryToStartTransOrder;; W; E5 q0 n. p
if @.Destination = void9 ? h. D5 ?. o5 ^
then -- no transport order for vehicle @
( x! m8 e, c3 }# D: o+ G9 V @.Destination :=8 p) w' k3 b( y0 `
rgManager.nearestFreeStation(@,track.~);( K# j: G0 V1 D$ x: E& V, j
newDirection(@); + @ |7 T+ W$ u3 i( T: u
if @.Destination /= void then
! i* S3 N# X0 {1 L# s0 f @.Destination.NumReservation :=" l' V( m; v7 q. O9 a+ h1 m( W
@.Destination.NumReservation + 1;
2 `1 \" f/ I) q* J9 ?+ _+ G end;
3 D/ Y) d& T; m; y5 r2 l8 a5 p) r; v @.CurrIcon := "drivingHome";# U+ x Q! [' R. [; _" w
@.DrivingHome := true;
+ B4 z% ? j( f- v end;& t R$ M9 Y. n, C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ ]% _+ D$ F4 |/ ? part := @.transpOrder;
% {' z( s4 {! u; I- N) s* z part.move(@);-- load part+ D! \/ N2 y" A! _2 f& ~& G% J
@.CurrIcon := "load";; f h! z) F3 V0 s2 C- `1 V( T
GlobalDistObj := part.globDestination;
: L X* t4 j& j6 [ assignLObj := rgmanager.rgAssignL;
! c' L m, \8 I row := assignLObj.getRowNo(GlobalDistObj);
/ i; `5 t9 m7 z! S. N/ ] if Row = -1 then -- since 70, I- o/ U" ?" r+ V6 ]9 S1 U; F
if lan=1 then2 y* i( O' B8 @: b0 e. G& @. Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) J ]7 ~: d3 X5 a1 ^ to_str("in der Andockstation: \"",?.~.name,"\""));; x: A" g# n" f. c$ O
else
$ N. ]( B( ~- K0 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ], Q" B# {1 B. q! ` to_str("in docking station: \"",?.~.name,"\""));
' d x) x( R8 K0 j) D0 h/ ]( @ end;
. ] Y! f; l, f1 u1 Y) y else
( ]& m/ W2 H8 }3 T$ R0 W% i @.Destination := assignLObj[1,row];
5 Y& W3 c. c- B& q; P# a end; ; F7 g# H( v5 k/ D1 r6 }1 q
newDirection(@);* u) f( ^0 u* u$ Y( X$ V _
@.HasOrder := true;
% C, P; W/ E7 L5 `4 x; X& g end;1 l: b' m% z8 b8 B p( I
end;: _3 J! I! }. t' A$ m
end; -- of the method
y3 a4 S6 b4 A! z |