Class ApacheCommonsNonLinearConjugateGradientOptimizer
java.lang.Object
org.tweetyproject.math.opt.solver.Solver
org.tweetyproject.math.opt.solver.ApacheCommonsNonLinearConjugateGradientOptimizer
This class is a wrapper for the Apache Commons Math3 Non-Linear
Conjugate Gradient Optimizer
(https://commons.apache.org/proper/commons-math/).
NOTE: This solver does not allow any constraints, box constraints of variables are ignored!
NOTE: This solver does not allow any constraints, box constraints of variables are ignored!
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionApacheCommonsNonLinearConjugateGradientOptimizer
(int maxEval, double precision) Creates a new solver. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Return if solver is installedComputes a solution to the given constraint satisfaction or optimization problem, i.e.Methods inherited from class org.tweetyproject.math.opt.solver.Solver
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
-
Constructor Details
-
ApacheCommonsNonLinearConjugateGradientOptimizer
public ApacheCommonsNonLinearConjugateGradientOptimizer(int maxEval, double precision) Creates a new solver.- Parameters:
maxEval
- the maximum number of evaluations.precision
- the precision.
-
-
Method Details
-
solve
public Map<Variable,Term> solve(GeneralConstraintSatisfactionProblem problem) throws GeneralMathException Description copied from class:Solver
Computes a solution to the given constraint satisfaction or optimization problem, i.e. a mapping from variables of the problem to terms.- Specified by:
solve
in classSolver
- Parameters:
problem
- the actual problem- Returns:
- a mapping from variables of the problem to terms.
- Throws:
GeneralMathException
- if something went wrong.
-
isInstalled
Return if solver is installed- Returns:
- if solver is installed
- Throws:
UnsupportedOperationException
- UnsupportedOperationException
-