public class LPTwoPhaseSolver extends Object implements LPSimplexSolver<LPProblem>
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 and Description |
---|
LPTwoPhaseSolver()
Construct an LP solver to solve LP problems.
|
LPTwoPhaseSolver(LPSimplexSolver<LPCanonicalProblem1> solver)
Construct an LP solver to solve LP problems.
|
Modifier and Type | Method and Description |
---|---|
LPSimplexSolution |
solve(LPProblem problem)
Solve an optimization problem, e.g.,
OptimProblem . |
LPSimplexSolution |
solve(SimplexTable table)
Solve an LP problem by a simplex algorithm on a simplex table
|
public LPTwoPhaseSolver(LPSimplexSolver<LPCanonicalProblem1> solver)
solver
- a canonical LP solverpublic LPTwoPhaseSolver()
public LPSimplexSolution solve(SimplexTable table) throws LPInfeasible, Exception
LPSimplexSolver
solve
in interface LPSimplexSolver<LPProblem>
table
- the initial simplex table corresponding to the LP problemException
- when there is an errorLPInfeasible
public LPSimplexSolution solve(LPProblem problem) throws LPInfeasible, Exception
Optimizer
OptimProblem
.solve
in interface Optimizer<LPProblem,LPSimplexSolution>
problem
- an optimization problemException
- when there is an error solving the problemLPInfeasible
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.