/* called by: entrance ctrl of the object 'track'* K% H' Q% F2 e) h6 u' Y$ @- u
*/
2 \5 q/ \: i5 c8 I, X& y( k2 @is
. L7 A6 z R, ]( C% n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ d4 e2 E! b( ?: G1 ido* A7 f6 ~+ X. n4 g; d4 q
Lan := rootfolder.Internal.Tools.AOLlanguage;3 {( U; J/ n1 p) |5 s
if current = @.Destination -- else return, O- C$ K; D6 B4 u
then
( s; j# L; L9 T/ ` @.Destination := void;+ h( W8 ^( h) c [( I
if @.occupied then
0 u% S8 h; q1 s. C+ t0 m0 s8 Q, J part := @.cont;
4 \* [* I. Z+ z @.transpOrder := void;! r. e) s" `1 J P6 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' V; ~: q3 \3 z- `* T/ c$ d
@,root.eventcontroller.simTime);# S% q3 G1 ~. p& m3 r/ |
@.HasOrder := false;
o) d2 h1 q7 b6 {+ F' P& t @.DrivingHome := true;
' X, U$ ~0 O. k& e" s! K rgManager.tryToStartTransOrder;' e @) E) Q% L& Q. a2 l
if @.Destination = void- ~" m# c! z. Z8 s. n( u
then -- no transport order for vehicle @6 g: Z) M- T: q- ]" [/ n
@.Destination :=
2 ^5 k4 D; M! h( H6 E+ D rgManager.nearestFreeStation(@,track.~);
6 m2 T4 t0 C2 \; q" M newDirection(@); % }" S8 L0 Q! D- [7 G
if @.Destination /= void then
0 `7 P7 ?: j; k- D2 ] @.Destination.NumReservation :=
) N. W% `& [( E( V+ k+ i; I: @: q @.Destination.NumReservation + 1;
3 L, V8 I1 V1 [/ W9 v) N end;
5 A' ]8 b% H' G4 W) c, k6 F" n" ^9 ] @.CurrIcon := "drivingHome";
7 q! {2 l! ^& R& p @.DrivingHome := true;
6 Z5 h" d1 j8 o4 q, } end;
! \( V9 q2 e* }; O0 F! i! @- c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; e2 g; I- b( m7 a part := @.transpOrder;7 i4 U! r8 _! f- T
part.move(@);-- load part+ K! h2 W. b, p, _& \' V1 I9 K
@.CurrIcon := "load";
3 P/ ^# N# {7 v. j3 j1 ~ GlobalDistObj := part.globDestination;1 e& C+ q. s: k
assignLObj := rgmanager.rgAssignL;. O9 t2 |/ i% F7 y
row := assignLObj.getRowNo(GlobalDistObj);
7 W4 V4 x- a: C' H- Q/ U" H% k. u if Row = -1 then -- since 70
' k1 }6 }, q' g if lan=1 then
: |/ Z6 G8 _/ Q6 d0 J: f& { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# b. t' |7 y% o
to_str("in der Andockstation: \"",?.~.name,"\""));
. i9 F* u0 Y. ^1 c) I$ O8 Y else$ u& H& B# |* b" }! Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: g& {% S$ e! n2 a" j
to_str("in docking station: \"",?.~.name,"\"")); $ g6 c+ q. h# W4 d& I4 c5 Y( \
end;2 [- l1 G. {5 `( n
else% u$ m4 U* x7 R B& k
@.Destination := assignLObj[1,row];# }. o; R, d9 @0 i
end;
8 O% A1 I2 ?7 u newDirection(@);2 |9 @+ e! z$ m* [
@.HasOrder := true;
9 K5 I* ?5 P2 {! F end;" G5 A& e! W7 o8 p- |" M
end;4 V6 Q7 `; p0 }. g- k; u
end; -- of the method
7 Y* r7 V1 f; {9 _: ]" _0 ?0 \) G |