/* called by: entrance ctrl of the object 'track'* V) ?& M4 m4 F3 i- u
*/& t# Q N) r- C9 T' M
is
4 a! N8 @! L6 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;& I1 t9 B: [0 R6 t( L% x, H
do: A' E* k* a( }) S- a+ |. H/ Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ F5 b( H/ S3 t if current = @.Destination -- else return2 N5 [; R4 q& U
then: x: j# k6 m' h' H( z
@.Destination := void;! q" C7 G" c' E3 P3 P
if @.occupied then
( T5 k: ^' Q" R part := @.cont;4 B$ v+ J6 I7 x9 r7 R! z, f
@.transpOrder := void;
2 H# p6 s* }9 e7 C: |5 {5 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: G( s/ ?; I D2 ^* _ @,root.eventcontroller.simTime);4 \0 s# v" R1 \/ F- d
@.HasOrder := false;
: N$ e* W" z6 d) C9 t @.DrivingHome := true;, T9 F7 u, Q; o. f3 f. g
rgManager.tryToStartTransOrder;7 a+ V4 K, ^+ F$ {% l7 R6 A
if @.Destination = void/ D% Y# ?1 V5 U% V: S: ?2 T6 r0 W+ C
then -- no transport order for vehicle @
: f2 R3 q+ Z+ }8 _* Z. B @.Destination :=7 d% M- F+ Z8 t) j$ W& V
rgManager.nearestFreeStation(@,track.~);
. A9 G. H( F' Z, L) u, S, C5 q, q newDirection(@); - I+ Z. z- f) ^" n% W- ]7 ~
if @.Destination /= void then
2 k) C3 N, V- \: O1 F @.Destination.NumReservation :=* E k( ]% c/ z8 \* m6 S
@.Destination.NumReservation + 1;
" X! b- j, Y: X' X end;
4 S$ p! K3 n/ \, o) m9 |8 B @.CurrIcon := "drivingHome";4 D$ Y- x# j3 C8 Z% [
@.DrivingHome := true;
` x+ d! _1 t9 }/ [ r end;
7 P" G/ }/ l: m* T t S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 e2 k: V; Y- T: l part := @.transpOrder;
1 M3 [/ a3 s- x% L part.move(@);-- load part
# p0 A2 @ w; [5 Q5 a' W! Q; b @.CurrIcon := "load";
1 Y+ [5 J/ g; Q' Q GlobalDistObj := part.globDestination;3 u% g" Y; F$ u" x, h, B6 R' h
assignLObj := rgmanager.rgAssignL;* q: x* m: ?2 R& H$ t
row := assignLObj.getRowNo(GlobalDistObj);& ~- T3 _! m1 x w0 @5 ?+ H; R9 ^) U+ t
if Row = -1 then -- since 70
. y/ C* B/ z4 z. L0 M9 K" c3 W; h if lan=1 then; ^! d& E$ N5 W9 x7 T" A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 A/ d; s; D4 l& M* [( p. _ to_str("in der Andockstation: \"",?.~.name,"\""));
- H0 [" c1 v7 p' m else! s! y- l- r1 U5 J3 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( F2 g3 o2 N6 K to_str("in docking station: \"",?.~.name,"\""));
0 D \( ~- D6 V& D9 f end;
9 }* c; O/ e2 j else/ R7 X/ d' s* D- R
@.Destination := assignLObj[1,row];3 ]+ ]% A% X1 |8 b/ y5 c% u8 Z
end; & G- s" W0 ^% y+ O- C# T2 v
newDirection(@);% n% g0 B3 N, }
@.HasOrder := true;
* g0 v4 s. G# h+ |2 @# i6 @ end;
) c& a8 Q* W2 l" t end;: R6 V2 R4 Z: W# W4 v0 r% p7 R; N
end; -- of the method' i+ `! k$ R& p1 s8 i/ t/ |7 Z N
|