/* called by: entrance ctrl of the object 'track'
- X; Y9 l" i; P! I4 {9 B' h U% w*/2 K/ ?- O+ y4 T6 l/ I
is
$ ~# }4 d6 D5 l- `5 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;% Q8 Y! p. I) |/ k8 X3 T
do+ U3 z& K' o Q; W9 V2 S0 t/ f
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ h8 u% D0 ]( r if current = @.Destination -- else return
0 a$ n. K5 [ y! @# ^ then! X' b' J, X N3 D' p; i- l
@.Destination := void;) C" t" t6 A2 a$ D
if @.occupied then
) m* F* e# m6 I; l part := @.cont;# u3 V" [& V) H% T) F _; ?
@.transpOrder := void;
( Z3 N+ }4 \7 K& A* y% |1 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ H$ B$ K7 @# I8 F
@,root.eventcontroller.simTime);
! K* p3 }# W3 t0 Q1 ? @.HasOrder := false;9 {. L1 L2 A% b+ l9 W( a
@.DrivingHome := true;
1 w/ l7 g$ ^+ G% z* M rgManager.tryToStartTransOrder;
$ w$ {0 R5 U( T9 a1 e. I C5 y if @.Destination = void9 [" U& ^0 |2 v5 b
then -- no transport order for vehicle @- I3 u6 q; i# l3 u1 O
@.Destination := C$ r0 T# w" v% S
rgManager.nearestFreeStation(@,track.~);
! i# t7 I/ c+ g6 g5 g0 ? newDirection(@);
5 x8 K' [7 x4 | if @.Destination /= void then
8 R6 [% A! Y& |* i: i) f @.Destination.NumReservation :=9 R2 H5 m1 b! u' V) G
@.Destination.NumReservation + 1;
& ~# g$ A3 B" S. J5 l# W# R& j end;% ^& ~' p& {8 ?$ t ]
@.CurrIcon := "drivingHome";
1 S, ^$ ^, l4 }+ x @.DrivingHome := true;2 c+ t4 T# G3 v6 T
end;
. U6 i; C. |) O else -- the vehicle @ is empty, both vehicle and part are in the same dock station& p K1 s! E3 B8 o- v
part := @.transpOrder;
5 Y% \4 I- B; g% S( ?9 J; S0 \6 l& m part.move(@);-- load part! i+ ?: I8 `8 O9 Q7 U' K( a( @. {
@.CurrIcon := "load";% O3 F5 Y* Z; e2 p
GlobalDistObj := part.globDestination;
. p$ Z! o! K5 f8 B+ | assignLObj := rgmanager.rgAssignL;
! ~5 P9 @+ L0 a$ }6 c* F row := assignLObj.getRowNo(GlobalDistObj);
, h# b, X! n7 I a" @ if Row = -1 then -- since 70! z. m8 U4 H" }3 d; `' M
if lan=1 then) N1 V9 L8 a- l& L& H- P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 b; m/ R5 G* e; K p" L9 ~ X7 p to_str("in der Andockstation: \"",?.~.name,"\""));
4 K) j5 f9 e8 j, G' V" J else# {5 p1 I* M9 } T) R! J3 V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 _$ s& T# q9 f+ B9 }7 x. U6 A
to_str("in docking station: \"",?.~.name,"\""));
) f, H9 X, M& n6 t6 Q$ i' |* P end;" O0 n+ s3 p' D! t7 o9 I+ V p' |
else
/ K3 @6 A* Q8 b @.Destination := assignLObj[1,row]; u* b# J5 ]0 Z" z9 q7 ], B! r
end;
& q6 V9 l" G \, ?% s1 B newDirection(@);
# z* X2 f1 A4 I% |: T) X" T0 \. H @.HasOrder := true;
) ]% f$ W m" b# e, p0 C8 x9 s end;* S3 i. i& Q: r' o" q
end;
2 a- f# c* }1 @3 _- Hend; -- of the method
) D- z6 B& l5 P+ W. D9 b4 A( R1 q |