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
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<java.util.Map<Variable,Term>>startingPointsThe starting points for finding the optimum.private java.util.Map<Statement,java.lang.Double>startingPointsLMultpossible starting points for Lagrange multiplicators.
-
Constructor Summary
Constructors Constructor Description LagrangeSolver(java.util.Map<Variable,Term> startingPoint)Creates a new Lagrange solver for the given optimization problemLagrangeSolver(java.util.Set<java.util.Map<Variable,Term>> startingPoints)Creates a new Lagrange solver for the given optimization problem
-
Method Summary
Modifier and Type Method Description static booleanisInstalled()voidsetStartingPointsLMult(java.util.Map<Statement,java.lang.Double> startingPointsLMult)java.util.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(java.util.Map<Statement,java.lang.Double> startingPointsLMult)
-
solve
public java.util.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 java.lang.UnsupportedOperationException- Throws:
java.lang.UnsupportedOperationException
-
-