Package net.sf.tweety.math.opt.solver
Class OpenOptWebSolver
- java.lang.Object
-
- net.sf.tweety.math.opt.Solver
-
- net.sf.tweety.math.opt.solver.OpenOptSolver
-
- net.sf.tweety.math.opt.solver.OpenOptWebSolver
-
public class OpenOptWebSolver extends OpenOptSolver
Uses a web service implementation of the OpenOpt-library.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Logger
log
Logger.static boolean
openopt_use_local
Whether to use a local installation of OpenOpt.static java.lang.String
openopt_webservice_apikey
The API key for using the service.static java.lang.String
openopt_webservice_url
The URL of the web service.-
Fields inherited from class net.sf.tweety.math.opt.solver.OpenOptSolver
ignoreNotFeasibleError
-
-
Constructor Summary
Constructors Constructor Description OpenOptWebSolver()
-
Method Summary
Modifier and Type Method Description static boolean
isInstalled()
java.util.Map<Variable,Term>
solve(ConstraintSatisfactionProblem problem)
Computes a solution to the given constraint satisfaction or optimization problem, i.e.-
Methods inherited from class net.sf.tweety.math.opt.solver.OpenOptSolver
getContol, getFtol, getGtol, getMaxFunEvals, getMaxIter, getOpenOptCode, getSolver, getXtol, isIgnoreNotFeasibleError, parseOutput, setContol, setFtol, setGtol, setIgnoreNotFeasibleError, setMaxFunEvals, setMaxIter, setSolver, setXtol
-
Methods inherited from class net.sf.tweety.math.opt.Solver
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
-
-
-
-
Field Detail
-
openopt_webservice_url
public static java.lang.String openopt_webservice_url
The URL of the web service.
-
openopt_webservice_apikey
public static java.lang.String openopt_webservice_apikey
The API key for using the service.
-
openopt_use_local
public static boolean openopt_use_local
Whether to use a local installation of OpenOpt.
-
log
private org.slf4j.Logger log
Logger.
-
-
Method Detail
-
solve
public java.util.Map<Variable,Term> solve(ConstraintSatisfactionProblem 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.- Overrides:
solve
in classOpenOptSolver
- Parameters:
problem
- the actual problem- Returns:
- a mapping from variables of the problem to terms.
- Throws:
GeneralMathException
- if something went wrong.
-
isInstalled
public static boolean isInstalled() throws java.lang.UnsupportedOperationException
- Throws:
java.lang.UnsupportedOperationException
-
-