/* called by: entrance ctrl of the object 'track'$ ^1 m* T! _% n4 I3 {
*/- v8 g' f4 @: p0 N* F
is- y( s7 s8 Y9 G% R, E9 D8 |( d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! c! f( t! o" c
do3 l1 l, Y# e( y3 _: r4 y
Lan := rootfolder.Internal.Tools.AOLlanguage;! V: D6 K, I: }0 }" J9 r: `$ q6 G
if current = @.Destination -- else return- d% X2 ~5 c* h) b( R u
then
" S) h& k9 J, w% Q7 p @.Destination := void;
% q- Y' X" `: R. D$ W$ D if @.occupied then
* y0 e6 d* ~1 v6 [! J: T' E# X+ ^) H' K( N part := @.cont;
c9 _, }& j4 a$ R' y @.transpOrder := void;/ i5 p5 L; A. b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. G9 K9 w1 X+ Z8 y, j9 D1 _# c
@,root.eventcontroller.simTime);0 u3 S; F; c! p. U8 Y* ]& z2 E0 k
@.HasOrder := false;5 Q: Y) R' v% _0 S. k8 c5 g
@.DrivingHome := true;. L+ w$ q' g4 ?0 p' D" i" M1 s8 `. }+ B
rgManager.tryToStartTransOrder;7 e$ D4 I# `/ _/ Q% [' N" _
if @.Destination = void
5 k, O! D) R0 Y then -- no transport order for vehicle @
% i: g1 T9 \( q- {9 x/ p; Z @.Destination :=! h* K2 o% y- d& B, n# V: Z
rgManager.nearestFreeStation(@,track.~);+ q: |1 \0 N2 Y; J' {4 U3 U
newDirection(@);
. B0 [* c, c6 c) L2 a if @.Destination /= void then
( p1 P# ~: }4 d: E @.Destination.NumReservation :=! x) P: a4 B8 Z; Y7 _9 D
@.Destination.NumReservation + 1;! ~1 A5 A9 Y- _5 j
end;
! s; V8 T/ f4 c0 t R& Q' h- O6 q; V# X @.CurrIcon := "drivingHome";4 Z0 j! P; i. k& w+ h
@.DrivingHome := true;
3 d7 J3 e2 F" `$ i E) o end;6 J( p. C- ?& c5 U6 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station K- S, k/ P8 s O2 s( I
part := @.transpOrder;/ z2 N1 _- _) V! P( R/ G' P1 N* J
part.move(@);-- load part" M0 Q( o; H& a Z* A, i
@.CurrIcon := "load";
8 N% d% L5 H2 w! O( N5 E. f3 F GlobalDistObj := part.globDestination;# w0 p# j/ c, Z" X8 f5 k
assignLObj := rgmanager.rgAssignL;% p; G2 s, Z, I
row := assignLObj.getRowNo(GlobalDistObj);4 Q1 y$ Z) [4 a4 P
if Row = -1 then -- since 70 S0 z2 T: E. A `
if lan=1 then- Q7 v |8 \6 ]" ^; }4 J' O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 @( ~1 f0 Y" q9 x& ]& ^7 e: K8 m
to_str("in der Andockstation: \"",?.~.name,"\""));
( k7 }: ^, B, L" q# R else/ s6 K! n0 i6 K6 X: m3 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% f2 t+ t. j6 k- o' B
to_str("in docking station: \"",?.~.name,"\"")); 0 j/ A7 B9 ^' X
end;
) g! i5 W' |5 t8 a+ Z. L: O else
6 _0 M! R% \* U8 `" ]# W! v3 F4 g @.Destination := assignLObj[1,row];% W# K% ]6 C' m) @2 x6 T. f" r
end;
+ s$ @+ t: ^: b7 Y newDirection(@);
, l/ [8 b/ N( i8 O @.HasOrder := true;( ~. o2 ?& c+ z, V) k% O
end;: F! ~, s+ R+ v+ C: u
end;2 z4 i" {3 I- J- m8 G
end; -- of the method% ~( t- D. \8 Q# L
|