Changeset 10298


Ignore:
Timestamp:
01/07/14 15:05:58 (6 years ago)
Author:
svonolfe
Message:

Adapted all VRP related operators to subclass InstrumentedOperator (#2119)

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/AlbaCreator.cs

    r9456 r10298  
    4545    }
    4646
    47     public override IOperation Apply() {
     47    public override IOperation InstrumentedApply() {
    4848      (VRPToursParameter.ActualValue as AlbaEncoding).Repair();
    4949
    50       return base.Apply();
     50      return base.InstrumentedApply();
    5151    }
    5252  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/RandomCreator.cs

    r9456 r10298  
    8686    }
    8787
    88     public override IOperation Apply() {
     88    public override IOperation InstrumentedApply() {
    8989      //choose default encoding here
    9090      VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(CreateSolution(), ProblemInstance);
    9191
    92       return base.Apply();
     92      return base.InstrumentedApply();
    9393    }
    9494  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaCrossover.cs

    r9456 r10298  
    5252    protected abstract AlbaEncoding Crossover(IRandom random, AlbaEncoding parent1, AlbaEncoding parent2);
    5353
    54     public override IOperation Apply() {
     54    public override IOperation InstrumentedApply() {
    5555      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    5656      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    6969      (ChildParameter.ActualValue as AlbaEncoding).Repair();
    7070
    71       return base.Apply();
     71      return base.InstrumentedApply();
    7272    }
    7373  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/LocalImprovement/AlbaLambdaInterchangeLocalImprovementOperator.cs

    r9462 r10298  
    125125    }
    126126
    127     public override IOperation Apply() {
     127    public override IOperation InstrumentedApply() {
    128128      int maxIterations = MaximumIterationsParameter.ActualValue.Value;
    129129      AlbaEncoding solution = null;
     
    146146      QualityParameter.ActualValue.Value = quality;
    147147
    148       return base.Apply();
     148      return base.InstrumentedApply();
    149149    }
    150150  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaManipulator.cs

    r9456 r10298  
    6262    }
    6363
    64     public override IOperation Apply() {
     64    public override IOperation InstrumentedApply() {
    6565      IVRPEncoding solution = VRPToursParameter.ActualValue;
    6666      if (!(solution is AlbaEncoding)) {
     
    7171      (VRPToursParameter.ActualValue as AlbaEncoding).Repair();
    7272
    73       return base.Apply();
     73      return base.InstrumentedApply();
    7474    }
    7575  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveGenerator.cs

    r9456 r10298  
    4141    }
    4242
    43     public override IOperation Apply() {
     43    public override IOperation InstrumentedApply() {
    4444      IVRPEncoding solution = VRPToursParameter.ActualValue;
    4545      if (!(solution is AlbaEncoding)) {
     
    4747      }
    4848
    49       return base.Apply();
     49      return base.InstrumentedApply();
    5050    }
    5151  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveGenerator.cs

    r9456 r10298  
    5858    protected abstract AlbaIntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance);
    5959
    60     public override IOperation Apply() {
    61       IOperation next = base.Apply();
     60    public override IOperation InstrumentedApply() {
     61      IOperation next = base.InstrumentedApply();
    6262
    6363      AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveGenerator.cs

    r9456 r10298  
    6868    protected abstract AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance, int lambda);
    6969
    70     public override IOperation Apply() {
    71       IOperation next = base.Apply();
     70    public override IOperation InstrumentedApply() {
     71      IOperation next = base.InstrumentedApply();
    7272
    7373      AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaStochasticTranslocationSingleMoveGenerator.cs

    r9456 r10298  
    6969    }
    7070
    71     public override IOperation Apply() {
    72       IOperation next = base.Apply();
     71    public override IOperation InstrumentedApply() {
     72      IOperation next = base.InstrumentedApply();
    7373
    7474      IVRPEncoding solution = VRPToursParameter.ActualValue;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs

    r9456 r10298  
    9393    }
    9494
    95     public override IOperation Apply() {
    96       IOperation next = base.Apply();
     95    public override IOperation InstrumentedApply() {
     96      IOperation next = base.InstrumentedApply();
    9797
    9898      IVRPEncoding solution = VRPToursParameter.ActualValue;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs

    r9456 r10298  
    8181    }
    8282
    83     public override IOperation Apply() {
    84       IOperation next = base.Apply();
     83    public override IOperation InstrumentedApply() {
     84      IOperation next = base.InstrumentedApply();
    8585
    8686      IVRPEncoding solution = VRPToursParameter.ActualValue;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs

    r9456 r10298  
    8181    }
    8282
    83     public override IOperation Apply() {
    84       IOperation next = base.Apply();
     83    public override IOperation InstrumentedApply() {
     84      IOperation next = base.InstrumentedApply();
    8585
    8686      IVRPEncoding solution = VRPToursParameter.ActualValue;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs

    r9456 r10298  
    8181    }
    8282
    83     public override IOperation Apply() {
    84       IOperation next = base.Apply();
     83    public override IOperation InstrumentedApply() {
     84      IOperation next = base.InstrumentedApply();
    8585
    8686      IVRPEncoding solution = VRPToursParameter.ActualValue;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/Crossovers/GVRCrossover.cs

    r9456 r10298  
    103103    }
    104104
    105     public override IOperation Apply() {
     105    public override IOperation InstrumentedApply() {
    106106      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    107107      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    117117      ChildParameter.ActualValue = Crossover(RandomParameter.ActualValue, parents[0] as GVREncoding, parents[1] as GVREncoding);
    118118
    119       return base.Apply();
     119      return base.InstrumentedApply();
    120120    }
    121121  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/Manipulators/GVRManipulator.cs

    r9456 r10298  
    4949    protected abstract void Manipulate(IRandom random, GVREncoding individual);
    5050
    51     public override IOperation Apply() {
     51    public override IOperation InstrumentedApply() {
    5252      IVRPEncoding solution = VRPToursParameter.ActualValue;
    5353      if (!(solution is GVREncoding)) {
     
    5757      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as GVREncoding);
    5858
    59       return base.Apply();
     59      return base.InstrumentedApply();
    6060    }
    6161  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/BiasedMultiVRPSolutionCrossover.cs

    r10295 r10298  
    131131      }
    132132
    133       return base.InstrumentedApply();
     133      ////////////////
     134      IRandom random = RandomParameter.ActualValue;
     135      DoubleArray probabilities = ActualProbabilitiesParameter.ActualValue;
     136      if (probabilities.Length != Operators.Count) {
     137        throw new InvalidOperationException(Name + ": The list of probabilities has to match the number of operators");
     138      }
     139      var checkedOperators = Operators.CheckedItems;
     140      if (checkedOperators.Count() > 0) {
     141        // select a random operator from the checked operators
     142        double sum = (from indexedItem in checkedOperators select probabilities[indexedItem.Index]).Sum();
     143        if (sum == 0) throw new InvalidOperationException(Name + ": All selected operators have zero probability.");
     144        double r = random.NextDouble() * sum;
     145        sum = 0;
     146        foreach (var indexedItem in checkedOperators) {
     147          sum += probabilities[indexedItem.Index];
     148          if (sum > r) {
     149            successor = indexedItem.Value;
     150            break;
     151          }
     152        }
     153      }
     154
     155      IOperation successorOp = null;
     156      if (Successor != null)
     157        successorOp = ExecutionContext.CreateOperation(Successor);
     158      OperationCollection next = new OperationCollection(successorOp);
     159      if (successor != null) {
     160        SelectedOperatorParameter.ActualValue = new StringValue(successor.Name);
     161
     162        if (CreateChildOperation)
     163          next.Insert(0, ExecutionContext.CreateChildOperation(successor));
     164        else next.Insert(0, ExecutionContext.CreateOperation(successor));
     165      } else {
     166        SelectedOperatorParameter.ActualValue = new StringValue("");
     167      }
     168
     169      return next;
    134170    }
    135171  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/RandomParentCloneCrossover.cs

    r9456 r10298  
    6565    }
    6666
    67     public override IOperation Apply() {
     67    public override IOperation InstrumentedApply() {
    6868      if (RandomParameter.ActualValue.Next() < 0.5)
    6969        ChildParameter.ActualValue = ParentsParameter.ActualValue[0].Clone() as IVRPEncoding;
     
    7171        ChildParameter.ActualValue = ParentsParameter.ActualValue[1].Clone() as IVRPEncoding;
    7272
    73       return base.Apply();
     73      return base.InstrumentedApply();
    7474    }
    7575  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/BiasedMultiVRPSolutionManipulator.cs

    r10295 r10298  
    131131      }
    132132
    133       return base.InstrumentedApply();
     133      ////////////////
     134      IRandom random = RandomParameter.ActualValue;
     135      DoubleArray probabilities = ActualProbabilitiesParameter.ActualValue;
     136      if (probabilities.Length != Operators.Count) {
     137        throw new InvalidOperationException(Name + ": The list of probabilities has to match the number of operators");
     138      }
     139      var checkedOperators = Operators.CheckedItems;
     140      if (checkedOperators.Count() > 0) {
     141        // select a random operator from the checked operators
     142        double sum = (from indexedItem in checkedOperators select probabilities[indexedItem.Index]).Sum();
     143        if (sum == 0) throw new InvalidOperationException(Name + ": All selected operators have zero probability.");
     144        double r = random.NextDouble() * sum;
     145        sum = 0;
     146        foreach (var indexedItem in checkedOperators) {
     147          sum += probabilities[indexedItem.Index];
     148          if (sum > r) {
     149            successor = indexedItem.Value;
     150            break;
     151          }
     152        }
     153      }
     154
     155      IOperation successorOp = null;
     156      if (Successor != null)
     157        successorOp = ExecutionContext.CreateOperation(Successor);
     158      OperationCollection next = new OperationCollection(successorOp);
     159      if (successor != null) {
     160        SelectedOperatorParameter.ActualValue = new StringValue(successor.Name);
     161
     162        if (CreateChildOperation)
     163          next.Insert(0, ExecutionContext.CreateChildOperation(successor));
     164        else next.Insert(0, ExecutionContext.CreateOperation(successor));
     165      } else {
     166        SelectedOperatorParameter.ActualValue = new StringValue("");
     167      }
     168
     169      return next;
    134170    }
    135171  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs

    r9456 r10298  
    5353    protected override void EvaluateMove() { }
    5454
    55     public override IOperation Apply() {
     55    public override IOperation InstrumentedApply() {
    5656      IVRPMove move = VRPMoveParameter.ActualValue as IVRPMove;
    5757
     
    5959      moveEvaluator.VRPMoveParameter.ActualName = VRPMoveParameter.Name;
    6060
    61       OperationCollection next = new OperationCollection(base.Apply());
     61      OperationCollection next = new OperationCollection(base.InstrumentedApply());
    6262      next.Insert(0, ExecutionContext.CreateOperation(moveEvaluator));
    6363
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveEvaluator.cs

    r9456 r10298  
    7676    protected abstract void EvaluateMove();
    7777
    78     public override IOperation Apply() {
     78    public override IOperation InstrumentedApply() {
    7979      EvaluateMove();
    8080
    81       return base.Apply();
     81      return base.InstrumentedApply();
    8282    }
    8383  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs

    r9456 r10298  
    9999    }
    100100
    101     public override IOperation Apply() {
     101    public override IOperation InstrumentedApply() {
    102102      PerformMove();
    103103      UpdateMoveEvaluation();
    104104
    105       return base.Apply();
     105      return base.InstrumentedApply();
    106106    }
    107107  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs

    r9456 r10298  
    140140    }
    141141
    142     public override IOperation Apply() {
     142    public override IOperation InstrumentedApply() {
    143143      VRPToursParameter.ActualValue = CreateSolution(ProblemInstance, RandomParameter.ActualValue, AdhereTimeWindowsParameter.Value.Value);
    144144
    145       return base.Apply();
     145      return base.InstrumentedApply();
    146146    }
    147147  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs

    r9456 r10298  
    373373    }
    374374
    375     public override IOperation Apply() {
     375    public override IOperation InstrumentedApply() {
    376376      VRPToursParameter.ActualValue = CreateSolution(ProblemInstance, RandomParameter.ActualValue,
    377377        Alpha.Value.Value, Beta.Value.Value, Gamma.Value.Value,
    378378        AlphaVariance.Value.Value, BetaVariance.Value.Value, GammaVariance.Value.Value);
    379379
    380       return base.Apply();
     380      return base.InstrumentedApply();
    381381    }
    382382  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinCrossover.cs

    r9456 r10298  
    144144    }
    145145
    146     public override IOperation Apply() {
     146    public override IOperation InstrumentedApply() {
    147147      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    148148      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    160160      (ChildParameter.ActualValue as PotvinEncoding).Repair();
    161161
    162       return base.Apply();
     162      return base.InstrumentedApply();
    163163    }
    164164  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinManipulator.cs

    r9456 r10298  
    8787    }
    8888
    89     public override IOperation Apply() {
     89    public override IOperation InstrumentedApply() {
    9090      IVRPEncoding solution = VRPToursParameter.ActualValue;
    9191      if (!(solution is PotvinEncoding)) {
     
    9696      (VRPToursParameter.ActualValue as PotvinEncoding).Repair();
    9797
    98       return base.Apply();
     98      return base.InstrumentedApply();
    9999    }
    100100  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinVehicleAssignmentManipulator.cs

    r9456 r10298  
    6060    }
    6161
    62     public override IOperation Apply() {
     62    public override IOperation InstrumentedApply() {
    6363      IVRPEncoding solution = VRPToursParameter.ActualValue;
    6464      if (!(solution is PotvinEncoding)) {
     
    6666      }
    6767
    68       OperationCollection next = new OperationCollection(base.Apply());
     68      OperationCollection next = new OperationCollection(base.InstrumentedApply());
    6969
    7070      VehicleAssignmentParameter.ActualValue = (VRPToursParameter.ActualValue as PotvinEncoding).VehicleAssignment;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveGenerator.cs

    r9456 r10298  
    5757    protected abstract PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
    5858
    59     public override IOperation Apply() {
    60       IOperation next = base.Apply();
     59    public override IOperation InstrumentedApply() {
     60      IOperation next = base.InstrumentedApply();
    6161
    6262      PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveGenerator.cs

    r9456 r10298  
    5757    protected abstract PotvinPDExchangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
    5858
    59     public override IOperation Apply() {
    60       IOperation next = base.Apply();
     59    public override IOperation InstrumentedApply() {
     60      IOperation next = base.InstrumentedApply();
    6161
    6262      PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveGenerator.cs

    r9456 r10298  
    5757    protected abstract PotvinPDRearrangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
    5858
    59     public override IOperation Apply() {
    60       IOperation next = base.Apply();
     59    public override IOperation InstrumentedApply() {
     60      IOperation next = base.InstrumentedApply();
    6161
    6262      PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveGenerator.cs

    r9456 r10298  
    5757    protected abstract PotvinPDShiftMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
    5858
    59     public override IOperation Apply() {
    60       IOperation next = base.Apply();
     59    public override IOperation InstrumentedApply() {
     60      IOperation next = base.InstrumentedApply();
    6161
    6262      PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveGenerator.cs

    r9456 r10298  
    4141    }
    4242
    43     public override IOperation Apply() {
     43    public override IOperation InstrumentedApply() {
    4444      IVRPEncoding solution = VRPToursParameter.ActualValue;
    4545      if (!(solution is PotvinEncoding)) {
     
    4747      }
    4848
    49       return base.Apply();
     49      return base.InstrumentedApply();
    5050    }
    5151  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveGenerator.cs

    r9456 r10298  
    5757    protected abstract PotvinTwoOptStarMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
    5858
    59     public override IOperation Apply() {
    60       IOperation next = base.Apply();
     59    public override IOperation InstrumentedApply() {
     60      IOperation next = base.InstrumentedApply();
    6161
    6262      PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveGenerator.cs

    r9456 r10298  
    5757    protected abstract PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
    5858
    59     public override IOperation Apply() {
    60       IOperation next = base.Apply();
     59    public override IOperation InstrumentedApply() {
     60      IOperation next = base.InstrumentedApply();
    6161
    6262      PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/Crossovers/PrinsCrossover.cs

    r9456 r10298  
    5151    protected abstract PrinsEncoding Crossover(IRandom random, PrinsEncoding parent1, PrinsEncoding parent2);
    5252
    53     public override IOperation Apply() {
     53    public override IOperation InstrumentedApply() {
    5454      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    5555      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    6767        Crossover(RandomParameter.ActualValue, parents[0] as PrinsEncoding, parents[1] as PrinsEncoding);
    6868
    69       return base.Apply();
     69      return base.InstrumentedApply();
    7070    }
    7171  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/Manipulators/PrinsManipulator.cs

    r9456 r10298  
    5050    protected abstract void Manipulate(IRandom random, PrinsEncoding individual);
    5151
    52     public override IOperation Apply() {
     52    public override IOperation InstrumentedApply() {
    5353      IVRPEncoding solution = VRPToursParameter.ActualValue;
    5454      if (!(solution is PrinsEncoding)) {
     
    5858      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PrinsEncoding);
    5959
    60       return base.Apply();
     60      return base.InstrumentedApply();
    6161    }
    6262  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPOperator.cs

    r9456 r10298  
    3030  [Item("VRPOperator", "Represents a VRP operator.")]
    3131  [StorableClass]
    32   public abstract class VRPOperator : SingleSuccessorOperator, IVRPOperator {
     32  public abstract class VRPOperator : InstrumentedOperator, IVRPOperator {
    3333    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
    3434      get { return (LookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuCrossover.cs

    r9456 r10298  
    5050    protected abstract ZhuEncoding Crossover(IRandom random, ZhuEncoding parent1, ZhuEncoding parent2);
    5151
    52     public override IOperation Apply() {
     52    public override IOperation InstrumentedApply() {
    5353      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    5454      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    6666        Crossover(RandomParameter.ActualValue, parents[0] as ZhuEncoding, parents[1] as ZhuEncoding);
    6767
    68       return base.Apply();
     68      return base.InstrumentedApply();
    6969    }
    7070  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Manipulators/ZhuManipulator.cs

    r9456 r10298  
    5050    protected abstract void Manipulate(IRandom random, ZhuEncoding individual);
    5151
    52     public override IOperation Apply() {
     52    public override IOperation InstrumentedApply() {
    5353      IVRPEncoding solution = VRPToursParameter.ActualValue;
    5454      if (!(solution is ZhuEncoding)) {
     
    5858      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as ZhuEncoding);
    5959
    60       return base.Apply();
     60      return base.InstrumentedApply();
    6161    }
    6262  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Improver/VRPImprovementOperator.cs

    r9456 r10298  
    7575    }
    7676
    77     public override IOperation Apply() {
     77    public override IOperation InstrumentedApply() {
    7878      var solution = SolutionParameter.ActualValue as IVRPEncoding;
    7979      var potvinSolution = solution is PotvinEncoding ? solution as PotvinEncoding : PotvinEncoding.ConvertFrom(solution, ProblemInstance);
     
    8787      LocalEvaluatedSolutions.ActualValue = new IntValue(evaluatedSolutions);
    8888
    89       return base.Apply();
     89      return base.InstrumentedApply();
    9090    }
    9191
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs

    r9456 r10298  
    128128    }
    129129
    130     public override IOperation Apply() {
     130    public override IOperation InstrumentedApply() {
    131131      InitResultParameters();
    132132
     
    140140      QualityParameter.ActualValue = new DoubleValue(evaluation.Quality);
    141141
    142       return base.Apply();
     142      return base.InstrumentedApply();
    143143    }
    144144
Note: See TracChangeset for help on using the changeset viewer.