Class OptionalOperatorTuningScheme

java.lang.Object
com.dna.jopt.framework.body.scheme.AbstractOptimizationScheme
com.dna.jopt.framework.body.scheme.OptionalOperatorTuningScheme
All Implemented Interfaces:
IOptimizationScheme

public class OptionalOperatorTuningScheme extends AbstractOptimizationScheme
The Class OptionalOperatorTuningScheme.

Defining the behavior of the tuner:

For testing purpose the tuner can be disabled via the boolean doOperatorTuning. A property tune can also carry the ability to deactivate operators completely in case a certain operator was not able to generate any cost improvement during the optimization run.

private boolean doOperatorTuning = true;
private boolean hasLicense2Kill = true;

Bound probability values. Probability values for the operators need to be within bounds.

double minValue = 1.0;
double maxValue = 100.0;

A score is defined partially by the number of beneficial calls and partially by the average cost reduction per call. A weightageForCost of 0.9 means 90% of the new probability is based on the cost reduction value.

double weightageForCost = 0.9;

When we assign new probability score we smooth it with the old score. For example a weightageForOldProbability of 0.3 means we take 30% of the old value and 70% of the new value

double weightageForOldProbability = 0.8;

Building the OperatorProbabilityTunerPropertyItem:

OperatorProbabilityTunerPropertyItem tunigProps = OperatorProbabilityTunerPropertyItem.builder()
.minProbabilityValue(minValue)
.maxProbabilityValue(maxValue)
.tuningWeightageForCost(weightageForCost)
.probabilityWeightageForPrevoius(weightageForOldProbability)
.canDeactivateOperators(hasLicense2Kill)
.inDebug(true)
.build();

Invoke scheme with IOptimization.setOptimizationScheme(IOptimizationScheme):

optimization.setOptimizationScheme( new OptionalOperatorTuningScheme(optimization, doOperatorTuning, tunigProps));

Since:
Oct 1, 2019
Version:
Oct 1, 2019
Author:
Jens Richter
  • Constructor Details

    • OptionalOperatorTuningScheme

      public OptionalOperatorTuningScheme(IOptimization optimization, boolean doOperatorTunig, com.dna.jopt.revision.algorithm.poststepmanagment.operatortuner.OperatorProbabilityTunerPropertyItem props)
      Instantiates a new optional operator tuning scheme.
      Parameters:
      optimization - the optimization
      doOperatorTunig - the do operator tuning
      props - the props
  • Method Details

    • create

      public void create()
      Description copied from interface: IOptimizationScheme
      Creates the defined scheme by adding the algorithms etc.