simplex_clp.c File Reference Detailed DescriptionImplementation of the functions operating on TSimplex using the Clp backend.
Definition in file simplex_clp.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 22 of file simplex_clp.c. References TSimplex::fakeRows, INF, TSimplex::lower, TSimplex::lp, NEW, TSimplex::obj, SIMPLEX_TIMEOUT, and TSimplex::upper.
Removes the rows (i.e., constraints) from the simplex structure.
Definition at line 96 of file simplex_clp.c.
Gets the number of columns (i.e., variables) of the simplex structure.
Definition at line 102 of file simplex_clp.c. References TSimplex::lp. Referenced by SimplexGetOptimizationFunction(), SimplexGetRowConstraint(), and SimplexSetOptimizationFunction().
Gets the number of rows (i.e., constraints) of the simplex structure.
Definition at line 107 of file simplex_clp.c. References TSimplex::fakeRows, and TSimplex::lp. Referenced by SimplexAddNewConstraintRaw(), and SimplexDelete(). Sets the bounds for a given column (i.e., variable).
Definition at line 113 of file simplex_clp.c. References TSimplex::lower, LowerLimit(), TSimplex::lp, TSimplex::upper, and UpperLimit(). Gets the bounds for a given column (i.e., variable).
Definition at line 123 of file simplex_clp.c. References TSimplex::lp, and NewInterval(). Referenced by SimplexGetColConstraint().
Gets a column from the simplex in the form of a linear constraint.
Definition at line 133 of file simplex_clp.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, SetLinearConstraintError(), and SimplexGetColBounds(). Gets a column constraint from the simplex.
Definition at line 159 of file simplex_clp.c. References TSimplex::lp.
Gets a column primal value after solving the simplex.
Definition at line 168 of file simplex_clp.c. References TSimplex::lp.
Gets a column dual value after solving the simplex.
Definition at line 177 of file simplex_clp.c. References TSimplex::lp. Sets the bounds for a given row (i.e., constraint).
Definition at line 187 of file simplex_clp.c. References Error(). Gets the bounds for a given row (i.e., constraint).
Definition at line 193 of file simplex_clp.c. References TSimplex::fakeRows, TSimplex::lp, and NewInterval(). Referenced by SimplexGetRowConstraint().
Gets a row constraint from the simplex.
Definition at line 203 of file simplex_clp.c. References AddTerm2LinearConstraint(), TSimplex::fakeRows, InitLinearConstraint(), TSimplex::lp, SetLinearConstraintError(), SimplexGetRowBounds(), and SimplexNColumns().
Gets a row primal value after solving the simplex.
Definition at line 241 of file simplex_clp.c. References TSimplex::fakeRows, and TSimplex::lp.
Gets a row dual value after solving the simplex.
Definition at line 250 of file simplex_clp.c. References TSimplex::fakeRows, and TSimplex::lp.
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 259 of file simplex_clp.c. References GetLinearConstraintCoefficients(), GetLinearConstraintError(), GetLinearConstraintVariables(), GetNumTermsInLinearConstraint(), LowerLimit(), TSimplex::lp, PrintInterval(), PrintLinearConstraint(), SimplexNRows(), TRUE, and UpperLimit().
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 286 of file simplex_clp.c. References GetLinearConstraintCoefficient(), GetLinearConstraintVariable(), GetNumTermsInLinearConstraint(), TSimplex::lp, TSimplex::obj, and SimplexNColumns().
Gets the current objective function.
Definition at line 312 of file simplex_clp.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, and SimplexNColumns().
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 327 of file simplex_clp.c. References TSimplex::lp.
Determines an optimal value given a set of constraints and an objective function.
Definition at line 332 of file simplex_clp.c. References EMPTY_BOX, ERROR_IN_PROCESS, TSimplex::fakeRows, TSimplex::lp, REDUCED_BOX, and UNBOUNDED_BOX.
Deletes the TSimplex structure and frees the allocated memory.
Definition at line 367 of file simplex_clp.c. References TSimplex::lower, TSimplex::lp, TSimplex::obj, SimplexNRows(), and TSimplex::upper. |
Follow us!