Your __doc__
suggests the following.
model.parameters.mip.limits.mipgap = 0.05
But that results in the following.
DOcplexException: No parameter with name mipgap in parameters.mip.limits
This is a common parameter, no? There must be a way to do it with docplex
...
Answer by DanielJunglas (2796) | Jun 07, 2016 at 01:14 AM
The mipgap is a tolerance, not a limit. Try
model.parameters.mip.tolerances.mipgap = 0.05
hooray!
BTW, the model.parameters.mip.limits.mipgap = 0.05
is in your code.
From within ipython i try ? m.paramters
and get the following.
This property returns the root parameter group of the model.
The root parameter group models the parameter hirerachy. It is the way to access any CPLEX parameter and get or set its value.
Examples:
model.parameters.mip.limits.mipgap
Returns the parameter itself, an instance of the Parameter class.
To get the value of the parameter, use the get() method, as in:
model.parameters.mip.limits.mipgap.get()
>>> 0.0001
To change the value of the parameter, use a plain Python assignment:
model.parameters.mip.limits.mipgap = 0.05
model.parameters.mip.limits.mipgap.get()
>>> 0.05
Assigment is a snynonym for the set() method:
model.parameters.mip.limits.mipgap.set(0.02)
model.parameters.mip.limits.mipgap.get()
>>> 0.02
Returns: the root parameter group, instance of ParameterGroup class.
PROOFREAD
Thanks for pointing this out. I have reported the issue to the maintainers.
Promotional version. Problem size limits exceeded, CPLEX code=1016 2 Answers
How can I call CPLEX Optimization Studio from a Jupyter notebook? 2 Answers
Privileges for IAM ibmdpuser when installing DSX Local in AWS? 2 Answers
Simulating Strong Branching in DOcplex [Python3] 1 Answer
Solver version 12.8.0.0 is lower than model format version 12.9.0.0 1 Answer