NO FRAMES

CPXchgobjsen

void CPXPUBLIC CPXchgobjsen(CPXCENVptr env, CPXLPptr lp, int maxormin)
Definition file: cplex.h
Include files: cplex.h

The routine CPXchgobjsen is used to change the sense of the optimization for a problem, to maximization or minimization.

Note
For problems with a quadratic objective function, changing the objective sense may make the problem unsolvable. Further changes to the quadratic coefficients may then be required to restore the convexity (concavity) of a minimization (maximization) problem.
Values of maxormin
CPX_MIN(1)new sense is minimize
CPX_MAX(-1)new sense is maximize

Example

 CPXchgobjsen (env, lp, CPX_MAX);
 

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

maxormin

An integer that indicates the new sense of the problem.

Returns:

This routine does not return a result.