/* called by: entrance ctrl of the object 'track'
. S/ s9 c: ]+ b! s2 M" V*/
5 j8 q, Q$ L# b5 bis6 x2 l. e! ]2 A; D4 @4 `7 u4 I$ L3 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; i( I) O3 |8 ?7 f% P: `
do9 d' r7 c& u* |- O% O' U9 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 b- J: \# V! N; a& C( } if current = @.Destination -- else return7 n: e; n" y# H& L1 R: O! P
then3 _( Q/ |4 e( Y) V+ \( w1 @
@.Destination := void;
' D) }$ P. I4 G! V: c; S) n2 S if @.occupied then1 r+ p! }5 X1 [! U
part := @.cont;- Y# t$ L8 x. E8 h( l+ ^
@.transpOrder := void;
' ]4 X. P4 ]8 H. Y* R! a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& T+ g/ U1 p. Z& C& i, F) [ @,root.eventcontroller.simTime);
; m) m" @5 v: {2 r( i; r3 } @.HasOrder := false;
N$ O' R' h" m5 b& W3 ?1 z @.DrivingHome := true;3 k! p' k8 K& Z' z5 B
rgManager.tryToStartTransOrder;
0 H4 A" Z+ \. w& X- ~( D; q4 U if @.Destination = void0 i+ D2 g0 k" ?, n8 P
then -- no transport order for vehicle @
- O& l/ n- z* t$ T1 }# F @.Destination :=
! x% p; {2 M0 D rgManager.nearestFreeStation(@,track.~);0 T o' m. h0 x. Q; M
newDirection(@); & O1 k! x. z8 m* e
if @.Destination /= void then* W4 w/ b* p. j' p3 h# {4 Q& a5 M
@.Destination.NumReservation :=# T. P; [: a, x/ n1 B& _
@.Destination.NumReservation + 1;
' i" ]2 h) N; j$ A! _ end;! o; @6 P6 A6 F# d5 \
@.CurrIcon := "drivingHome";+ z% m, c- Y* l# Q2 d1 |
@.DrivingHome := true;
9 c) N- u* c/ b end;; m) M( c, m2 f! D1 S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 U. t8 y- T- b$ t. k+ K+ Z) G part := @.transpOrder;! G( d% i% N0 c7 ?
part.move(@);-- load part3 b" l* S$ N) {1 v5 Z
@.CurrIcon := "load";
8 P. l4 E' G1 D GlobalDistObj := part.globDestination;
9 x2 e5 ~6 ]* h. x, Y, ~0 k assignLObj := rgmanager.rgAssignL;
3 G8 g+ U; X, `+ H row := assignLObj.getRowNo(GlobalDistObj);" E: N; W o0 U h) g2 H
if Row = -1 then -- since 70
+ ~2 u1 ~) O) D if lan=1 then6 `+ W% }2 h* W; v; D! X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% C' W* P# a4 ^# w to_str("in der Andockstation: \"",?.~.name,"\""));
! i3 l/ @5 E! q4 h; d$ d else
( V$ m/ c5 T. |* I- M% O5 J- F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 m ]! }# l' ?# Y
to_str("in docking station: \"",?.~.name,"\"")); # l" B6 A5 G7 [6 ]+ U. j' h% r# T
end;
6 V: t5 \5 j7 Y# g H else
) d" v- d0 y0 A- [$ i, b @.Destination := assignLObj[1,row];
) H! W9 K2 `, n$ j. Q# p end;
+ {2 v: J' @* [9 C7 ~- j6 D! x2 N$ r newDirection(@);- z }: w' T! `/ s" h- ~
@.HasOrder := true;
3 S" m+ A8 n- w2 W: X9 g! d) I end;
% u" J0 Y- }/ r# P' B end;! j5 d! @' `- S5 R6 @, |
end; -- of the method
' D! _! t Z. A0 {4 M4 ?7 C" S |