simplex_lpsolve.c File Reference Detailed DescriptionImplementation of the functions operating on TSimplex using the Lp_solve backend.
Definition in file simplex_lpsolve.c.
Function Documentation
Creates a simplex structure with a given number of columns (i.e., variables) but with no rows (i.e., constraints).
Definition at line 23 of file simplex_lpsolve.c. References Error(), TSimplex::inf, TSimplex::lp, and SIMPLEX_TIMEOUT. Referenced by ReduceBox().
Removes the rows (i.e., constraints) from the simplex structure.
Definition at line 67 of file simplex_lpsolve.c. References TSimplex::lp. Referenced by ReduceBox(), and ReduceRange().
Gets the number of columns (i.e., variables) of the simplex structure.
Definition at line 72 of file simplex_lpsolve.c. References TSimplex::lp. Referenced by SimplexGetOptimalValue(), SimplexGetOptimizationFunction(), and SimplexGetRowConstraint().
Gets the number of rows (i.e., constraints) of the simplex structure.
Definition at line 77 of file simplex_lpsolve.c. References TSimplex::lp. Referenced by ReduceBox(), SimplexAddNewConstraintRaw(), SimplexColEmpty(), SimplexGetColConstraint(), SimplexGetColDual(), SimplexGetColPrimal(), SimplexGetOptimalValue(), SimplexGetOptimizationFunction(), and SimplexGetRowConstraint(). Sets the bounds for a given column (i.e., variable).
Definition at line 83 of file simplex_lpsolve.c. References INF, TSimplex::inf, LowerLimit(), TSimplex::lp, and UpperLimit(). Referenced by SetSimplexBounds(). Gets the bounds for a given column (i.e., variable).
Definition at line 103 of file simplex_lpsolve.c. References INF, TSimplex::inf, TSimplex::lp, and NewInterval(). Referenced by SimplexGetColConstraint().
Gets a column from the simplex in the form of a linear constraint.
Definition at line 121 of file simplex_lpsolve.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, NEW, SetLinearConstraintError(), SimplexGetColBounds(), and SimplexNRows(). Referenced by SimplexGetOptimalValue(). Gets a column constraint from the simplex.
Definition at line 146 of file simplex_lpsolve.c. References TSimplex::lp, NEW, and SimplexNRows(). Referenced by ReduceBox().
Gets a column primal value after solving the simplex.
Definition at line 166 of file simplex_lpsolve.c. References TSimplex::lp, and SimplexNRows().
Gets a column dual value after solving the simplex.
Definition at line 171 of file simplex_lpsolve.c. References TSimplex::lp, and SimplexNRows(). Sets the bounds for a given row (i.e., constraint).
Definition at line 177 of file simplex_lpsolve.c. References INF, TSimplex::inf, IntervalSize(), LowerLimit(), TSimplex::lp, and UpperLimit(). Referenced by SimplexAddNewConstraintRaw(). Gets the bounds for a given row (i.e., constraint).
Definition at line 229 of file simplex_lpsolve.c. References INF, TSimplex::inf, TSimplex::lp, and NewInterval(). Referenced by SimplexGetOptimalValue(), and SimplexGetRowConstraint().
Gets a row constraint from the simplex.
Definition at line 269 of file simplex_lpsolve.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, NEW, SetLinearConstraintError(), SimplexGetRowBounds(), SimplexNColumns(), and SimplexNRows().
Gets a row primal value after solving the simplex.
Definition at line 297 of file simplex_lpsolve.c. References TSimplex::lp.
Gets a row dual value after solving the simplex.
Definition at line 302 of file simplex_lpsolve.c. References TSimplex::lp. Referenced by SimplexGetOptimalValue().
Adds a row (i.e., a constraint) to the simplex. This function adds the row without any process of the constraint. The input linear constraint must have the bound properly expanded (see SimplexExpandBounds) before using this function.
Definition at line 307 of file simplex_lpsolve.c. References GetLinearConstraintCoefficients(), GetLinearConstraintError(), GetLinearConstraintVariable(), TSimplex::lp, NEW, PrintInterval(), PrintLinearConstraint(), SimplexNRows(), SimplexSetRowBounds(), and TRUE. Referenced by SimplexAddNewConstraint().
Sets a new objective function. We always minimize the objective functions. To maximize just invert the linear constraint before setting it as an optimal function.
Definition at line 340 of file simplex_lpsolve.c. References GetLinearConstraintCoefficient(), GetLinearConstraintCoefficients(), GetLinearConstraintVariable(), GetNumTermsInLinearConstraint(), TSimplex::lp, and NEW. Referenced by ReduceRange().
Gets the current objective function.
Definition at line 374 of file simplex_lpsolve.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, NEW, SimplexNColumns(), and SimplexNRows(). Referenced by SimplexGetOptimalValue().
Gets the optimal value after optimizing the problem. This function returns the value as given by the simplex engine in use. See SimplexGetOptimalValue for a procedure that adjusts this raw value to get a numerically safe optimal (i.e., it compensates for floating points rounding errors).
Definition at line 394 of file simplex_lpsolve.c. References TSimplex::lp. Referenced by ReduceRange(), and SimplexGetOptimalValue().
Determines an optimal value given a set of constraints and an objective function.
Definition at line 399 of file simplex_lpsolve.c. References EMPTY_BOX, ERROR_IN_PROCESS, TSimplex::lp, REDUCED_BOX, and UNBOUNDED_BOX. Referenced by ReduceRange().
Deletes the TSimplex structure and frees the allocated memory.
Definition at line 423 of file simplex_lpsolve.c. References TSimplex::lp. Referenced by ReduceBox(). |
Follow us!