Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/15 17:16:39 (9 years ago)
Author:
apolidur
Message:

#2221: Local improvement operator for VNS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs

    r12219 r12228  
    5656      Operators.Add(new PTSPEstimatedInversionMovePathEvaluator());
    5757      Operators.Add(new PTSPEstimatedInsertionEvaluator());
     58      Operators.Add(new PTSPExhaustiveInversionLocalImprovement());
     59      Operators.Add(new PTSPExhaustiveInsertionLocalImprovement());
    5860      Encoding.ConfigureOperators(Operators.OfType<IOperator>());
    5961    }
     
    6870        realizations.Add(new ItemList<IntValue>());
    6971        for (int j = 0; j < data.Dimension; j++) {
    70           if (ProbabilityMatrix[j].Value > r.NextDouble()) {
     72          if (ProbabilityMatrix[j] > r.NextDouble()) {
    7173            realizations.ElementAt(i).Add(new IntValue(1));
    7274          } else {
     
    7678       
    7779      }
     80
    7881      foreach (var op in Operators.OfType<PTSPPathMoveEvaluator>()) {
     82        op.RealizationsParameter.Value = realizations;
     83      }
     84      foreach (var op in Operators.OfType<PTSPExhaustiveInversionLocalImprovement>()) {
    7985        op.RealizationsParameter.Value = realizations;
    8086      }
Note: See TracChangeset for help on using the changeset viewer.