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
ConstructorDescriptionLagrangeSolver
(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
Return if solver is installedvoid
setStartingPointsLMult
(Map<Statement, Double> startingPointsLMult) Setter starting pintsComputes 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
-
LagrangeSolver
-
-
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
Return if solver is installed- Returns:
- if solver is installed
- Throws:
UnsupportedOperationException
- UnsupportedOperationException
-