IBMDecisionOptimization / docplex-examples

These samples demonstrate how to use the DOcplex library to model and solve optimization problems.
https://ibmdecisionoptimization.github.io/
Apache License 2.0
396 stars 228 forks source link

Does docplex have the similar function like the RINS in cplex? #72

Open StupidI opened 2 years ago

StupidI commented 2 years ago

I have looked up the reference manual, but can't search anything about RINS, only see an example of heuristic solution. Could anybody know it give me a hint?

PhilippeCouronne commented 2 years ago

The RINS heuristic is controlled in CPLEX via parameters, see https://www.ibm.com/docs/en/icos/22.1.0?topic=heuristics-relaxation-induced-neighborhood-search-rins-heuristic for details. By default, CPLEX decides automatically whether to use it and with what frequency.

Given an instance of docplex.mp.model.Model class, mdl, , you can access its parameters by the parameters attribute.

Thus

mdl.parameters.mip.strategy.rinsheur = -1

turns off the RINHS heuristic. mdl.parameters.mip.strategy.rinsheur = 100

sets the RINS heuristic frequency to 100

StupidI commented 2 years ago

The RINS heuristic is controlled in CPLEX via parameters, see https://www.ibm.com/docs/en/icos/22.1.0?topic=heuristics-relaxation-induced-neighborhood-search-rins-heuristic for details. By default, CPLEX decides automatically whether to use it and with what frequency.

Given an instance of docplex.mp.model.Model class, mdl, , you can access its parameters by the parameters attribute.

Thus

mdl.parameters.mip.strategy.rinsheur = -1

turns off the RINHS heuristic. mdl.parameters.mip.strategy.rinsheur = 100

sets the RINS heuristic frequency to 100

ok, thanks you a lot! plus: Are the meanings of all the different parameter values in docplex the same as in cplex? I've used "help(mdl.parameters.mip.strategy.rinsheur)" , but it seems not to show the imformation about explanation of the parameter or the acceptable range.

vberaudi commented 2 years ago

<<Are the meanings of all the different parameter values in docplex the same as in cplex?>> Yes, the hierarchy is the same as in the cplex package. The documentation however is only in 1 location.

StupidI commented 2 years ago

<<Are the meanings of all the different parameter values in docplex the same as in cplex?>> Yes, the hierarchy is the same as in the cplex package. The documentation however is only in 1 location.

oh, thank you!