CPXXgetub and CPXgetub

The routine CPXXgetub/CPXgetub accesses a range of upper bounds on the variables of a CPLEX problem object.

int  CPXXgetub( CPXCENVptr env, CPXCLPptr lp, double * ub, CPXDIM begin, CPXDIM end )

int  CPXgetub( CPXCENVptr env, CPXCLPptr lp, double * ub, int begin, int end )

Description

The routine CPXXgetub/CPXgetub accesses a range of upper bounds on the variables of a CPLEX problem object. The beginning and end of the range must be specified.

Unbounded Variables

If a variable lacks an upper bound, then CPXXgetub/CPXgetub returns a value greater than or equal to CPX_INFBOUND.

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
ub
An array where the specified upper bounds on the variables are to be returned. This array must be of length at least (end-begin+1). The upper bound of variable j is returned in ub[j- begin].
begin
An integer specifying the beginning of the range of upper bounds to be returned.
end
An integer specifying the end of the range of upper bounds to be returned.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

Example


status = CPXgetub (env, lp, ub, 0, cur_numcols-1);