public class SimplexTable extends FlexibleTable implements MinimizationSolution<ImmutableVector>
Modifier and Type | Class and Description |
---|---|
static class |
SimplexTable.Label |
static class |
SimplexTable.LabelType |
Modifier and Type | Field and Description |
---|---|
static SimplexTable.Label |
ARTIFICIAL |
static SimplexTable.Label |
ARTIFICIAL_COST |
static SimplexTable.Label |
B |
static SimplexTable.Label |
COST |
static SimplexTable.Label |
UNDEFINED |
Constructor and Description |
---|
SimplexTable(LPCanonicalProblem1 problem)
Construct a simplex table from a canonical linear programming problem.
|
SimplexTable(LPCanonicalProblem1 problem,
double epsilon)
Construct a simplex table from a canonical linear programming problem.
|
SimplexTable(LPProblem problem)
Construct a simplex table from a general linear programming problem.
|
SimplexTable(LPProblem problem,
double epsilon)
Construct a simplex table from a general linear programming problem.
|
SimplexTable(SimplexTable table)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getBCol(int i)
Get the table entry at [i, B].
|
SimplexTable.Label |
getColLabel(int i)
Gets the label for column i.
|
double |
getCostRow(int j)
Get the table entry at [COST, j].
|
int |
getProblemSize()
Get the number of variables in the problem or the cost/objective function.
|
SimplexTable.Label |
getRowLabel(int i)
Gets the label for row i.
|
boolean |
isFeasible()
Check if this table is feasible.
|
ImmutableVector |
minimizer()
Get the minimizer (solution) to the minimization problem.
|
double |
minimum()
Get the (approximate) minimum found.
|
SimplexTable |
swap(int r,
int s)
Perform a Jordan Exchange to swap row
r with column s . |
public static final SimplexTable.Label COST
public static final SimplexTable.Label B
public static final SimplexTable.Label ARTIFICIAL_COST
public static final SimplexTable.Label ARTIFICIAL
public static final SimplexTable.Label UNDEFINED
public SimplexTable(LPCanonicalProblem1 problem, double epsilon)
problem
- a canonical linear programming problemepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0public SimplexTable(LPCanonicalProblem1 problem)
problem
- a canonical linear programming problempublic SimplexTable(LPProblem problem, double epsilon)
problem
- a general linear programming problemepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0public SimplexTable(LPProblem problem)
problem
- a general linear programming problempublic SimplexTable(SimplexTable table)
table
- a simplex tablepublic SimplexTable.Label getColLabel(int i)
FlexibleTable
getColLabel
in class FlexibleTable
i
- a column index, counting from 1public SimplexTable.Label getRowLabel(int i)
FlexibleTable
getRowLabel
in class FlexibleTable
i
- a row index, counting from 1public double getCostRow(int j)
j
- a column index, counting from 1public double getBCol(int i)
i
- a row index, counting from 1public int getProblemSize()
public SimplexTable swap(int r, int s)
r
with column s
.r
- the index to a entering variable (row)s
- the index to a leaving variable (column)public boolean isFeasible()
true
if the table is feasiblepublic double minimum()
MinimizationSolution
minimum
in interface MinimizationSolution<ImmutableVector>
public ImmutableVector minimizer()
MinimizationSolution
minimizer
in interface MinimizationSolution<ImmutableVector>
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.