/* called by: entrance ctrl of the object 'track'
. i6 h( A: I8 v% l1 u/ m*/
' a/ N' V- e0 ^- Wis2 z# S9 Y3 F s* ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% @" L' E* w3 z* q9 V
do
* s) O4 @" g5 g Lan := rootfolder.Internal.Tools.AOLlanguage;) B; l$ j! j3 d+ F
if current = @.Destination -- else return
7 o/ o# I- u: Z4 C1 e# Y0 w% Q then# G1 A% Y( ]0 ~% n6 ~
@.Destination := void;) [+ r# {: l% d4 @* L
if @.occupied then
\% N& k" n8 p, I part := @.cont;5 S4 P7 C$ D- i* V# Y8 T
@.transpOrder := void;9 }8 c. V, }, i2 c3 D- I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& c8 S5 w3 R6 ?$ s4 s% l5 B1 U5 B
@,root.eventcontroller.simTime);
6 |7 n# N. C6 @ @.HasOrder := false;, r5 O: @2 B$ ?
@.DrivingHome := true;
1 f: O4 N) `" }( | rgManager.tryToStartTransOrder;
: X$ X. F5 U$ L. q, ^) e if @.Destination = void
7 i c# S8 H3 V* [$ s3 P4 D$ e8 l then -- no transport order for vehicle @; |$ F" A/ s+ b; t! v8 H& p- K
@.Destination :=
' b- h2 b* m. R7 O5 Q* Q4 P- z2 u# l rgManager.nearestFreeStation(@,track.~);
( B! d. x9 L- V6 c" a. i. L newDirection(@);
, ^' F$ G9 g3 E; \( q if @.Destination /= void then
. \$ z" ^- r) F; [ @.Destination.NumReservation :=
8 I# m) i S) A# |0 l9 {$ w/ o @.Destination.NumReservation + 1;) x" C3 I+ W. {1 x u
end;
: b2 T7 z/ X/ L8 ?" ^0 W- B @.CurrIcon := "drivingHome";
! n5 t' w& a8 m @.DrivingHome := true;9 S* u i7 j: Y) }( S
end;; k% v2 }0 i3 x( p7 S9 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# k* ?4 H3 E9 P part := @.transpOrder;( G, a8 y3 M9 J: p1 y- @
part.move(@);-- load part F$ [% f4 P% O4 B
@.CurrIcon := "load";
* t3 o1 ]' h& p7 [0 ]7 @ GlobalDistObj := part.globDestination;
7 Q' a0 q$ Z) \5 I; ~$ D, h& @4 F3 L; t assignLObj := rgmanager.rgAssignL;
6 x4 `% \3 H) }7 b0 p$ w3 d l row := assignLObj.getRowNo(GlobalDistObj);
+ m( I l" `# F( H$ Y8 K if Row = -1 then -- since 70: Y7 T, D3 C2 W# y4 _
if lan=1 then% c# H0 M' l2 l# E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! _% T- _ W9 T0 w7 M to_str("in der Andockstation: \"",?.~.name,"\""));
4 v- S% d5 C2 A+ p3 t& l, X7 O" T* m else8 z* B, G8 q2 Y0 J1 e+ {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; c' n8 \' F' G$ S# U* I/ c to_str("in docking station: \"",?.~.name,"\"")); w1 f2 S- c$ P' U& `3 [' ^1 N
end;7 \1 \/ M. T( s# d4 [0 M
else
! s2 N5 V' e I3 K @.Destination := assignLObj[1,row];
# s5 G6 ^ i4 A& |: E end; 0 v' W& f) {! W9 L1 V
newDirection(@);9 b% |6 r) p$ G- y% W' w" a
@.HasOrder := true;
3 k' ]4 t% N' f* Q end;) f7 e( i3 H4 Q; f/ \! c
end;
/ i6 K$ J& p0 m/ P h! v( ]4 Iend; -- of the method' r1 O$ E! F. S% J
|