CPXXmultiobjchgattribs and CPXmultiobjchgattribs
The routine
CPXXmultiobjchgattribs/CPXmultiobjchgattribs
changes the name, the weight, priority, absolute and relative
tolerance attributes of an objective in the multiobjective
description of a CPLEX problem object.
int CPXXmultiobjchgattribs( CPXCENVptr env, CPXLPptr lp, CPXDIM objind, double offset, double weight, CPXDIM priority, double abstol, double reltol, char const * name)
int CPXmultiobjchgattribs( CPXCENVptr env, CPXLPptr lp, int objind, double offset, double weight, int priority, double abstol, double reltol, char const * name)
Description
The routine
CPXXmultiobjchgattribs/CPXmultiobjchgattribs
changes the name, the weight, priority, absolute and relative
tolerance attributes of an objective in the multiobjective
description of a CPLEX problem object.
The objective must already exist in the CPLEX problem object.
Setting an entry to unchanged indicates the current value should be left in place (see the parameter descriptions below).
Using this function to change the name of the 0-th
objective is equivalent to calling
CPXchgobjname/CPXXchgobjname.
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. - objind
- An integer that specifies the numeric index of the objective whose attributes are to be changed.
- offset
- A double number that should be the new offset that specifies the constant term associated with the objective function.
- weight
- A double number that should be the new weight of the objective. Pass in CPX_NO_WEIGHT_CHANGE to leave the weight unchanged.
- priority
- An integer number that should be the new priority of the objective. Pass in CPX_NO_PRIORITY_CHANGE to leave the priority unchanged.
- abstol
-
A double number that should be the new absolute tolerance of the objective.
Pass in
CPX_NO_ABSTOL_CHANGEto leave the absolute tolerance unchanged. When specifying a new value, the same limits apply as with theCPXPARAM_MIP_Tolerances_AbsMIPGapparameter. See the section on Specifying multiple objective problems in the CPLEX User's Manual for the details on the meaning of this tolerance. - reltol
-
A double number that should be the new relative tolerance of the objective.
Pass in
CPX_NO_RELTOL_CHANGEto leave the relative tolerance unchanged. When specifying a new value, the same limits apply as with theCPXPARAM_MIP_Tolerances_MIPGapparameter. Note that a nondefault setting of this parameter only applies to MIP multiobjective problems. See the section on Specifying multiple objective problems in the CPLEX User's Manual for the details on the meaning of this tolerance. - name
-
The new name of the objective. Pass in
NULLto leave the name unchanged.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXmultiobjchgattribs (env, lp, 10, 2.0, 99,
CPX_NO_ABSTOL_CHANGE, CPX_NO_RELTOL_CHANGE, NULL);