CPXXparamsetaddstr and CPXparamsetaddstr
The routine
CPXXparamsetaddstr/CPXparamsetaddstr
adds a string parameter to a parameter set.
int CPXXparamsetaddstr( CPXCENVptr env, CPXPARAMSETptr ps, int whichparam, char const * svalue)
int CPXparamsetaddstr( CPXCENVptr env, CPXPARAMSETptr ps, int whichparam, char const * svalue)
Description
The routine
CPXXparamsetaddstr/CPXparamsetaddstr
adds a string parameter 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/CPXparamsetcreate. - whichparam
- The symbolic constant (or reference number) of the parameter to add.
- svalue
-
The new value of the parameter. The maximum length of
svalue, including the NULL terminator (the character'\0'orchar(0)), isCPX_STR_PARAM_MAX(defined incpxconst.h) bytes. Settingsvalueto a string longer than this results in an error. Must not beNULL.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXparamsetaddstr (env, ps, CPXPARAM_WorkDir, "mydir");
See also Parameter sets and Examples for multiobjective optimization in the CPLEX User's Manual.