Timelimit and MipGap using CyLP interface for CBC #127
-
I have a model that, in a short time period, finds quality solutions but takes a long time to find and prove its optimality. To work around this situation, I'm trying to activate the MipGap and/or the TimeLimit parameters, but I can't find documentation or examples using them in CyLP. Does anyone know how to activate them? I know how to do this on CPLEX and Gurobi, but I'm not finding how to do it on CyLP for CBC. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is a good question. I poked around a bit and I could not see a way to pass in arbitrary parameters (I'm not the original author of CyLP). I'm kind of surprised that these particular parameters don't seem to be supported, though. It shouldn't be that hard to hack something up if you're comfortable modifying the source code of CyLP. This is where the parameters would get passed: Lines 34 to 37 in 1769ca6 Right now, they're hard-coded, but it would not be hard to make the solve() call of CyCbcModel just take a command-line string that would set whatever parameters you like and pass them in here.Lines 145 to 150 in b92ba0a Feel free to open an issue if you're not comfortable doing this yourself, but I don't know when I'll have the bandwidth to look at it. If you want some pointers how to do it, I can give some more details. I would be happy to have a PR. |
Beta Was this translation helpful? Give feedback.
This is a good question. I poked around a bit and I could not see a way to pass in arbitrary parameters (I'm not the original author of CyLP). I'm kind of surprised that these particular parameters don't seem to be supported, though. It shouldn't be that hard to hack something up if you're comfortable modifying the source code of CyLP. This is where the parameters would get passed:
CyLP/cylp/cpp/ICbcModel.cpp
Lines 34 to 37 in 1769ca6
Right now, they're hard-coded, but it would not be hard to make the
solve()
call of CyCbcMod…