Class LPTwoPhaseSolver
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.convex.sdp.socp.qp.lp.simplex.solver.LPTwoPhaseSolver
-
- All Implemented Interfaces:
Minimizer<LPProblem,LPSimplexSolution>,ConstrainedMinimizer<LPProblem,LPSimplexSolution>,LPSolver<LPProblem,LPSimplexSolution>,LPSimplexSolver<LPProblem>,Optimizer<LPProblem,LPSimplexSolution>
public class LPTwoPhaseSolver extends Object implements LPSimplexSolver<LPProblem>
This implementation solves a linear programming problem,LPProblem, using a two-step approach. It first converts the LP problem into a canonical LP problem and then solve it using a canonical LP solver.
-
-
Constructor Summary
Constructors Constructor Description LPTwoPhaseSolver()Construct an LP solver to solve LP problems.LPTwoPhaseSolver(LPSimplexSolver<LPCanonicalProblem1> solver)Construct an LP solver to solve LP problems.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LPSimplexSolutionsolve(LPProblem problem)Solve an optimization problem, e.g.,OptimProblem.LPSimplexSolutionsolve(SimplexTable table)Solve an LP problem by a simplex algorithm on a simplex table
-
-
-
Constructor Detail
-
LPTwoPhaseSolver
public LPTwoPhaseSolver(LPSimplexSolver<LPCanonicalProblem1> solver)
Construct an LP solver to solve LP problems.- Parameters:
solver- a canonical LP solver
-
LPTwoPhaseSolver
public LPTwoPhaseSolver()
Construct an LP solver to solve LP problems.
-
-
Method Detail
-
solve
public LPSimplexSolution solve(SimplexTable table) throws LPInfeasible, Exception
Description copied from interface:LPSimplexSolverSolve an LP problem by a simplex algorithm on a simplex table- Specified by:
solvein interfaceLPSimplexSolver<LPProblem>- Parameters:
table- the initial simplex table corresponding to the LP problem- Returns:
- an LP solution
- Throws:
Exception- when there is an errorLPInfeasible
-
solve
public LPSimplexSolution solve(LPProblem problem) throws LPInfeasible, Exception
Description copied from interface:OptimizerSolve an optimization problem, e.g.,OptimProblem.- Specified by:
solvein interfaceOptimizer<LPProblem,LPSimplexSolution>- Parameters:
problem- an optimization problem- Returns:
- a solution to the optimization problem
- Throws:
Exception- when there is an error solving the problemLPInfeasible
-
-