public class DifferentiableOperationMinimizer
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
DifferentiableOperationMinimizer(DifferentiableOperation operation,
java.util.List<BoundedDifferentiableVariable> variables)
Constructor with max evaluations of one
|
DifferentiableOperationMinimizer(DifferentiableOperation operation,
java.util.List<BoundedDifferentiableVariable> variables,
int maxEvaluations)
Primary Constructor
|
Modifier and Type | Method and Description |
---|---|
xal.tools.math.differential.Trial |
findNextRandomTrialWithPowerDistribution(xal.tools.math.differential.Trial initialTrial,
int evaluations)
find the next random trial with the default power distribution
|
xal.tools.math.differential.Trial |
findNextRandomTrialWithPowerDistribution(xal.tools.math.differential.Trial initialTrial,
int evaluations,
double power)
find the next random trial with the specified power distribution
|
xal.tools.math.differential.Trial |
findNextTrial(xal.tools.math.differential.Trial initialTrial,
int evaluations)
determine the next trial to evaluate
|
xal.tools.math.differential.Trial |
findNextTrialAlongGradient(xal.tools.math.differential.Trial initialTrial,
int evaluations,
double step,
double[] gradient)
find the next trial taking the specified step along the gradient
|
double |
getBestPenalty()
Get the penalty for the best solution
|
double |
getBestVariableValue(BoundedDifferentiableVariable variable)
Get the best solution value for the specified variable
|
DifferentiableVariableValues |
getBestVariableValueMap()
Get the best solution variable value map
|
static DifferentiableOperationMinimizer |
getInstance(DifferentiableOperation operation,
BoundedDifferentiableVariable... variables)
Construct a minimizer from the operation and the variables to explore
|
int |
getMaxEvaluations()
Get the maximum number of iterations to evaluate the operation
|
double |
getMaxSearchStep(xal.tools.math.differential.TrialPoint initialPoint,
double[] gradient)
get the maximum search step along the gradient
|
double |
getPenalty(xal.tools.math.differential.TrialPoint point)
evaluate the operation to minimize at the specified trial point
|
void |
reset()
reset this minimizer
|
void |
run()
run the optimization
|
void |
run(int maxEvaluations)
set the maximum number of evaluations and run the optimization
|
void |
setMaxEvaluations(int evaluations)
set the maximum number of evaluations of the penalty operation
|
public DifferentiableOperationMinimizer(DifferentiableOperation operation, java.util.List<BoundedDifferentiableVariable> variables, int maxEvaluations)
public DifferentiableOperationMinimizer(DifferentiableOperation operation, java.util.List<BoundedDifferentiableVariable> variables)
public static DifferentiableOperationMinimizer getInstance(DifferentiableOperation operation, BoundedDifferentiableVariable... variables)
public void reset()
public void setMaxEvaluations(int evaluations)
public int getMaxEvaluations()
public void run()
run
in interface java.lang.Runnable
public void run(int maxEvaluations)
public double getBestPenalty()
public double getBestVariableValue(BoundedDifferentiableVariable variable)
public DifferentiableVariableValues getBestVariableValueMap()
public double getPenalty(xal.tools.math.differential.TrialPoint point)
public double getMaxSearchStep(xal.tools.math.differential.TrialPoint initialPoint, double[] gradient)
public xal.tools.math.differential.Trial findNextTrial(xal.tools.math.differential.Trial initialTrial, int evaluations)
public xal.tools.math.differential.Trial findNextTrialAlongGradient(xal.tools.math.differential.Trial initialTrial, int evaluations, double step, double[] gradient)
public xal.tools.math.differential.Trial findNextRandomTrialWithPowerDistribution(xal.tools.math.differential.Trial initialTrial, int evaluations)
public xal.tools.math.differential.Trial findNextRandomTrialWithPowerDistribution(xal.tools.math.differential.Trial initialTrial, int evaluations, double power)