Other Features
Status Functions
The status function returns a symbol indicating the state of the tableau, T. The result of status(T) is one of the following:
:no_basis– no basis has been established for this tableau.:feasible– the tableau is in a feasible state, but not optimal (rhs is nonnegative).:infeasible– the tableau is in an infeasible state (rhs contains negative values).:optimal– the tableau has reached a global minimization point. This supercedes:feasible.:unbounded– the tableau has reached a feasible state, but there are no pivots; the objective function value can be arbitrarily negative. This supercedes:feasible.
These functions are superfluous but may be convenient:
in_feasible_state(T)returnstrueif the current basic vector is in the feasible region (including if at optimality).in_optimal_state(T)returnstrueif the tableau has reached an optimal (minimal) state.
Form Swapping
The functions make_standard and make_canonical convert a Tableau from standard to canonical, and from canonical to standard, respectively. A new Tableau is returned unless the input Tableau is already in the desired form.
make_canonicaladds slack variables to create a new Tableau that is in standard form and has the same solution.make_standardreplaces each equality constraint of the formax=bwith a pair of inequality constraintsax≥band-ax≥-b.
Miscellaneous Functions
basic_vector(T)returns the vector in which the nonbasic variables have been set to zero.dual_basic_vector(T)returns the dual basic vector.header(T)returns the top row ofT(negative reduced costs). Does not include the1in column0nor the value in the last column.get_Abc(T)returns the original matrixAand the vectorsbandcfor the standard presentation of the linear program.get_basis(T)returns the column numbers of the current basis.is_infeasible(T)returnstrueif the linear program's feasible region is empty.is_unbounded(T)returnstrueif the linear program is unbounded (below).rhs(T)returns the righthand column ofT(from row1onward – does not include the value in row0).value(T)returns the objective function value of the current basic vector.value(T,x)returns the objective function value for the vectorx. May also be invoked asT(x).
Return to Start
The function restore! returns the tableau to its state when it was constructed.
julia> T
┌──────────┬───┬─────┬─────┬────────┬─────┬─────────┬──────────┐
│ │ z │ x_1 │ x_2 │ x_3 │ x_4 │ x_5 │ RHS │
│ Obj Func │ 1 │ 0 │ 0 │ -25/47 │ 0 │ -110/47 │ 13500/47 │
├──────────┼───┼─────┼─────┼────────┼─────┼─────────┼──────────┤
│ Cons 1 │ 0 │ 1 │ 0 │ 1/47 │ 0 │ -5/47 │ 400/47 │
│ Cons 2 │ 0 │ 0 │ 0 │ -25/47 │ 1 │ -16/47 │ -600/47 │
│ Cons 3 │ 0 │ 0 │ 1 │ -5/47 │ 0 │ 3/94 │ 350/47 │
└──────────┴───┴─────┴─────┴────────┴─────┴─────────┴──────────┘
julia> restore!(T)
┌──────────┬───┬─────┬─────┬─────┬─────┬─────┬─────┐
│ │ z │ x_1 │ x_2 │ x_3 │ x_4 │ x_5 │ RHS │
│ Obj Func │ 1 │ -25 │ -10 │ 0 │ 0 │ 0 │ 0 │
├──────────┼───┼─────┼─────┼─────┼─────┼─────┼─────┤
│ Cons 1 │ 0 │ 3 │ 10 │ -1 │ 0 │ 0 │ 100 │
│ Cons 2 │ 0 │ 5 │ 6 │ 0 │ -1 │ 0 │ 100 │
│ Cons 3 │ 0 │ 10 │ 2 │ 0 │ 0 │ -1 │ 100 │
└──────────┴───┴─────┴─────┴─────┴─────┴─────┴─────┘LaTeX Output
Using LatexPrint users can get the code for pasting into a LaTeX document.
julia> using LatexPrint
julia> T
┌──────────┬───┬─────┬─────┬─────┬─────┬──────┬─────┐
│ │ z │ x_1 │ x_2 │ x_3 │ x_4 │ x_5 │ RHS │
│ Obj Func │ 1 │ 0 │ -3 │ -2 │ 8 │ 0 │ 9 │
├──────────┼───┼─────┼─────┼─────┼─────┼──────┼─────┤
│ Cons 1 │ 0 │ 1 │ 1/2 │ 0 │ 9/2 │ -1/2 │ 9/2 │
│ Cons 2 │ 0 │ 0 │ 1/2 │ -1 │ 1/2 │ 3/2 │ 5/2 │
└──────────┴───┴─────┴─────┴─────┴─────┴──────┴─────┘
julia> lap(T)
\begin{tabular}{|c|ccccc|c|}\hline
{\Large\strut}$z$ &$x_{1}$ & $x_{2}$ & $x_{3}$ & $x_{4}$ & $x_{5}$ & RHS \\
{\Large\strut}$1$ & $0$ & $-3$ & $-2$ & $8$ & $0$ & $9$\\
\hline
{\Large\strut}$0$ & $1$ & $\frac{1}{2}$ & $0$ & $\frac{9}{2}$ & $\frac{-1}{2}$ & $\frac{9}{2}$\\
{\Large\strut}$0$ & $0$ & $\frac{1}{2}$ & $-1$ & $\frac{1}{2}$ & $\frac{3}{2}$ & $\frac{5}{2}$\\
\hline
\end{tabular}Here is the LaTeX output:

Other Public Functions
Presently, these functions are exported in SimplexTableaux but might be hidden in future releases. They are not likely to be useful to the users of this module. See the doc strings for more information:
big_M_tableaucheck_basisfind_pivot_columninfer_basis!