public abstract class Solver
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static Solver |
defaultGeneralSolver
The default solver for non-linear (general) optimization problems.
|
private static Solver |
defaultIntegerLinearSolver
The default solver for integer linear problems
|
private static Solver |
defaultLinearSolver
The default solver for linear optimization problems.
|
Constructor and Description |
---|
Solver() |
Modifier and Type | Method and Description |
---|---|
static Solver |
getDefaultGeneralSolver()
Returns the default solver for non-linear (general) optimization problems.
|
static Solver |
getDefaultIntegerLinearSolver()
Returns the default solver for integer linear optimization problems.
|
static Solver |
getDefaultLinearSolver()
Returns the default solver for linear optimization problems.
If a default solver for linear problems has been configured this solver
is returned by this method.
|
static boolean |
hasDefaultGeneralSolver()
Returns "true" if a default solver for general optimization
problems is configured.
|
static boolean |
hasDefaultIntegerLinearSolver()
Returns "true" if a default solver for integer linear optimization
problems is configured.
|
static boolean |
hasDefaultLinearSolver()
Returns "true" if a default solver for linear optimization
problems is configured.
|
static boolean |
isInstalled()
Checks whether the solver of this class is actually installed, i.e.
|
static void |
setDefaultGeneralSolver(Solver solver)
Sets the default solver for non-linear (general) optimization problems.
|
static void |
setDefaultIntegerLinearSolver(Solver solver)
Sets the default solver for integer linear optimization problems.
|
static void |
setDefaultLinearSolver(Solver solver)
Sets the default solver for linear optimization problems.
|
abstract java.util.Map<Variable,Term> |
solve(ConstraintSatisfactionProblem problem)
Computes a solution to the given constraint satisfaction or optimization problem, i.e.
|
private static Solver defaultGeneralSolver
private static Solver defaultLinearSolver
private static Solver defaultIntegerLinearSolver
public static void setDefaultGeneralSolver(Solver solver)
solver
- some solverpublic static void setDefaultLinearSolver(Solver solver)
solver
- some solverpublic static void setDefaultIntegerLinearSolver(Solver solver)
solver
- some solverpublic static boolean hasDefaultGeneralSolver()
public static boolean hasDefaultLinearSolver()
public static boolean hasDefaultIntegerLinearSolver()
public static Solver getDefaultGeneralSolver()
public static Solver getDefaultIntegerLinearSolver()
public static Solver getDefaultLinearSolver()
net.sf.tweety.math.opt.solver.ApacheCommonsSimplex
)
is returned (with a default setting of 50000 number of iterations that returns
both positive and non-positive results) as a fallback and message is
printed to stderr pointing out that no default solver is configured.public abstract java.util.Map<Variable,Term> solve(ConstraintSatisfactionProblem problem) throws GeneralMathException
problem
- the actual problemGeneralMathException
- if something went wrong.public static boolean isInstalled() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException