Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11319


Ignore:
Timestamp:
09/01/14 10:03:12 (10 years ago)
Author:
pfleck
Message:

#2208 Renamed TerminusPoint to TerminalPoint

Location:
branches/HeuristicLab.Problems.Orienteering
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/SchildeInstanceProvider.cs

    r11299 r11319  
    9696        MaximumDistance = parser.UpperBoundConstraint,
    9797        StartingPoint = parser.StartingPoint,
    98         TerminusPoint = parser.TerminusPoint,
     98        TerminalPoint = parser.TerminalPoint,
    9999        Scores = Enumerable.Range(0, parser.Scores.GetLength(0)).Select(i => parser.Scores[i, 0]).ToArray()
    100100      };
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/SchildeParser.cs

    r11299 r11319  
    3737    public double[,] Scores { get; private set; }
    3838    public int StartingPoint { get; private set; }
    39     public int TerminusPoint { get; private set; }
     39    public int TerminalPoint { get; private set; }
    4040    public double UpperBoundConstraint { get; private set; }
    4141    public double LowerConstraint { get; private set; }
     
    4949      Scores = null;
    5050      StartingPoint = 0;
    51       TerminusPoint = 0;
     51      TerminalPoint = 0;
    5252      UpperBoundConstraint = 0.0;
    5353      LowerConstraint = 0.0;
     
    222222          // Remove the 'e,'
    223223          inputString = inputString.Remove(0, inputString.IndexOf(',') + 1);
    224           TerminusPoint = int.Parse(inputString, FormatProvider);
     224          TerminalPoint = int.Parse(inputString, FormatProvider);
    225225          break;
    226226
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances/3.3/Types/OPData.cs

    r11260 r11319  
    4545    /// Index of the ending point.
    4646    /// </summary>
    47     public int TerminusPoint { get; set; }
     47    public int TerminalPoint { get; set; }
    4848  }
    4949}
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.cs

    r11311 r11319  
    4141      Content.CoordinatesParameter.ValueChanged -= new EventHandler(CoordinatesParameter_ValueChanged);
    4242      Content.StartingPointParameter.ValueChanged -= new EventHandler(StartingPointParameter_ValueChanged);
    43       Content.TerminusPointParameter.ValueChanged -= new EventHandler(TerminusPointParameter_ValueChanged);
     43      Content.TerminalPointParameter.ValueChanged -= new EventHandler(TerminalPointParameter_ValueChanged);
    4444      Content.ScoresParameter.ValueChanged -= new EventHandler(ScoresParameter_ValueChanged);
    4545      Content.BestKnownQualityParameter.ValueChanged -= new EventHandler(BestKnownQualityParameter_ValueChanged);
     
    5151      Content.CoordinatesParameter.ValueChanged += new EventHandler(CoordinatesParameter_ValueChanged);
    5252      Content.StartingPointParameter.ValueChanged += new EventHandler(StartingPointParameter_ValueChanged);
    53       Content.TerminusPointParameter.ValueChanged += new EventHandler(TerminusPointParameter_ValueChanged);
     53      Content.TerminalPointParameter.ValueChanged += new EventHandler(TerminalPointParameter_ValueChanged);
    5454      Content.ScoresParameter.ValueChanged += new EventHandler(ScoresParameter_ValueChanged);
    5555      Content.BestKnownQualityParameter.ValueChanged += new EventHandler(BestKnownQualityParameter_ValueChanged);
     
    6363      } else {
    6464        orienteeringSolutionView.Content = new OrienteeringSolution(
    65           Content.BestKnownSolution, Content.Coordinates, Content.StartingPoint, Content.TerminusPoint, Content.Scores, Content.BestKnownQuality, penalty: null);
     65          Content.BestKnownSolution, Content.Coordinates, Content.StartingPoint, Content.TerminalPoint, Content.Scores, Content.BestKnownQuality, penalty: null);
    6666      }
    6767    }
     
    7878      orienteeringSolutionView.Content.StartingPoint = Content.StartingPoint;
    7979    }
    80     private void TerminusPointParameter_ValueChanged(object sender, EventArgs e) {
    81       orienteeringSolutionView.Content.TerminusPoint = Content.TerminusPoint;
     80    private void TerminalPointParameter_ValueChanged(object sender, EventArgs e) {
     81      orienteeringSolutionView.Content.TerminalPoint = Content.TerminalPoint;
    8282    }
    8383    private void ScoresParameter_ValueChanged(object sender, EventArgs e) {
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs

    r11314 r11319  
    4545      Content.CoordinatesChanged -= new EventHandler(Content_CoordinatesChanged);
    4646      Content.StartingPointChanged -= new EventHandler(Content_StartingPointChanged);
    47       Content.TerminusPointChanged -= new EventHandler(Content_TerminusPointChanged);
     47      Content.TerminalPointChanged -= new EventHandler(Content_TerminalPointChanged);
    4848      Content.ScoresChanged -= new EventHandler(Content_ScoresChanged);
    4949      Content.IntegerVectorChanged -= new EventHandler(Content_IntegerVectorChanged);
     
    5656      Content.CoordinatesChanged += new EventHandler(Content_CoordinatesChanged);
    5757      Content.StartingPointChanged += new EventHandler(Content_StartingPointChanged);
    58       Content.TerminusPointChanged += new EventHandler(Content_TerminusPointChanged);
     58      Content.TerminalPointChanged += new EventHandler(Content_TerminalPointChanged);
    5959      Content.ScoresChanged += new EventHandler(Content_ScoresChanged);
    6060      Content.IntegerVectorChanged += new EventHandler(Content_IntegerVectorChanged);
     
    131131              }
    132132              int startingPoint = Content.StartingPoint.Value;
    133               int terminusPoint = Content.TerminusPoint.Value;
     133              int terminalPoint = Content.TerminalPoint.Value;
    134134              Font font = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Regular);
    135135              var beginSize = graphics.MeasureString("Begin", font);
    136136              graphics.DrawString("Begin", font, Brushes.Black, points[startingPoint].X - beginSize.Width, points[startingPoint].Y - beginSize.Height);
    137               graphics.DrawString("End", font, Brushes.Black, points[terminusPoint].X, points[terminusPoint].Y);
     137              graphics.DrawString("End", font, Brushes.Black, points[terminalPoint].X, points[terminalPoint].Y);
    138138            }
    139139          } else {
     
    175175        GenerateImage();
    176176    }
    177     private void Content_TerminusPointChanged(object sender, EventArgs e) {
    178       if (InvokeRequired)
    179         Invoke(new EventHandler(Content_TerminusPointChanged), sender, e);
     177    private void Content_TerminalPointChanged(object sender, EventArgs e) {
     178      if (InvokeRequired)
     179        Invoke(new EventHandler(Content_TerminalPointChanged), sender, e);
    180180      else
    181181        GenerateImage();
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Analyzers/BestOrienteeringSolutionAnalyser.cs

    r11311 r11319  
    4545      get { return (ILookupParameter<IntValue>)Parameters["StartingPoint"]; }
    4646    }
    47     public ILookupParameter<IntValue> TerminusPointParameter {
    48       get { return (ILookupParameter<IntValue>)Parameters["TerminusPoint"]; }
     47    public ILookupParameter<IntValue> TerminalPointParameter {
     48      get { return (ILookupParameter<IntValue>)Parameters["TerminalPoint"]; }
    4949    }
    5050    public ILookupParameter<DoubleArray> ScoresParameter {
     
    8585      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the points."));
    8686      Parameters.Add(new LookupParameter<IntValue>("StartingPoint", "Index of the starting point."));
    87       Parameters.Add(new LookupParameter<IntValue>("TerminusPoint", "Index of the ending point."));
     87      Parameters.Add(new LookupParameter<IntValue>("TerminalPoint", "Index of the ending point."));
    8888      Parameters.Add(new LookupParameter<DoubleArray>("Scores", "The scores of the points."));
    8989      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the Orienteering solutions which should be analyzed."));
     
    114114      var coordinates = CoordinatesParameter.ActualValue;
    115115      var startingPoint = StartingPointParameter.ActualValue;
    116       var terminusPoint = TerminusPointParameter.ActualValue;
     116      var terminalPoint = TerminalPointParameter.ActualValue;
    117117      var scores = ScoresParameter.ActualValue;
    118118      if (solution == null) {
     
    121121          coordinates,
    122122          startingPoint,
    123           terminusPoint,
     123          terminalPoint,
    124124          scores,
    125125          new DoubleValue(qualities[bestIndex].Value),
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs

    r11307 r11319  
    5252      get { return (ILookupParameter<IntValue>)Parameters["StartingPoint"]; }
    5353    }
    54     public ILookupParameter<IntValue> TerminusPointParameter {
    55       get { return (ILookupParameter<IntValue>)Parameters["TerminusPoint"]; }
     54    public ILookupParameter<IntValue> TerminalPointParameter {
     55      get { return (ILookupParameter<IntValue>)Parameters["TerminalPoint"]; }
    5656    }
    5757    public ILookupParameter<DoubleValue> FixedPenaltyParameter {
     
    7272      Parameters.Add(new LookupParameter<DoubleValue>("MaximumDistance", "The maximum distance constraint for a Orienteering solution."));
    7373      Parameters.Add(new LookupParameter<IntValue>("StartingPoint", "Index of the starting point."));
    74       Parameters.Add(new LookupParameter<IntValue>("TerminusPoint", "Index of the ending point."));
     74      Parameters.Add(new LookupParameter<IntValue>("TerminalPoint", "Index of the ending point."));
    7575      Parameters.Add(new LookupParameter<DoubleValue>("FixedPenalty", "The penalty for each visited vertex."));
    7676    }
     
    8282    protected override IntegerVector Create(IRandom _, IntValue __, IntMatrix ___) {
    8383      int startPoint = StartingPointParameter.ActualValue.Value;
    84       int endPoint = TerminusPointParameter.ActualValue.Value;
     84      int endPoint = TerminalPointParameter.ActualValue.Value;
    8585      int numPoints = ScoresParameter.ActualValue.Length;
    8686      var distances = DistanceMatrixParameter.ActualValue;
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Improvers/OrienteeringLocalImprovementOperator.cs

    r11307 r11319  
    5555      get { return (ILookupParameter<IntValue>)Parameters["StartingPoint"]; }
    5656    }
    57     public ILookupParameter<IntValue> TerminusPointParameter {
    58       get { return (ILookupParameter<IntValue>)Parameters["TerminusPoint"]; }
     57    public ILookupParameter<IntValue> TerminalPointParameter {
     58      get { return (ILookupParameter<IntValue>)Parameters["TerminalPoint"]; }
    5959    }
    6060    public ILookupParameter<DoubleValue> FixedPenaltyParameter {
     
    9898      Parameters.Add(new LookupParameter<DoubleValue>("MaximumDistance", "The maximum distance constraint for a Orienteering solution."));
    9999      Parameters.Add(new LookupParameter<IntValue>("StartingPoint", "Index of the starting point."));
    100       Parameters.Add(new LookupParameter<IntValue>("TerminusPoint", "Index of the ending point."));
     100      Parameters.Add(new LookupParameter<IntValue>("TerminalPoint", "Index of the ending point."));
    101101      Parameters.Add(new LookupParameter<DoubleValue>("FixedPenalty", "The penalty for each visited vertex."));
    102102
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs

    r11316 r11319  
    5555      get { return (ValueParameter<IntValue>)Parameters["StartingPoint"]; }
    5656    }
    57     public ValueParameter<IntValue> TerminusPointParameter {
    58       get { return (ValueParameter<IntValue>)Parameters["TerminusPoint"]; }
     57    public ValueParameter<IntValue> TerminalPointParameter {
     58      get { return (ValueParameter<IntValue>)Parameters["TerminalPoint"]; }
    5959    }
    6060    public ValueParameter<DoubleValue> MaximumDistanceParameter {
     
    8686      set { StartingPointParameter.Value = value; }
    8787    }
    88     public IntValue TerminusPoint {
    89       get { return TerminusPointParameter.Value; }
    90       set { TerminusPointParameter.Value = value; }
     88    public IntValue TerminalPoint {
     89      get { return TerminalPointParameter.Value; }
     90      set { TerminalPointParameter.Value = value; }
    9191    }
    9292    public DoubleValue MaximumDistance {
     
    127127      Parameters.Add(new ValueParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the points."));
    128128      Parameters.Add(new ValueParameter<IntValue>("StartingPoint", "Index of the starting point.", new IntValue(0)));
    129       Parameters.Add(new ValueParameter<IntValue>("TerminusPoint", "Index of the ending point.", new IntValue(0)));
     129      Parameters.Add(new ValueParameter<IntValue>("TerminalPoint", "Index of the ending point.", new IntValue(0)));
    130130      Parameters.Add(new ValueParameter<DoubleValue>("MaximumDistance", "The maximum distance constraint for a Orienteering solution."));
    131131      Parameters.Add(new ValueParameter<DoubleArray>("Scores", "The scores of the points."));
     
    186186    }
    187187
    188     private void TerminusPointParameter_ValueChanged(object sender, EventArgs e) {
     188    private void TerminalPointParameter_ValueChanged(object sender, EventArgs e) {
    189189      ParameterizeEvaluator();
    190190      ParameterizeAnalyzer();
     
    226226
    227227      StartingPointParameter.ValueChanged += StartingPointParameter_ValueChanged;
    228       TerminusPointParameter.ValueChanged += TerminusPointParameter_ValueChanged;
     228      TerminalPointParameter.ValueChanged += TerminalPointParameter_ValueChanged;
    229229      MaximumDistanceParameter.ValueChanged += MaximumDistanceParameter_ValueChanged;
    230230
     
    241241        creator.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name;
    242242        creator.StartingPointParameter.ActualName = StartingPointParameter.Name;
    243         creator.TerminusPointParameter.ActualName = TerminusPointParameter.Name;
     243        creator.TerminalPointParameter.ActualName = TerminalPointParameter.Name;
    244244        creator.FixedPenaltyParameter.ActualName = FixedPenaltyParameter.Name;
    245245      }
     
    280280        op.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name;
    281281        op.StartingPointParameter.ActualName = StartingPointParameter.Name;
    282         op.TerminusPointParameter.ActualName = TerminusPointParameter.Name;
     282        op.TerminalPointParameter.ActualName = TerminalPointParameter.Name;
    283283        op.FixedPenaltyParameter.ActualName = FixedPenaltyParameter.Name;
    284284      }
     
    289289        op.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name;
    290290        op.StartingPointParameter.ActualName = StartingPointParameter.Name;
    291         op.TerminusPointParameter.ActualName = TerminusPointParameter.Name;
     291        op.TerminalPointParameter.ActualName = TerminalPointParameter.Name;
    292292        op.FixedPenaltyParameter.ActualName = FixedPenaltyParameter.Name;
    293293      }
     
    334334
    335335      StartingPoint.Value = 0;
    336       TerminusPoint.Value = 20;
     336      TerminalPoint.Value = 20;
    337337      MaximumDistance.Value = 30;
    338338
     
    360360
    361361      StartingPoint = new IntValue(data.StartingPoint);
    362       TerminusPoint = new IntValue(data.TerminusPoint);
     362      TerminalPoint = new IntValue(data.TerminalPoint);
    363363
    364364      MaximumDistance = new DoubleValue(data.MaximumDistance);
     
    386386
    387387      StartingPoint = new IntValue(0); // First city is interpreted as start point
    388       TerminusPoint = new IntValue(data.Dimension - 1); // Last city is interpreted als end point
     388      TerminalPoint = new IntValue(data.Dimension - 1); // Last city is interpreted als end point
    389389
    390390      MaximumDistance = new DoubleValue(DistanceMatrix.Average() * 5.0); // distance from start to end first to last city is interpreted as maximum distance
     
    411411
    412412      StartingPoint = new IntValue(0); // Depot is interpreted as start point
    413       TerminusPoint = new IntValue(0); // Depot is interpreted als end point
     413      TerminalPoint = new IntValue(0); // Depot is interpreted als end point
    414414
    415415      MaximumDistance = new DoubleValue(data.Capacity * 2); // capacity is interpreted as max distance
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringSolution.cs

    r11311 r11319  
    5555    }
    5656    [Storable]
    57     private IntValue terminusPoint;
    58     public IntValue TerminusPoint {
    59       get { return terminusPoint; }
    60       set {
    61         if (terminusPoint != value) {
    62           if (terminusPoint != null) DeregisterTerminusPointEvents();
    63           terminusPoint = value;
    64           if (terminusPoint != null) RegisterTerminusPointEvents();
    65           OnTerminusPointChanged();
     57    private IntValue terminalPoint;
     58    public IntValue TerminalPoint {
     59      get { return terminalPoint; }
     60      set {
     61        if (terminalPoint != value) {
     62          if (terminalPoint != null) DeregisterTerminalPointEvents();
     63          terminalPoint = value;
     64          if (terminalPoint != null) RegisterTerminalPointEvents();
     65          OnTerminalPointChanged();
    6666        }
    6767      }
     
    118118      Initialize();
    119119    }
    120     public OrienteeringSolution(IntegerVector integerVector, DoubleMatrix coordinates, IntValue startingPoint, IntValue terminusPoint,
     120    public OrienteeringSolution(IntegerVector integerVector, DoubleMatrix coordinates, IntValue startingPoint, IntValue terminalPoint,
    121121      DoubleArray scores, DoubleValue quality, DoubleValue penalty)
    122122      : base() {
     
    124124      this.coordinates = coordinates;
    125125      this.startingPoint = startingPoint;
    126       this.terminusPoint = terminusPoint;
     126      this.terminalPoint = terminalPoint;
    127127      this.scores = scores;
    128128      this.quality = quality;
     
    144144      if (coordinates != null) RegisterCoordinatesEvents();
    145145      if (startingPoint != null) RegisterStartingPointEvents();
    146       if (terminusPoint != null) RegisterTerminusPointEvents();
     146      if (terminalPoint != null) RegisterTerminalPointEvents();
    147147      if (scores != null) RegisterScoresEvents();
    148148      if (quality != null) RegisterQualityEvents();
     
    172172    }
    173173
    174     public event EventHandler TerminusPointChanged;
    175     private void OnTerminusPointChanged() {
    176       var changed = TerminusPointChanged;
     174    public event EventHandler TerminalPointChanged;
     175    private void OnTerminalPointChanged() {
     176      var changed = TerminalPointChanged;
    177177      if (changed != null)
    178178        changed(this, EventArgs.Empty);
     
    222222      StartingPoint.ValueChanged -= new EventHandler(StartingPoint_ValueChanged);
    223223    }
    224     private void RegisterTerminusPointEvents() {
    225       TerminusPoint.ValueChanged += new EventHandler(TerminusPoint_ValueChanged);
    226     }
    227     private void DeregisterTerminusPointEvents() {
    228       TerminusPoint.ValueChanged -= new EventHandler(TerminusPoint_ValueChanged);
     224    private void RegisterTerminalPointEvents() {
     225      TerminalPoint.ValueChanged += new EventHandler(TerminalPoint_ValueChanged);
     226    }
     227    private void DeregisterTerminalPointEvents() {
     228      TerminalPoint.ValueChanged -= new EventHandler(TerminalPoint_ValueChanged);
    229229    }
    230230    private void RegisterScoresEvents() {
     
    264264      OnStartingPointChanged();
    265265    }
    266     private void TerminusPoint_ValueChanged(object sender, EventArgs e) {
    267       OnTerminusPointChanged();
     266    private void TerminalPoint_ValueChanged(object sender, EventArgs e) {
     267      OnTerminalPointChanged();
    268268    }
    269269    private void Scores_ItemChanged(object sender, EventArgs<int> e) {
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs

    r11307 r11319  
    6767      get { return (ILookupParameter<IntValue>)Parameters["StartingPoint"]; }
    6868    }
    69     public ILookupParameter<IntValue> TerminusPointParameter {
    70       get { return (ILookupParameter<IntValue>)Parameters["TerminusPoint"]; }
     69    public ILookupParameter<IntValue> TerminalPointParameter {
     70      get { return (ILookupParameter<IntValue>)Parameters["TerminalPoint"]; }
    7171    }
    7272    public ILookupParameter<DistanceMatrix> DistanceMatrixParameter {
     
    9898      Parameters.Add(new LookupParameter<DoubleValue>("MaximumDistance", "The maximum distance constraint for a Orienteering solution."));
    9999      Parameters.Add(new LookupParameter<IntValue>("StartingPoint", "Index of the starting point."));
    100       Parameters.Add(new LookupParameter<IntValue>("TerminusPoint", "Index of the ending point."));
     100      Parameters.Add(new LookupParameter<IntValue>("TerminalPoint", "Index of the ending point."));
    101101      Parameters.Add(new LookupParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the points."));
    102102      Parameters.Add(new LookupParameter<DoubleArray>("Scores", "The scores of the points."));
     
    115115      var scores = ScoresParameter.ActualValue;
    116116      var startingPoint = StartingPointParameter.ActualValue.Value;
    117       var terminusPoint = TerminusPointParameter.ActualValue.Value;
     117      var terminalPoint = TerminalPointParameter.ActualValue.Value;
    118118      var fixedPenalty = FixedPenaltyParameter.ActualValue.Value;
    119119      double maxDistance = MaximumDistanceParameter.ActualValue.Value;
     
    139139          from point in Enumerable.Range(0, numPoints)
    140140          // Calculate the distance when going from the starting point to this point and then to the end point
    141           let distance = distances[startingPoint, point] + distances[point, terminusPoint] + fixedPenalty
     141          let distance = distances[startingPoint, point] + distances[point, terminalPoint] + fixedPenalty
    142142          // If this distance is feasible and the point is neither starting nor ending point, check the point
    143           where distance < maxDistance && point != startingPoint && point != terminusPoint
     143          where distance < maxDistance && point != startingPoint && point != terminalPoint
    144144          // The point was not yet visited, so add it to the candidate list
    145145          where !initialTour.Contains(point)
Note: See TracChangeset for help on using the changeset viewer.