Package net.sf.tweety.math.opt.solver
Class LagrangeSolver
- java.lang.Object
-
- net.sf.tweety.math.opt.Solver
-
- net.sf.tweety.math.opt.solver.LagrangeSolver
-
public class LagrangeSolver extends Solver
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.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description LagrangeSolver(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 Type Method Description static booleanisInstalled()voidsetStartingPointsLMult(Map<Statement,Double> startingPointsLMult)Map<Variable,Term>solve(ConstraintSatisfactionProblem prob)Computes a solution to the given constraint satisfaction or optimization problem, i.e.-
Methods inherited from class net.sf.tweety.math.opt.Solver
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
-
-
-
-
Method Detail
-
setStartingPointsLMult
public void setStartingPointsLMult(Map<Statement,Double> startingPointsLMult)
-
solve
public Map<Variable,Term> solve(ConstraintSatisfactionProblem prob) throws GeneralMathException
Description copied from class:SolverComputes a solution to the given constraint satisfaction or optimization problem, i.e. a mapping from variables of the problem to terms.- Specified by:
solvein classSolver- Parameters:
prob- 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 UnsupportedOperationException- Throws:
UnsupportedOperationException
-
-