-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Longer runtimes for ILP models created with addVariable
versus addCol
#1819
Comments
In what way do you believe that the underlying model they create is different?
Line 214 in 0095d61
Highs::addCol in C++, whereas addCol in Python (as you've used it) is bound directly to Highs::addCol . Since both then do the same few operations in Highs::addCol , maybe these operations make the difference.
Conicidentally, today I discussed |
The difference I observed is that the The I guess that, somehow, building the model with Example logsCreated with
Created with
|
I've reproduced the timing difference for However, when writing out the respective models to verify that they are identical, the meaningful difference in the two running times disappeared. That the differences in model building cause significantly different run times for the same model is intriguing, but not something that I'm in a position to investigate at this time. |
Apologies, I was travelling in the last 2 weeks. I can replicate, however it's not If you remove the Note 1: I've not yet investigated why adding variable names impacts performance. |
For integer linear program models created via
highspy
v1.7.1, it seems that models created withaddCol
run a bit faster than models created withaddVariable
. The timing data below show this occurs for models with > 5000 variables, and occurs for several different randomly-generated models.I am surprised by this behavior. I would have expected that both the
addCol
andaddVariable
methods would create the same underlying model, and that the run times would be the same (up to random variations).This is not a barrier to my use of HiGHS -- I can just use
addCol
, like PuLP does. However, I hope that noting this might (1) help other users speed up their models or (2) help the maintainers identify a performance improvement.The script I used to generate the timing data is below:
The text was updated successfully, but these errors were encountered: