/* called by: entrance ctrl of the object 'track'% h' e. M5 [0 K
*/) r9 }: w, M! |0 d5 q r
is
% y& B) P' u: T% [4 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;: c; S7 c$ U$ Q- a" M% r
do
, J, L8 n: G" ~- [" a Lan := rootfolder.Internal.Tools.AOLlanguage;
& L. s. p6 t5 R& b if current = @.Destination -- else return* _4 }% L) j9 {% S: y4 z d
then
4 l; Y& G) U* U4 x' ` @.Destination := void;, h' [; @, K3 X& \) c7 t2 B/ Y
if @.occupied then
. Z* k# y8 V6 `. V part := @.cont;
% |2 p- {5 y6 d" C* q" _- c3 u @.transpOrder := void;
# K8 r) M9 t5 w! E5 U# x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! C9 Q, [' @/ N @,root.eventcontroller.simTime);
" x$ m' Q8 D! t! w! y% F @.HasOrder := false;5 B7 h5 r, R* u S
@.DrivingHome := true;
0 n# s3 O3 Y4 z- ` rgManager.tryToStartTransOrder;7 Q. g9 `8 V0 ]# [0 i. l9 t
if @.Destination = void
& o3 {9 s+ X L# d, z then -- no transport order for vehicle @
0 E @& h5 `6 p! v; ] @.Destination :=
6 h6 h4 t; {- |1 q rgManager.nearestFreeStation(@,track.~);
! D& Q) O. q* P8 J h# e: c" T newDirection(@);
, w+ N& W7 R. ~- v8 f, S2 f, C' ? if @.Destination /= void then* }& m7 f2 }3 C) Z# p( l: o8 `
@.Destination.NumReservation :=
2 K: j7 h+ X% T a4 A @.Destination.NumReservation + 1;! u( c& v# Q( l
end;
: W% u& p' Z! p/ Y2 b& X2 p @.CurrIcon := "drivingHome";
& a6 _) f5 d" \ X5 V @.DrivingHome := true;
! K* V! J' `9 @" [/ s( m end;2 k, L7 O' i7 }0 H. g S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% F8 V+ q0 v. j" {! ~- c/ Q part := @.transpOrder;& _' Y6 a! @( j# e7 L- g
part.move(@);-- load part
: z+ y2 S0 J" O* m6 X+ | @.CurrIcon := "load";
. i2 G, c& L" q |, G6 f3 O GlobalDistObj := part.globDestination;( i0 L9 c% W) l/ C2 \. U
assignLObj := rgmanager.rgAssignL;- q8 P' r- p; T9 `# Q! ]* a
row := assignLObj.getRowNo(GlobalDistObj);( z$ C* P6 {' K4 Y
if Row = -1 then -- since 70 B6 x6 S2 n }' Z/ ]% s
if lan=1 then
o# `! T: u6 M$ z8 z4 ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. D* F2 V- B6 b0 |
to_str("in der Andockstation: \"",?.~.name,"\""));; q0 _! s+ `- [' t7 v m
else1 p3 i0 O" {3 w9 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% U! n5 t ~" _5 r0 K
to_str("in docking station: \"",?.~.name,"\"")); 8 B: C4 m3 m9 Z6 {, W0 ?/ O
end;- _" Z! l9 g( w$ w
else. O% p$ L2 Y# x
@.Destination := assignLObj[1,row];
' a# Z$ e2 ?" Q end;
7 v5 Q( V& Z4 U* n, Y) V newDirection(@);1 d9 ?% y) S! B9 S0 W5 d. @; \6 w* Q
@.HasOrder := true;2 L, d1 u1 K1 M) s
end;' P) V/ y/ ]" x" _' l
end;
4 w! b, ^3 l" ^! Z9 E Rend; -- of the method
' Q$ {0 C( c- L9 m3 K |