|
|
simplex_glpk.c File ReferenceImplementation of the functions operating on TSimplex using the Glpk backend. More... #include "simplex.h" #include "error.h" #include "geom.h" #include "defines.h" #include <math.h> #include <string.h> Go to the source code of this file.
Detailed DescriptionImplementation of the functions operating on TSimplex using the Glpk backend.
Definition in file simplex_glpk.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_glpk.c. References Error(), TSimplex::lp, and SIMPLEX_TIMEOUT.
Here is the call graph for this function:
Removes the rows (i.e., constraints) from the simplex structure.
Definition at line 65 of file simplex_glpk.c. References TSimplex::lp.
Gets the number of columns (i.e., variables) of the simplex structure.
Definition at line 70 of file simplex_glpk.c. References TSimplex::lp.
Gets the number of rows (i.e., constraints) of the simplex structure.
Definition at line 75 of file simplex_glpk.c. References TSimplex::lp. Sets the bounds for a given column (i.e., variable).
Definition at line 81 of file simplex_glpk.c. References INF, LowerLimit(), TSimplex::lp, and UpperLimit().
Here is the call graph for this function:
Gets the bounds for a given column (i.e., variable).
Definition at line 110 of file simplex_glpk.c. References INF, TSimplex::lp, and NewInterval().
Here is the call graph for this function:
Gets a column from the simplex in the form of a linear constraint.
Definition at line 137 of file simplex_glpk.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, NEW, SetLinearConstraintError(), SimplexGetColBounds(), and SimplexNRows().
Here is the call graph for this function:
Gets a column constraint from the simplex.
Definition at line 162 of file simplex_glpk.c. References TSimplex::lp.
Gets a column primal value after solving the simplex.
Definition at line 167 of file simplex_glpk.c. References TSimplex::lp.
Gets a column dual value after solving the simplex.
Definition at line 172 of file simplex_glpk.c. References TSimplex::lp. Sets the bounds for a given row (i.e., constraint).
Definition at line 178 of file simplex_glpk.c. References INF, LowerLimit(), TSimplex::lp, and UpperLimit().
Here is the call graph for this function:
Gets the bounds for a given row (i.e., constraint).
Definition at line 207 of file simplex_glpk.c. References INF, TSimplex::lp, and NewInterval().
Here is the call graph for this function:
Gets a row constraint from the simplex.
Definition at line 234 of file simplex_glpk.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, NEW, SetLinearConstraintError(), SimplexGetRowBounds(), and SimplexNColumns().
Here is the call graph for this function:
Gets a row primal value after solving the simplex.
Definition at line 259 of file simplex_glpk.c. References TSimplex::lp.
Gets a row dual value after solving the simplex.
Definition at line 264 of file simplex_glpk.c. References 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 269 of file simplex_glpk.c. References Error(), GetLinearConstraintCoefficient(), GetLinearConstraintError(), GetLinearConstraintVariable(), TSimplex::lp, NEW, PrintInterval(), PrintLinearConstraint(), SimplexSetRowBounds(), and TRUE.
Here is the call graph for this function:
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 309 of file simplex_glpk.c. References GetLinearConstraintCoefficient(), GetLinearConstraintVariable(), GetNumTermsInLinearConstraint(), TSimplex::lp, and SimplexNColumns().
Here is the call graph for this function:
Gets the current objective function.
Definition at line 340 of file simplex_glpk.c. References AddTerm2LinearConstraint(), InitLinearConstraint(), TSimplex::lp, and SimplexNColumns().
Here is the call graph for this function:
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 352 of file simplex_glpk.c. References TSimplex::lp.
Determines an optimal value given a set of constraints and an objective function.
Definition at line 357 of file simplex_glpk.c. References EMPTY_BOX, ERROR_IN_PROCESS, TSimplex::lp, REDUCED_BOX, and UNBOUNDED_BOX.
Deletes the TSimplex structure and frees the allocated memory.
Definition at line 391 of file simplex_glpk.c. References TSimplex::lp. |