/* called by: entrance ctrl of the object 'track'4 ?; }8 X4 X# B$ @
*/# W- y+ M6 e( f$ }+ b" h# c
is/ W9 S6 c \; d2 G3 Q; V. C/ x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 z, f( b" C! S! l' n
do
5 w4 T% a" [# c" O Lan := rootfolder.Internal.Tools.AOLlanguage;
! X: j5 X3 O4 O$ ^6 @4 _ if current = @.Destination -- else return$ W% h7 v) J: |' c5 u s
then
3 i3 M5 F+ i- p6 B( w3 G/ b @.Destination := void;4 U, @: }' A- d3 L0 k7 o
if @.occupied then4 V2 b8 b( Y5 A/ i9 W6 w
part := @.cont;6 \9 e g) f7 b( n
@.transpOrder := void;0 ^9 M. }( F" n+ L0 K9 R. j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& }8 `* R6 j6 [5 f5 Y) I: r, I$ x' W
@,root.eventcontroller.simTime);7 M' A. s$ v, u+ }! O3 F
@.HasOrder := false;
' B0 l1 r& x! R! T h$ v0 l @.DrivingHome := true;5 b; N) h4 \! a: A
rgManager.tryToStartTransOrder;
& f! ` }' k' \( g/ Y& @6 V if @.Destination = void: F) x, s" f+ v# }' `
then -- no transport order for vehicle @' O" p- t- l5 l; s, | c
@.Destination :=3 ^; Q) D7 O) m& D
rgManager.nearestFreeStation(@,track.~);
+ W l2 \# ~" _ newDirection(@); 4 S# @8 m, D }0 J( X
if @.Destination /= void then
1 K9 K# A2 ~" F3 C/ W @.Destination.NumReservation :=
; }6 R }. }1 J# O% g, M @.Destination.NumReservation + 1;
8 w: A' P3 R0 C8 O1 p! c7 t end;
" K& P9 m/ ^. s1 K/ e @.CurrIcon := "drivingHome";! n# K2 X5 P6 g
@.DrivingHome := true;1 o/ J; o }+ K; @% M2 ]
end;0 Q S* \( c' A" W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# @) x* @; D& C1 E$ U$ O5 m" v9 P part := @.transpOrder;! ?, L9 G& B/ Q' E6 ?2 {
part.move(@);-- load part
" ^+ i. o7 i3 _: \' ?; m @.CurrIcon := "load";
% U6 e( n3 \5 V! W, r4 l GlobalDistObj := part.globDestination;
0 \$ \7 H/ P; m h assignLObj := rgmanager.rgAssignL;) n5 D9 `# J! G9 R& ]/ W* {, A9 [
row := assignLObj.getRowNo(GlobalDistObj);0 j2 |+ N3 i% O, r' g- b) u
if Row = -1 then -- since 70! ]5 R6 j$ S3 i" x
if lan=1 then
6 u6 B1 q$ l* O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% w* K8 V, b, Y, ~3 o2 T) V to_str("in der Andockstation: \"",?.~.name,"\""));
! ^& u! N1 l) \! B) n" N' D% Y8 v else
' T- L; w6 t- z* I! p) i3 u9 U' M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% F$ r) L- d: O |
to_str("in docking station: \"",?.~.name,"\"")); # F# l4 H: B, H- @1 z
end;/ K, z/ Y8 ?6 {# g9 P8 k$ r
else' x7 h @' Z( X' a: T5 q5 k1 d
@.Destination := assignLObj[1,row];
. \5 Q6 ?2 A2 O# Q9 v: s end;
2 i( t8 Y/ \3 w& F! q newDirection(@); C7 B7 J- o, h1 V# x
@.HasOrder := true;
$ Q f- Q6 k' a, ^) \$ x end;% C9 C! F3 o2 \) N
end;
7 X4 Z+ g3 b" b j) ?. m+ Uend; -- of the method; x- V4 d7 `* E5 z# x/ T. Y
|