Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11314


Ignore:
Timestamp:
08/27/14 13:28:18 (10 years ago)
Author:
pfleck
Message:

#2208

  • Uses average distance as maximum distance when interpreting VRP as OP.
  • Add offset to "Begin" label position in visualization so that it does not overlap with the "End" label when start- and endpoint are the same.
Location:
branches/HeuristicLab.Problems.Orienteering
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs

    r11311 r11314  
    130130                graphics.FillRectangle(Brushes.Red, points[i].X - size / 2, points[i].Y - size / 2, size, size);
    131131              }
    132 
    133132              int startingPoint = Content.StartingPoint.Value;
    134133              int terminusPoint = Content.TerminusPoint.Value;
    135134              Font font = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Regular);
    136               graphics.DrawString("Begin", font, Brushes.Black, points[startingPoint].X, points[startingPoint].Y);
     135              var beginSize = graphics.MeasureString("Begin", font);
     136              graphics.DrawString("Begin", font, Brushes.Black, points[startingPoint].X - beginSize.Width, points[startingPoint].Y - beginSize.Height);
    137137              graphics.DrawString("End", font, Brushes.Black, points[terminusPoint].X, points[terminusPoint].Y);
    138138            }
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs

    r11307 r11314  
    383383      TerminusPoint = new IntValue(data.Dimension - 1); // Last city is interpreted als end point
    384384
    385       MaximumDistance = new DoubleValue(DistanceMatrix[0, data.Dimension - 1] * 10.0); // distance from start to end first to last city is interpreted as maximum distance
     385      MaximumDistance = new DoubleValue(DistanceMatrix.Average() * 5.0); // distance from start to end first to last city is interpreted as maximum distance
    386386      Scores = new DoubleArray(Enumerable.Repeat(1.0, data.Dimension).ToArray()); // all scores are 1
    387387    }
Note: See TracChangeset for help on using the changeset viewer.