Class ProblemFactory

java.lang.Object
xal.extension.solver.ProblemFactory

public class ProblemFactory extends Object
Generate problems for some special cases
  • 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 variables
      scorer - the scorer
      tolerance - 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 variables
      scorer - the scorer
      tolerance - the score corresponding to 90% satisfaction
    • getSCurveProblem

      public static 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 zero
      Parameters:
      variables - the variables
      scorer - the scorer
      slope - 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 variables
      scorer - the scorer
      center - the center value of the satisfaction curve
      slope - 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 variables
      scorer - the scorer
      minScore - the minimum score
      maxScore - 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 variables
      scorer - the scorer
      minScore - the minimum score
      maxScore - 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 variables
      scorer - the scorer
      minScore - the minimum score
      maxScore - the maximum score
      endSlope - 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 variables
      scorer - the scorer
      minScore - the minimum score
      maxScore - the maximum score
      startSlope - the slope of the satisfaction curve at the minimum score