Class LagrangeSolver
java.lang.Object
org.tweetyproject.math.opt.solver.Solver
org.tweetyproject.math.opt.solver.LagrangeSolver
This class implements a (naive) Langrange solver for optimization problems.
This solver only considers optimization problems without inequations. The solution given by this solver is not verified as it only checks for necessary optimality conditions. it is natively implemented
This solver only considers optimization problems without inequations. The solution given by this solver is not verified as it only checks for necessary optimality conditions. it is natively implemented
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorsConstructorDescriptionLagrangeSolver
(Map<Variable, Term> startingPoint) Creates a new Lagrange solver for the given optimization problemLagrangeSolver
(Set<Map<Variable, Term>> startingPoints) Creates a new Lagrange solver for the given optimization problem -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
void
setStartingPointsLMult
(Map<Statement, Double> startingPointsLMult) Computes 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
-
LagrangeSolver
Creates a new Lagrange solver for the given optimization problem- Parameters:
startingPoint
- The starting point for finding the optimum.
-
LagrangeSolver
Creates a new Lagrange solver for the given optimization problem- Parameters:
startingPoints
- Some starting points for finding the optimum.
-
-
Method Details
-
setStartingPointsLMult
-
solve
public Map<Variable,Term> solve(GeneralConstraintSatisfactionProblem prob) 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:
prob
- the actual problem- Returns:
- a mapping from variables of the problem to terms.
- Throws:
GeneralMathException
- if something went wrong.
-
isInstalled
- Returns:
- if solver is installed
- Throws:
UnsupportedOperationException
- UnsupportedOperationException
-