public class OptionalOperatorTuningScheme extends AbstractOptimizationScheme
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()
Invoke scheme with
new OptionalOperatorTuningScheme(optimization, doOperatorTuning, tunigProps));
|Constructor and Description|
Instantiates a new optional operator tuning scheme.
|Modifier and Type||Method and Description|
Creates the defined scheme by adding the algorithms etc.
attachCustomNodeLevelRestriction, attachCustomRouteLevelRestriction, getAssessorJobRestrictions, getAssessorMultiRouteRestrictions, getAssessorNodeRestrictions, getAssessorRouteRestrictions, getAutoFilter, getCostAssessor, getOptimization, getOptimizationAlgorithms, initAssessor, postCreate, setAutoFilter, setCostAssessor, setOptimizationAlgorithms
public OptionalOperatorTuningScheme(IOptimization optimization, boolean doOperatorTunig, com.dna.jopt.revision.algorithm.poststepmanagment.operatortuner.OperatorProbabilityTunerPropertyItem props)
optimization- the optimization
doOperatorTunig- the do operator tuning
props- the props
public void create()
Copyright © 2017–2022 DNA Evolutions GmbH. All rights reserved.