Class LagrangeSolver
- java.lang.Object
-
- org.tweetyproject.math.opt.solver.Solver
-
- org.tweetyproject.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. it is natively implemented- Author:
- Matthias Thimm
-
-
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 boolean
isInstalled()
void
setStartingPointsLMult(java.util.Map<Statement,java.lang.Double> startingPointsLMult)
java.util.Map<Variable,Term>
solve(GeneralConstraintSatisfactionProblem prob)
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
-
-
-
-
Method Detail
-
setStartingPointsLMult
public void setStartingPointsLMult(java.util.Map<Statement,java.lang.Double> startingPointsLMult)
-
solve
public java.util.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
public static boolean isInstalled() throws java.lang.UnsupportedOperationException
- Throws:
java.lang.UnsupportedOperationException
-
-