CPXXchgprobtypesolnpool and CPXchgprobtypesolnpool
The routine CPXXchgprobtypesolnpool/CPXchgprobtypesolnpool
changes the current problem, if it is a mixed integer problem,
to a related fixed problem using a solution from the solution
pool.
int CPXXchgprobtypesolnpool( CPXCENVptr env, CPXLPptr lp, int type, int soln )
int CPXchgprobtypesolnpool( CPXCENVptr env, CPXLPptr lp, int type, int soln )
Description
The routine CPXXchgprobtypesolnpool/CPXchgprobtypesolnpool
changes the current problem, if it is a mixed integer problem,
to a related fixed problem using a solution from the solution
pool. The problem types
that can be used appear in the table.
| Value | Symbolic Constant | Meaning |
| 3 | CPXPROB_FIXEDMILP |
Problem is an LP (linear program) obtained from the original MIP (mixed integer program) by fixing all integer variables. |
| 8 | CPXPROB_FIXEDMIQP |
Problem with quadratic data and with integer variables fixed. |
A mixed integer problem (CPXPROB_MILP,
CPXPROB_MIQP) can be changed to a fixed problem
(CPXPROB_FIXEDMILP, CPXPROB_FIXEDMIQP)
where bounds on integer variables are fixed to the values
attained in the integer solution.
If the original problem included SOS constraints (special ordered sets), even noninteger variables in those constraints will be fixed; with the variables thus fixed, the SOS constraints will be discarded from the problem.
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX LP problem object as returned by
CPXXcreateprob/CPXcreateprob. - type
- An integer specifying the target problem type.
- soln
- An integer specifying the index of the solution pool member whose values are to be used. A value of -1 specifies that the incumbent solution should be used instead of a solution pool member.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXchgprobtypesolnpool (env, lp, CPXPROB_FIXEDMILP, 1);