/* called by: entrance ctrl of the object 'track'$ N1 y9 R, e8 V- Y R; l4 L
*/
9 Y- r+ w" h+ f ]9 S8 u5 Bis) A4 z0 ^- D8 ]! d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- H( |* g% v% q: n. M7 H( F9 H
do
. Y/ s0 u% A. m) W7 p, u Lan := rootfolder.Internal.Tools.AOLlanguage;( |+ U" T- T0 P5 {5 s9 T/ n
if current = @.Destination -- else return
- A+ a3 b4 E; f5 _( X then
& O [% E8 ]. ~) K" j @.Destination := void;0 N: |: v" i+ | h
if @.occupied then1 D9 _6 s9 i& i7 i& l
part := @.cont;
: d1 b0 r- ?! u& ? @.transpOrder := void;
G7 T) ^: y. P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( Z' a' p/ I b
@,root.eventcontroller.simTime);
2 w j4 l9 z9 Y) o( [2 F' H @.HasOrder := false;
' Z( o" K4 g0 Z7 Q. ^, g _ @.DrivingHome := true;
% E$ T4 B6 C1 h& N rgManager.tryToStartTransOrder;
6 A& J2 I; F& f8 S+ S3 {3 A if @.Destination = void0 X% a3 J* a' \& f$ D
then -- no transport order for vehicle @
# w* ^4 V7 t- I% W) g @.Destination :=
0 ~7 l8 o# ?9 [7 w( L8 _) p rgManager.nearestFreeStation(@,track.~);4 p3 O- S+ O7 V% M6 j. P Q7 K5 A
newDirection(@); / Z( l) e" V, j1 h' x$ v' m
if @.Destination /= void then5 [5 V* a6 Z; b
@.Destination.NumReservation :=
; D, |% V2 K* Q2 z# h @.Destination.NumReservation + 1;
# c7 ]2 y. Q5 i5 Z$ [1 k0 {+ Q; b+ j end;
6 r* z: G6 C* l @.CurrIcon := "drivingHome";7 X0 j# t$ T; S. J, r
@.DrivingHome := true;
5 @; B) Y& o6 U/ ~' j' A, d; E6 D. v end;
- H' @0 X0 {: d4 | else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 P' x! @* J/ g# ~; l! ?: ~ part := @.transpOrder;& f( r- y5 I/ x' W' h- c
part.move(@);-- load part
1 Y: w$ ]! j1 J, } @.CurrIcon := "load";4 [/ ]6 h; K- V' X4 T
GlobalDistObj := part.globDestination;
2 J9 i5 E- Z/ L& F. q assignLObj := rgmanager.rgAssignL;
& g& p7 H: v. ~# I6 ~8 l row := assignLObj.getRowNo(GlobalDistObj);5 E' d5 R, |/ i( P3 Z& W, B# V1 W
if Row = -1 then -- since 70
, ?- k- k8 a8 S( l: n; ] if lan=1 then* N2 A, V x ]' c! [2 |' @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" U& F$ Q; W" W( {$ J to_str("in der Andockstation: \"",?.~.name,"\""));* d5 W5 i+ B! V$ W5 k$ T2 ]
else: ?) o6 ~ y9 G8 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" I9 p, v7 e4 A- T7 R8 H1 p( j to_str("in docking station: \"",?.~.name,"\"")); 7 D: s# J( L1 u8 g2 X) I1 g
end;, v5 A* ~; l9 J
else/ C8 s. }8 A2 z+ x Q
@.Destination := assignLObj[1,row];3 j7 O2 q1 x$ b+ M& ^
end; 7 ~$ o- p3 g/ q8 U0 S
newDirection(@);% o( ?, ]+ f G8 t
@.HasOrder := true;6 [. O3 r$ j; a; `' f
end;8 _7 Y Y2 P4 i; D9 E2 r
end;
! C4 R' R8 p0 c+ N' hend; -- of the method
$ x% B; F9 E, s* B* C |