-
Notifications
You must be signed in to change notification settings - Fork 68
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
RFE: dynamic line length #80
Comments
As far as I can see, this should already be possible. Can you send me an LP file that exact SCIP cannot read? |
Sure -- I'll have to upload it somewhere; it's massive. |
So I looked at your instance, and the issue is not the line length but rather the length of the individual numbers. The LP file reader has a maximum length of It is of course possible to change this, but I have to caution you that your instance will almost certainly not be able to be solved with these enormous fractions unless you have a lot of time and almost unlimited memory. May I ask where this instance comes from and if this incredible amount of precision is really necessary? Because if it is, then I would be happy to help try to make this work somehow, I just never thought something like this would come up in practice. |
I built a system that represents the game tree of the Royal Game of Ur; minimal subgraphs are generated and passed to |
I see, and I am guessing these insanely long numbers result from multiplying a bunch of different win probabilities that were computed earlier in the process? I can change the code of the LP file reader to allow numbers of any encoding length, but I have to admit that I am not especially hopeful that SCIP will be able to solve this. I will ping you when I have a patch that you can try. If you can see any modelling tricks to avoid having these huge numbers everywhere, that would definitely be a plus 😅 . |
Exactly! |
I just ran into this too, I have a massive array of ~180k variables generated in the MiniZinc flattening process and so they had names like The error I ran into looked like:
Of note, the exact length of the replacement is important: replacing it with |
@magneticflux- I think that's a different issue. Can you provide the model.fzn that reproduces this? And which operating system are you using? (We currently look into some issue where fzn/opb files are not written correctly on windows only.) |
Sorry, I didn't realize previous discussion was about LP files rather than FZN files! Here's the FlatZinc, unzipped is 57MB: model.zip I'm using Linux and building SCIP v9.1.0 from source using https://github.com/Lichthagel/scipopt-nix:
Edit: |
The problem seems to be the long |
Here is a patch for the FlatZinc reader that should help on model_2.zip. It was a matter of reallocating sufficiently often: diff --git a/src/scip/reader_fzn.c b/src/scip/reader_fzn.c
index d7b6b5f453..75aac20c6f 100644
--- a/src/scip/reader_fzn.c
+++ b/src/scip/reader_fzn.c
@@ -448,7 +448,7 @@ SCIP_Bool getNextLine(
fzninput->linenumber++;
- if( fzninput->linebuf[fzninput->linebufsize - 2] != '\0' )
+ while( fzninput->linebuf[fzninput->linebufsize - 2] != '\0' )
{
int newsize; |
Regarding the original issue, I'm not sure that @leoneifler is still looking into this. Maybe he can give us an update whether the patch he mentioned in #80 (comment) is still planned to happen, or we should just close this issue as a won't-fix. |
Recently, scipopt/soplex@12ef6c8 gave SoPlex the ability to read LP files with arbitrarily long lines; could the same functionality be ported to (the exact-rational branch of) SCIP?
The text was updated successfully, but these errors were encountered: