NMath Reference Guide

## Simplex |

**Note: This API is now obsolete.**

Class SimplexSolverBase is an abstract base class for classes solving mixed
integer linear programming prolems using variants of the simplex method.

Inheritance Hierarchy

SystemObject

CenterSpace.NMath.CoreConstrainedOptimizer

CenterSpace.NMath.CoreSimplexSolverBase

CenterSpace.NMath.CoreDualSimplexSolver

CenterSpace.NMath.CorePrimalSimplexSolver

CenterSpace.NMath.CoreConstrainedOptimizer

CenterSpace.NMath.CoreSimplexSolverBase

CenterSpace.NMath.CoreDualSimplexSolver

CenterSpace.NMath.CorePrimalSimplexSolver

Syntax

The SimplexSolverBase type exposes the following members.

Constructors

Name | Description | |
---|---|---|

SimplexSolverBase | Constructs a SimplexSolverBase instance. | |

SimplexSolverBase(SimplexSolverBase) | Copy constructor |

Properties

Name | Description | |
---|---|---|

ExceptionMessage |
If the solver result is SolverResult.UnexpectedException
gets the exception message property.
(Inherited from ConstrainedOptimizer) | |

OptimalObjectiveFunctionValue |
Gets the optimal objective function value if the solve result is
SolverResult.Optimal, or the current solution value if the result is
SolverResult.SolutionFeasibleButNotOptimal
Otherwise the value is Double.NaN.
(Inherited from ConstrainedOptimizer) | |

OptimalX |
Gets the optimal value if the solve result is SolverResult.Optimal,
or the current solution value if the result is
SolverResult.SolutionFeasibleButNotOptimal
Contains an empty vector otherwise.
(Inherited from ConstrainedOptimizer) | |

PivotCount | Gets the number of simplex pivots performed. Includes both major and minor pivots. | |

Result |
Gets the result of the most recent solve attempt.
(Inherited from ConstrainedOptimizer) |

Methods

Name | Description | |
---|---|---|

AddConstraints |
Adds the linear constraints in the given linearly constrained problem to a Microsoft
Solver Foundation linear model.
(Inherited from ConstrainedOptimizer) | |

AddVariablesAndBounds |
Adds the variables in the given linearly constrained problem to a Microsoft
Solver Foundation linear model.
(Inherited from ConstrainedOptimizer) | |

Check | Checks bounds and constraints. | |

CheckBounds(DoubleVector, DoubleVector) | Checks validity of variable upper bounds. | |

CheckBounds(DoubleVector, DoubleVector, DoubleVector) | Checks variable bounds. | |

CheckConstraints | Checks constraints validity. | |

GetMSFSolverParams | Takes the given set of solver parameters and translates them into Microsoft Solver Foundation parameters. | |

SetStatus |
Sets the SolverResult value base on the give Microsoft
Solver Foundation LinearResult value.
(Inherited from ConstrainedOptimizer) | |

Solve(LinearProgrammingProblem) | Solves a linear programming problem. | |

Solve(MixedIntegerLinearProgrammingProblem) | Solves a mixed integer linear programming problem with default solver parameters. | |

Solve(MixedIntegerLinearProgrammingProblem, SimplexSolverMixedIntParams) | Solves a mixed integer linear programming problem using the given solver parameters. | |

Solve(MixedIntegerLinearProgrammingProblem, SimplexSolverParamsBase) | Solves a mixed integer linear programming problem using the given solver parameters. | |

Solve(DoubleVector, DoubleVector, DoubleVector) | Solves a linear programming problems where the variables are constrained by the give bounds. The solution maximizes the objective function. | |

Solve(MixedIntegerLinearProgrammingProblem, SimplexSolverParamsBase, SimplexSolverMixedIntParams) | Solves a mixed integer linear programming problem using the given simplex and mixed integer solver parameters. | |

Solve(LinearProgrammingProblem, SimplexSolverParamsBase, IEnumerableInt32, SimplexSolverMixedIntParams) | Solvers a linear programming problem using the given solver parameters. | |

Solve(DoubleVector, DoubleMatrix, DoubleVector, Int32, Int32, Int32, DoubleVector, DoubleVector) | Solves a linear programming problem with the given constraints and variable bounds. | |

SolveNonnegative(DoubleVector, DoubleVector) | Solves a linear programming problem. Solution values are constrained by upper bounds and lower bounds of zero. The solution maximizes the objective function. | |

SolveNonnegative(DoubleVector, DoubleMatrix, DoubleVector, Int32, Int32, Int32) | Solves a linear system. The solution components are constrained to be nonnegative. | |

SolveNonnegative(DoubleVector, DoubleMatrix, DoubleVector, Int32, Int32, Int32, DoubleVector) | Solves a linear programming problem with the given constraints. The solution maximizes the objective function and its components are constrained to be nonnegative. |

Fields

Name | Description | |
---|---|---|

exceptionMessage_ |
Constains exception message if there is an unexpected exception
during the solve.
(Inherited from ConstrainedOptimizer) | |

optimalValue_ |
Optimal value of the objective function if the the result of
the solver is SolveResult.Optimal (Inherited from ConstrainedOptimizer) | |

optimalX_ |
Optimal solution value of the the result if the solver is
SolveResult.Optimal (Inherited from ConstrainedOptimizer) | |

result_ |
Result of the solver attempt.
(Inherited from ConstrainedOptimizer) |

Remarks

A linear programming (LP) problem optimizes a linear objective function subject to
a set of linear constraints, and optionally subject to a set of variable bounds.
Variables may further be constrained to integer values.
The simplex method solves LP problems by constructing a solution at a vertex of
a simplex, then walking along edges of the simplex to vertices with successively
optimal values of the objective function until the optimum is reached. For example:

See Also