Forum Discussion
FICO
4 years agoCommunity Manager
Optimizer controls in Python
Could you please point to a reference of the solver controls that can be set from Python API (package xpress)? It seems that the names are not the same as in Mosel (e.g., XPRS_MIPRELSTOP and XPRS_VE...
FICO
4 years agoCommunity Manager
The reference documentation for xpress.problem.setControl() says:
setControl(...)
Purpose:
Sets one or more controls of a problem.
Synopsis:
problem.setControl(string, value)
Example:
p = xpress.problem()
p.setControl('miprelstop', 1e-4)
p.setControl({'feastol': 1e-4, 'presolve': 0})
Further information:
...
2.
This function can be used in two ways depending on whether one wants
to set one or more controls. In the first case, the arguments form a
pair (string, value) where the first element is the lower-case name of
a control (see the Xpress Optimizer reference manual for a complete
list of controls). In the second case, the argument is a Python
dictionary whose keys are control name string and whose values
are the value of the control.So the names of controls used in the Python interface are the lower-case names (without the XPRS_ prefix).
The same naming convention applies when referring to controls as object members.
