/* called by: entrance ctrl of the object 'track'
/ S# y7 J; F: I( h; G3 `*/2 s' q- u4 _2 k$ h
is. C# t% z2 r. {4 |2 ~- [" p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 X! U$ E6 R; `1 e
do
* B) y, ]- z$ `4 g6 e0 O Lan := rootfolder.Internal.Tools.AOLlanguage;# ^. W' G) A( p0 R+ Z" Y! _
if current = @.Destination -- else return; e+ A' ?" Y( b8 Q( C
then
8 ] U! B# ^$ N) X @.Destination := void;2 r, |3 C7 i0 N: l- E# ]
if @.occupied then8 E' I# o# q; M( M- w- U7 {4 Z
part := @.cont;' _' ]* R! u q# f% q0 n
@.transpOrder := void;8 G6 ]* _# a; h1 c5 p" {/ ?3 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 K! D" l% ~0 ~1 v8 J
@,root.eventcontroller.simTime);
" O4 \4 Z. t( V6 X. I& p0 Y @.HasOrder := false;0 P5 S9 b/ U8 W( t- ?7 X
@.DrivingHome := true;, Q& w* g1 ^0 \# |/ F
rgManager.tryToStartTransOrder;& {9 r0 U F% k+ S
if @.Destination = void
# ]- u9 ~4 J3 T then -- no transport order for vehicle @/ F2 }# m" l2 @8 H3 x" A
@.Destination :=+ Q" D' j4 M: K. G
rgManager.nearestFreeStation(@,track.~);* w- b1 Q1 K' j6 G
newDirection(@); 9 Q7 J' |' j9 `; y0 Y
if @.Destination /= void then- ] E5 l f9 A" F3 a7 E3 O
@.Destination.NumReservation :=
# h4 ?( J9 P+ d9 } l y0 t @.Destination.NumReservation + 1;& H6 p1 \: i6 @0 U% T& S! }+ L
end;
/ v2 ?: Z0 L7 Z @.CurrIcon := "drivingHome";0 O$ A0 \/ B: e! L
@.DrivingHome := true;
: c; t8 t( P+ W end;
3 @0 y& Z0 N6 @% ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' i* L+ Q4 |3 V+ d part := @.transpOrder;( D# R9 P9 d; g0 \: J% o7 r- u
part.move(@);-- load part/ U% J( Z$ h9 f1 o, U o
@.CurrIcon := "load";
: `6 h' _" u* `& d2 Z GlobalDistObj := part.globDestination;
* q% F q. l3 r assignLObj := rgmanager.rgAssignL;3 o8 Q( `, R7 V/ x# t, y3 n; }
row := assignLObj.getRowNo(GlobalDistObj);
* j) F. _9 p3 I; W* R! j if Row = -1 then -- since 705 h1 Z( e# b3 S, h) J: H# e
if lan=1 then3 I+ F: T E3 b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! [0 p6 D2 ?2 k- b to_str("in der Andockstation: \"",?.~.name,"\""));) w- n' L3 ^; |; ~: v7 u
else
" K* ~( D1 l5 w' p' q/ e2 {/ u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), K* N7 D0 y" \) c1 V) H6 D
to_str("in docking station: \"",?.~.name,"\"")); ' g2 L$ [/ I" ~0 T6 r8 S
end;
4 F9 K# O I$ |. f! _ else+ t9 T% F( e' I5 E6 g* {- s
@.Destination := assignLObj[1,row];6 H9 \" n' d; b" a' U+ H+ J
end; 1 ~, t7 @0 w% p" J: H. U4 I) i
newDirection(@);3 \. O k4 b9 Y1 ]4 p
@.HasOrder := true;* t c9 {) Y7 `4 t, A! @- j! o
end;4 J V6 L8 L* ]4 T) d
end;, z7 Z2 i& B r5 U/ w6 S& o3 ^% r
end; -- of the method7 i0 ]+ F# U; l5 _
|