/* called by: entrance ctrl of the object 'track'( A4 a: g5 W0 Q# F- S' {; \5 P, P
*/
2 s+ Z Q# a, s% w0 uis
0 T& {2 A' j7 r' E( p3 Q5 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 _, q9 M8 B" E& Ddo
- a1 h. Y8 a3 `7 n$ x Lan := rootfolder.Internal.Tools.AOLlanguage;
# j7 B: ]' I7 x0 Q; Z if current = @.Destination -- else return
8 t. O* I F' y2 }' t u" s. T% b then$ d0 \8 `7 a6 q( y2 d. n
@.Destination := void;
2 ?9 ?8 I3 s+ _) f/ U6 G if @.occupied then7 T, A9 q# p4 r! m8 `/ |& @) q
part := @.cont;
) ~$ r7 f: A) G2 z8 `7 l: T, j @.transpOrder := void;
" \2 H7 l2 \, \$ }/ x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 m3 @* m. M; L# H4 k% |
@,root.eventcontroller.simTime);
# ~ ~ Z9 Z+ t4 O* r0 [% j/ n& J @.HasOrder := false;
1 T+ P& y- n; ]1 [ @.DrivingHome := true;3 f) D/ }4 r+ i4 T N
rgManager.tryToStartTransOrder;' [) i! ^# `8 M/ o) r# Y: [
if @.Destination = void
4 E Q% f" r1 ~/ ]6 d @ then -- no transport order for vehicle @
( E8 N, i, ^6 e @.Destination :=
, u' r* s; Y* q rgManager.nearestFreeStation(@,track.~);6 u! K) w0 ~) Q
newDirection(@); $ v; C- j# P2 ?/ [" Q7 k; y1 q
if @.Destination /= void then* j3 Z8 {/ S5 K
@.Destination.NumReservation :=
- U; [( b" i- y @.Destination.NumReservation + 1;
3 Z4 E, O( \3 D, |. V3 _$ x end;1 U$ R& E5 w' \: L1 \
@.CurrIcon := "drivingHome";
* D( x. d6 i0 K* \# j @.DrivingHome := true;! s2 L% C L P
end;, E6 P4 s& Q o$ q) |! f3 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# V0 ^: C' p9 D. Z. O part := @.transpOrder;
4 p2 a4 U5 h' S6 w# R/ I. ?' G part.move(@);-- load part7 K2 W7 r4 l4 h( M9 S6 @
@.CurrIcon := "load";
8 D; n1 ]8 w2 W GlobalDistObj := part.globDestination;
. h. i. A9 {& [6 C. e assignLObj := rgmanager.rgAssignL;/ b; j( f) m) F# t' h9 Q: h
row := assignLObj.getRowNo(GlobalDistObj);
. n: ^2 E6 ^+ D y' I if Row = -1 then -- since 703 n! A- W" ?" K5 h5 e5 e4 k
if lan=1 then
5 o2 a) _4 Z, }$ ~3 k$ U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* S& u2 x, _; [, h3 u! l, x to_str("in der Andockstation: \"",?.~.name,"\""));$ T" y* ]+ R" C& r, v
else
3 R# n) e$ ^& Q# d% D7 m2 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" a) c# |0 S& U7 j4 t, { to_str("in docking station: \"",?.~.name,"\"")); ( f; m) M9 O4 x4 Q
end;
; b* g$ ^1 U p" Q7 Q else
9 ^" n, O* e: `; Y @.Destination := assignLObj[1,row];1 C" B: Q- x4 X5 i3 u
end; # W' B5 Q \! w7 ~$ b) ] h
newDirection(@);( O. J) r. z4 o& G! m1 I
@.HasOrder := true;" ~+ n+ O/ u) ]# p: b: Y" ?
end;
$ j) u" d2 _9 M* k) J end;4 M9 W h4 e( _% r% t4 [2 t0 s5 @
end; -- of the method
1 \% A" B5 n! c9 n" n% G- q5 j |