@Deprecated public class SimplexSolver extends AbstractLinearOptimizer
Modifier and Type | Field and Description |
---|---|
private static double |
DEFAULT_EPSILON
Deprecated.
Default amount of error to accept for algorithm convergence.
|
private static int |
DEFAULT_ULPS
Deprecated.
Default amount of error to accept in floating point comparisons (as ulps).
|
private double |
epsilon
Deprecated.
Amount of error to accept for algorithm convergence.
|
private int |
maxUlps
Deprecated.
Amount of error to accept in floating point comparisons (as ulps).
|
DEFAULT_MAX_ITERATIONS
Constructor and Description |
---|
SimplexSolver()
Deprecated.
Build a simplex solver with default settings.
|
SimplexSolver(double epsilon,
int maxUlps)
Deprecated.
Build a simplex solver with a specified accepted amount of error
|
Modifier and Type | Method and Description |
---|---|
protected void |
doIteration(SimplexTableau tableau)
Deprecated.
Runs one iteration of the Simplex method on the given model.
|
PointValuePair |
doOptimize()
Deprecated.
Perform the bulk of optimization algorithm.
|
private java.lang.Integer |
getPivotColumn(SimplexTableau tableau)
Deprecated.
Returns the column with the most negative coefficient in the objective function row.
|
private java.lang.Integer |
getPivotRow(SimplexTableau tableau,
int col)
Deprecated.
Returns the row with the minimum ratio as given by the minimum ratio test (MRT).
|
protected void |
solvePhase1(SimplexTableau tableau)
Deprecated.
Solves Phase 1 of the Simplex method.
|
getConstraints, getFunction, getGoalType, getIterations, getMaxIterations, incrementIterationsCounter, optimize, restrictToNonNegative, setMaxIterations
private static final double DEFAULT_EPSILON
private static final int DEFAULT_ULPS
private final double epsilon
private final int maxUlps
public SimplexSolver()
public SimplexSolver(double epsilon, int maxUlps)
epsilon
- the amount of error to accept for algorithm convergencemaxUlps
- amount of error to accept in floating point comparisonsprivate java.lang.Integer getPivotColumn(SimplexTableau tableau)
tableau
- simple tableau for the problemprivate java.lang.Integer getPivotRow(SimplexTableau tableau, int col)
tableau
- simple tableau for the problemcol
- the column to test the ratio of. See getPivotColumn(SimplexTableau)
protected void doIteration(SimplexTableau tableau) throws MaxCountExceededException, UnboundedSolutionException
tableau
- simple tableau for the problemMaxCountExceededException
- if the maximal iteration count has been exceededUnboundedSolutionException
- if the model is found not to have a bounded solutionprotected void solvePhase1(SimplexTableau tableau) throws MaxCountExceededException, UnboundedSolutionException, NoFeasibleSolutionException
tableau
- simple tableau for the problemMaxCountExceededException
- if the maximal iteration count has been exceededUnboundedSolutionException
- if the model is found not to have a bounded solutionNoFeasibleSolutionException
- if there is no feasible solutionpublic PointValuePair doOptimize() throws MaxCountExceededException, UnboundedSolutionException, NoFeasibleSolutionException
doOptimize
in class AbstractLinearOptimizer
MaxCountExceededException
UnboundedSolutionException
NoFeasibleSolutionException
Copyright (c) 2003-2014 Apache Software Foundation