You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Cgl community!
I'll try to break the ice in this new section with a simple implementation question.
Setting
Let MIP be a generic integer program. The linear relaxation outputs a solution x', which is not feasible for the original MIP, and hence one wants to generate a valid inequality to cut off x'.
So far, I store this model in an object called CoinModel. I do not want to perform any operation on this model, but I need to get the generated cuts from some generators. In specific:
I need the cuts to be globally valid
I need the cuts to cut off the incumbent x'
I do not care about the expensiveness of the cutting-generation process as soon as I can get at least one cut
The coefficients in the constraint matrix are "nice" (meaning, usually integers), but the objective's ones are fractional up to 4 decimals.
I cannot exploit the reduced costs for variable fixing (this is due to the fact I actually solve a parametrized MIP, and at each iteration I try to generate cuts given some fixed parameters).
So far, this is a piece of the code I would use to generate GMIs.
auto candidateCuts = new OsiCuts;
CglTreeInfo info = CglTreeInfo();
info.inTree = false;
info.options = 4;
info.pass = 0;
CglGMI GMIGen;
auto GMIs = new OsiCuts;
GMIGen.getParam().setMAX_SUPPORT(numVars);
GMIGen.getParam().setMAX_SUPPORT_REL(0.8);
GMIGen.getParam().setMAXDYN(CoinModel->getInfinity());
GMIGen.getParam().setENFORCE_SCALING(true);
GMIGen.setGlobalCuts(true);
GMIGen.setAggressiveness(100);
GMIGen.generateCuts(*CoinModel, *GMIs, info);
for (int(i) = 0; (i) < GMIs->sizeCuts(); ++(i))
if (GMIs->rowCut(i).globallyValid())
candidateCuts->insert(GMIs->rowCut(i));
I then check that each cut violates the solution through rowCut->violated(x').
Some of my questions here are:
Is the info.option=8 the best-recommended option for my task?
Other than GMI, I'm using TwoMir and MIR2. Would you suggest any other cut generators (not from a theoretical perspective, but a practical one)
Are there any parameters forcing the generation of possibly expensive cuts which are guaranteed to cut off the solution?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello Cgl community!
I'll try to break the ice in this new section with a simple implementation question.
Setting
Let MIP be a generic integer program. The linear relaxation outputs a solution x', which is not feasible for the original MIP, and hence one wants to generate a valid inequality to cut off x'.
So far, I store this model in an object called CoinModel. I do not want to perform any operation on this model, but I need to get the generated cuts from some generators. In specific:
So far, this is a piece of the code I would use to generate GMIs.
I then check that each cut violates the solution through
rowCut->violated(x')
.Some of my questions here are:
Beta Was this translation helpful? Give feedback.
All reactions