CPXXparamsetaddint and CPXparamsetaddint
The routine
CPXXparamsetaddint/CPXparamsetaddint
adds a parameter of type CPXINT to a parameter set.
int CPXXparamsetaddint( CPXCENVptr env, CPXPARAMSETptr ps, int whichparam, CPXINT ivalue)
int CPXparamsetaddint( CPXCENVptr env, CPXPARAMSETptr ps, int whichparam, int ivalue)
Description
The routine
CPXXparamsetaddint/CPXparamsetaddint
adds a parameter of type CPXINT to a parameter
set. If the parameter does not yet exist in the parameter set
then it gets added with the specified value. If the parameter is
already in the parameter set then its current value will be
replaced by the specified value.
The CPLEX Parameters Reference Manual provides a list of parameters with their types, options, and default values.
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - ps
-
A pointer to the CPLEX parameter set as returned by
CPXXparamsetcreate/CPXparamsetcreateusingenvas the environment. - whichparam
- The symbolic constant (or reference number) of the parameter to add.
- newvalue
- The new value of the parameter.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXparamsetaddint (env, ps, CPXPARAM_Advance, CPX_ON);
See also Parameter sets and Examples for multiobjective optimization in the CPLEX User's Manual.
The argument
whichparam denotes a
parameter of type CPX_PARAMTYPE_INT. For
compatibility with previous versions of the product, this
routine also accepts parameters of type
CPX_PARAMTYPE_LONG. If the parameter
denoted by whichparam
is of type CPX_PARAMTYPE_LONG, then a
newvalue smaller than
2100000000 is assigned to the parameter. If
newvalue is instead
greater than or equal to 2100000000 (meaning unlimited in
size, practically equivalent to infinity) then the value
9223372036800000000 is assigned to the parameter, meaning
unlimited in size, practically equivalent to infinity for
parameters of type CPX_PARAMTYPE_LONG.
Analogously, values smaller than -2100000000 are transformed
to -9223372036800000000.