simplex.c File Reference Detailed DescriptionImplementation of the functions operating on box TSimplex that are independent of the simplex backend.
Definition in file simplex.c.
Function Documentation
Expands an interval according to the equation type.
This is an auxiliary function used when defining the bounds for a given simplex constraint. The implementation of this function is common to all simplex engines. The definition of the constant INF is the one that differs between simplex engines.
Definition at line 19 of file simplex.c. References GEQ, INF, LEQ, LowerLimit(), NewInterval(), and UpperLimit(). Referenced by CropEquation(), SetEquationInfo(), and SimplexAddNewConstraint(). Uses the ranges in a box to set the valid ranges for the primary variables of the simplex (i.e., the ranges for the column variables).
Definition at line 40 of file simplex.c. References GetBoxIntervals(), GetBoxNIntervals(), INF, IntervalSize(), PrintInterval(), and SimplexSetColBounds(). Referenced by ReduceRange().
Adds a row (i.e., a constraint) after pre-processing it:
Definition at line 67 of file simplex.c. References BoundedLinearConstraint(), CleanLinearConstraint(), CopyLinearConstraint(), DeleteLinearConstraint(), EQU, GEQ, GetLinearConstraintError(), GetLinearConstraintErrorSize(), GetNumTermsInLinearConstraint(), IntervalCenter(), IntervalSize(), LEQ, NewInterval(), PrintLinearConstraint(), randomDouble(), SetLinearConstraintError(), SimplexAddNewConstraintRaw(), SimplexExpandBounds(), SimplifyLinearConstraint(), TRUE, and ZERO. Referenced by AddEquation2Simplex(), and LinearizeGeneralEquationInt(). Returns the optimal value determined by the simplex corrected to compensate for possible rounding effects. The procedure implemented in this function is described in
Definition at line 215 of file simplex.c. References DeleteLinearConstraint(), GetBoxInterval(), GetLinearConstraintCoefficient(), GetLinearConstraintVariable(), GetNumTermsInLinearConstraint(), INF, IntervalAdd(), IntervalProduct(), LowerLimit(), NEW, NewInterval(), ROUNDDOWN, ROUNDNEAR, ROUNDUP, SimplexGetColConstraint(), SimplexGetOptimalValueRaw(), SimplexGetOptimizationFunction(), SimplexGetRowBounds(), SimplexGetRowDual(), SimplexNColumns(), SimplexNRows(), and UpperLimit(). Referenced by ReduceRange().
Reduces a variable range using the given simplex. The reduction basically consists in minimizing and maximizing with an objective function that only takes into account the selected variable.
Definition at line 329 of file simplex.c. References AddTerm2LinearConstraint(), CopyInterval(), DeleteLinearConstraint(), EMPTY_BOX, EmptyInterval(), Error(), ERROR_IN_PROCESS, FALSE, GetBoxInterval(), INF, InitLinearConstraint(), IntervalSize(), LowerLimit(), PrintInterval(), REDUCED_BOX, ResetLinearConstraint(), ResetSimplex(), SetSimplexBounds(), SimplexGetOptimalValue(), SimplexGetOptimalValueRaw(), SimplexSetOptimizationFunction(), SimplexSolve(), TRUE, UNBOUNDED_BOX, UpdateLowerLimit(), UpdateUpperLimit(), and UpperLimit(). Referenced by ReduceBox(). |
Follow us!