NO FRAMES

CPXfeasopt

int CPXPUBLIC CPXfeasopt(CPXCENVptr env, CPXLPptr lp, double * rhs, double * rng, double * lb, double * ub, int optind)
Definition file: cplex.h

The routine CPXfeasopt computes a minimal relaxation of the bounds of variable bounds or the right-hand sides of constraints that make the active model feasible. For each bound, the user may specify a preferred value indicating how much relaxation of that bound is acceptable. Similarly, for every right-hand side value or (where applicable) range value, the user may specify a preferred value indicating how much relaxation of that value is a acceptable. A negative or zero (0) value indicates that the corresponding bound must not be relaxed. Typically, values greater than or equal to one should be used.

If enough variables or constraints were allowed to be relaxed, the routine returns with suggested relaxed values that would make the active model feasible. These bounds are chosen in such a way that the relaxation is minimal in the sense that the sum of (relaxation amount)/(preference value) over all variables and constraints is minimized.

A solution vector for the model relaxed in this way will be available.

When the argument optind is true, this method also tries to find the optimal solution of the minimally relaxed model.

Parameters

env

Pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

Pointer to a CPLEX problem object as returned by CPXcreateprob.

rhs

An array of doubles of length at least equal to the number of rows in the problem. NULL may be specified if no rhs values are allowed to be relaxed. When a non-NULL array is passed and the function successfully finds a relaxation, the elements of the array will contain the new values for the right-hand side that constitute the feasible relaxation found by CPXfeasopt.

rng

An array of doubles of length at least equal to the number of rows in the problem. NULL may be specified if no range values are allowed to be relaxed or none are present in the active model. When a non-NULL array is passed and the function successfully finds a relaxation, the elements of the array will contain the new values for the ranges that constitute the feasible relaxation found by CPXfeasopt.

lb

An array of doubles of length at least equal to the number of columns in the problem. NULL may be passed if no lower bound of any variable is allowed to be relaxed. When a non-NULL array is passed and the function successfully finds a relaxation, the elements of the array will contain the new values for the lower bounds that constitute the feasible relaxation found by CPXfeasopt.

ub

An array of doubles of length at least equal to the number of columns in the problem. NULL may be passed if no upper bound of any variable is allowed to be relaxed. When a non-NULL array is passed and the function successfully finds a relaxation, the elements of the array will contain the new values for the upper bounds that constitute the feasible relaxation found by CPXfeasopt.

optind

Optimization indicator. If this parameter is true, then CPXfeasopt tries to find the optimal solution of the minimally relaxed model.

Returns:

The routine returns zero on success and nonzero if an error occurs.