Overview | Group | Index | Concepts |
The routine CPXgetcolinfeas
computes the
infeasibility of a given solution for a range of variables. The
beginning and end of the range must be specified. This routine
checks whether each variable takes a value within its bounds, but it
does not check for integer feasibility in the case of integer
variables. For each variable, the infeasibility value returned is 0
(zero) if the variable bounds are satisfied. Otherwise, if the
infeasibility value is negative, it indicates the amount by which
the lower bound (or semi-continuous lower bound in case of a
semi-continuous or semi-integer variable) of the variable must be
changed to make the queried solution valid. If the infeasibility
value is positive, it indicates the amount by which the upper bound
of the variable must be changed.
Example
status = CPXgetcolinfeas (env, lp, NULL, infeasout, 0, CPXgetnumcols(env,lp)-1);
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
x | The solution whose infeasibility is to be computed. May be NULL, in which case the resident solution is used. |
infeasout | An array to receive the infeasibility value for each of the variables. This array must be of length at least ( |
begin | An integer indicating the beginning of the range of variables whose infeasibility is to be returned. |