Package xal.extension.solver
Class ProblemFactory
java.lang.Object
xal.extension.solver.ProblemFactory
Generate problems for some special cases
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Problem
getAcceleratingProblem
(List<Variable> variables, Scorer scorer, double minScore, double maxScore, double endSlope) Generate a problem which uses an accelerating satisfaction curve over the specified score rangestatic Problem
getDeceleratingProblem
(List<Variable> variables, Scorer scorer, double minScore, double maxScore, double startSlope) Generate a problem which uses a decelerating satisfaction curve over the specified score rangestatic Problem
getInverseSquareMaximizerProblem
(List<Variable> variables, Scorer scorer, double tolerance) Generate a problem which seeks to maximize the score which is in a range of zero to infinitystatic Problem
getInverseSquareMinimizerProblem
(List<Variable> variables, Scorer scorer, double tolerance) Generate a problem which seeks to minimize the score which is in a range of zero to infinitystatic Problem
getLinearMaximizerProblem
(List<Variable> variables, Scorer scorer, double minScore, double maxScore) Generate a problem which uses a linear rising satisfaction curve over the specified score rangestatic Problem
getLinearMinimizerProblem
(List<Variable> variables, Scorer scorer, double minScore, double maxScore) Generate a problem which uses a linear falling satisfaction curve over the specified score rangestatic Problem
getSCurveProblem
(List<Variable> variables, Scorer scorer, double slope) Generate a problem which uses an S-curve satisfaction curve over the range of negative infinity to positive infinity with center at zerostatic Problem
getSCurveProblem
(List<Variable> variables, Scorer scorer, double center, double slope) Generate a problem which uses an S-curve satisfaction curve over the range of negative infinity to positive infinity
-
Constructor Details
-
ProblemFactory
protected ProblemFactory()hide the constructor
-
-
Method Details
-
getInverseSquareMinimizerProblem
public static Problem getInverseSquareMinimizerProblem(List<Variable> variables, Scorer scorer, double tolerance) Generate a problem which seeks to minimize the score which is in a range of zero to infinity- Parameters:
variables
- the variablesscorer
- the scorertolerance
- the score corresponding to 90% satisfaction
-
getInverseSquareMaximizerProblem
public static Problem getInverseSquareMaximizerProblem(List<Variable> variables, Scorer scorer, double tolerance) Generate a problem which seeks to maximize the score which is in a range of zero to infinity- Parameters:
variables
- the variablesscorer
- the scorertolerance
- the score corresponding to 90% satisfaction
-
getSCurveProblem
Generate a problem which uses an S-curve satisfaction curve over the range of negative infinity to positive infinity with center at zero- Parameters:
variables
- the variablesscorer
- the scorerslope
- the slope of the satisfaction curve at the center
-
getSCurveProblem
public static Problem getSCurveProblem(List<Variable> variables, Scorer scorer, double center, double slope) Generate a problem which uses an S-curve satisfaction curve over the range of negative infinity to positive infinity- Parameters:
variables
- the variablesscorer
- the scorercenter
- the center value of the satisfaction curveslope
- the slope of the satisfaction curve at the center
-
getLinearMaximizerProblem
public static Problem getLinearMaximizerProblem(List<Variable> variables, Scorer scorer, double minScore, double maxScore) Generate a problem which uses a linear rising satisfaction curve over the specified score range- Parameters:
variables
- the variablesscorer
- the scorerminScore
- the minimum scoremaxScore
- the maximum score
-
getLinearMinimizerProblem
public static Problem getLinearMinimizerProblem(List<Variable> variables, Scorer scorer, double minScore, double maxScore) Generate a problem which uses a linear falling satisfaction curve over the specified score range- Parameters:
variables
- the variablesscorer
- the scorerminScore
- the minimum scoremaxScore
- the maximum score
-
getAcceleratingProblem
public static Problem getAcceleratingProblem(List<Variable> variables, Scorer scorer, double minScore, double maxScore, double endSlope) Generate a problem which uses an accelerating satisfaction curve over the specified score range- Parameters:
variables
- the variablesscorer
- the scorerminScore
- the minimum scoremaxScore
- the maximum scoreendSlope
- the slope of the satisfaction curve at the maximum score
-
getDeceleratingProblem
public static Problem getDeceleratingProblem(List<Variable> variables, Scorer scorer, double minScore, double maxScore, double startSlope) Generate a problem which uses a decelerating satisfaction curve over the specified score range- Parameters:
variables
- the variablesscorer
- the scorerminScore
- the minimum scoremaxScore
- the maximum scorestartSlope
- the slope of the satisfaction curve at the minimum score
-