Skip to content
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

is_sense parsing error when < at position 1023 in a constraint line #144

Closed
dlaehnemann opened this issue Feb 17, 2021 · 3 comments
Closed

Comments

@dlaehnemann
Copy link

I've been tripped up by a very weird bug, that led to a line parsing failure and then down the line to renamed variables, so that I could not use the eventual solution. Here's the minimal example to reproduce the problem (simply rename to the extension '.lp, GitHub doesn't allow uploads with that extension...):

buffer_size_issue.txt

When running cbc buffer_size_issue.lp solve on it, it throws:

Welcome to the CBC MILP Solver 
Version: 2.10.5 
Build Date: Dec  8 2020 

command line - cbc weird_corner_case.lp solve (default strategy 1)
### ERROR: CoinLpIO: is_sense(): string: < 
 CoinLpIO::readLp(): Maximization problem reformulated as minimization
### CoinLpIO::is_invalid_name(): Name < contains illegal character '<'
### CoinLpIO::are_invalid_names(): Invalid name: vnames[63]: <
### CoinLpIO::readLp(): Invalid column names
Now using default column names.

As deleting any single char in the c6708: line makes this error go away, and the < char (from <=) is in position 1023 of the line, and the buffer size for parsing is 1024, I am assuming it is something to do with this combination chopping up the <= and then is_sense complaining that there's only the < and no = following it in the buffer. I guess this special requires explicit handling in is_sense and maybe elsewhere, as well?

@jjhforrest
Copy link
Contributor

jjhforrest commented Feb 17, 2021 via email

@jjhforrest
Copy link
Contributor

jjhforrest commented Feb 18, 2021 via email

@dlaehnemann
Copy link
Author

Hi John,

the swift response is very much appreciated, and this does fix the minimal example I provided. So I'll close this issue.

However, I've found some further parsing issues and created the follow-up issues #145 and #146.

Thanks a lot and best regards,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants