/* called by: entrance ctrl of the object 'track'( P% l8 o) Y% B" s
*/5 j, A2 u8 q R
is0 T4 P/ \- |* _- D& F/ ]% J9 ?! R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; N5 Z9 `. M: D L. X% s3 [
do
# ]7 U/ E7 O- f9 Y8 S3 { Lan := rootfolder.Internal.Tools.AOLlanguage;
( g# C |( m! j8 `$ U if current = @.Destination -- else return( \) I) m1 Q( d" G0 I
then
6 V3 N' r2 T; \! N @.Destination := void;( D% z# w: m/ d. }) `/ w4 J
if @.occupied then
3 S2 \" P4 d8 _0 j part := @.cont;4 g( b% ?: H' c8 |( n: ]6 G
@.transpOrder := void;- p8 U5 S2 T1 {# K' }( u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; [+ \& T# l3 M5 a' C7 ~1 H5 k
@,root.eventcontroller.simTime);. n8 a" L. d3 [; q# t# J; ?$ u, S
@.HasOrder := false;/ a) ]- `! Q$ y7 w/ i) f
@.DrivingHome := true;* Q; s! q8 {; d& |; A, |
rgManager.tryToStartTransOrder;
i; } K0 L2 \( @/ l" _ if @.Destination = void
$ }+ q3 g& U5 O0 U4 q then -- no transport order for vehicle @
; ]! x4 h& B" u+ ~# e @.Destination :=
: Z4 l0 m# M9 M' O7 X) t, |2 K9 c rgManager.nearestFreeStation(@,track.~);. m+ Q7 b, }+ i( }! x
newDirection(@); 2 y) ]) }' ]1 I
if @.Destination /= void then
8 A# \ R! V2 y8 a$ ?2 B @.Destination.NumReservation :=" G& {6 n1 V0 v0 y" g0 t$ x. s
@.Destination.NumReservation + 1;
+ n& }% M2 U" x/ @ end;/ e, r% `3 F+ U. A
@.CurrIcon := "drivingHome";
5 L, B: s, ?/ f3 I M @.DrivingHome := true;
- O: v; N3 W( z/ W3 Z+ F end;
" X1 O2 W. E0 L# ]9 w9 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station' O2 @7 u/ _- }$ r3 N5 C5 I0 M- ?
part := @.transpOrder;
/ v8 I' n8 n6 I4 L, ~2 s) U part.move(@);-- load part
1 v' ^$ |' G& M7 B* k2 d- A* \ @.CurrIcon := "load";$ x" m8 B- l' f8 Q( X
GlobalDistObj := part.globDestination;. w3 M0 f9 R2 F; N3 U1 r w
assignLObj := rgmanager.rgAssignL;
, E0 V; m. c( P& A row := assignLObj.getRowNo(GlobalDistObj);
& Q8 f6 O) n- h% i5 J0 p7 N if Row = -1 then -- since 700 b2 C0 x. j0 Y2 z
if lan=1 then
; i/ q: ?" l5 a1 L, a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: r3 V7 o& U W- ~: o- o# F to_str("in der Andockstation: \"",?.~.name,"\""));& t6 w# p% r/ N7 w
else
; m1 |. U' A( d" j) \) ?0 @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 m0 _; D& ?* J( Q! P to_str("in docking station: \"",?.~.name,"\""));
5 P+ q3 X8 \. f) F6 F0 x3 d) u end;! m: G" M9 @, T' e4 G
else) v3 z, H, G- ^2 A
@.Destination := assignLObj[1,row];
8 C6 w& U# j) V1 F. t end;
, J) R" Y- x y1 \/ w6 | newDirection(@);
- \2 f; l$ Y7 j: I @.HasOrder := true;
* J8 n; C' G1 g) d0 A end;
+ \; X: V# W( h' a, F, Y, c end;3 y: ?. g. o% M
end; -- of the method2 B/ D. h' }& x- v7 ]( B8 l
|