public class OpenOptSolver extends Solver
Modifier and Type | Field and Description |
---|---|
private double |
contol |
private double |
ftol |
private double |
gtol |
private java.util.Map<java.lang.Integer,Variable> |
idx2newVars
A map mapping indices to new variables.
|
protected boolean |
ignoreNotFeasibleError |
private org.slf4j.Logger |
log
Logger.
|
private double |
maxFunEvals |
private double |
maxIter |
private java.util.Map<Variable,Variable> |
newVars2oldVars
A map mapping old variables to new variables.
|
private java.util.Map<Variable,Variable> |
oldVars2newVars
A map mapping old variables to new variables.
|
private java.lang.String |
solver |
private java.util.Map<Variable,Term> |
startingPoint
A starting point for the optimization.
|
private double |
xtol |
Constructor and Description |
---|
OpenOptSolver()
Creates a new solver.
|
OpenOptSolver(java.util.Map<Variable,Term> startingPoint)
Creates a new solver for the given problem.
|
Modifier and Type | Method and Description |
---|---|
double |
getContol() |
double |
getFtol() |
double |
getGtol() |
double |
getMaxFunEvals() |
double |
getMaxIter() |
java.lang.String |
getOpenOptCode(OptimizationProblem problem)
Builds the OpenOpt code for the given problem which can be interpreted
by a python.
|
java.lang.String |
getSolver() |
double |
getXtol() |
boolean |
isIgnoreNotFeasibleError() |
static boolean |
isInstalled() |
protected java.util.Map<Variable,Term> |
parseOutput(java.lang.String output)
This method parses the output data of an OpenOpt run
|
void |
setContol(double contol) |
void |
setFtol(double ftol) |
void |
setGtol(double gtol) |
void |
setIgnoreNotFeasibleError(boolean ignoreNotFeasibleError) |
void |
setMaxFunEvals(double maxFunEvals) |
void |
setMaxIter(double maxIter) |
void |
setSolver(java.lang.String solver) |
void |
setXtol(double xtol) |
java.util.Map<Variable,Term> |
solve(ConstraintSatisfactionProblem problem)
Computes a solution to the given constraint satisfaction or optimization problem, i.e.
|
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
private org.slf4j.Logger log
private double contol
private double ftol
private double gtol
private double xtol
private double maxIter
private double maxFunEvals
private java.lang.String solver
protected boolean ignoreNotFeasibleError
private java.util.Map<Variable,Term> startingPoint
private java.util.Map<Variable,Variable> oldVars2newVars
private java.util.Map<Variable,Variable> newVars2oldVars
private java.util.Map<java.lang.Integer,Variable> idx2newVars
public java.util.Map<Variable,Term> solve(ConstraintSatisfactionProblem problem) throws GeneralMathException
Solver
solve
in class Solver
problem
- the actual problemGeneralMathException
- if something went wrong.public java.lang.String getOpenOptCode(OptimizationProblem problem)
protected java.util.Map<Variable,Term> parseOutput(java.lang.String output)
output
- a string.public static boolean isInstalled() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public double getContol()
public void setContol(double contol)
public double getFtol()
public void setFtol(double ftol)
public double getGtol()
public void setGtol(double gtol)
public double getXtol()
public void setXtol(double xtol)
public double getMaxIter()
public void setMaxIter(double maxIter)
public double getMaxFunEvals()
public void setMaxFunEvals(double maxFunEvals)
public java.lang.String getSolver()
public void setSolver(java.lang.String solver)
public boolean isIgnoreNotFeasibleError()
public void setIgnoreNotFeasibleError(boolean ignoreNotFeasibleError)