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

OsiSolverInterface::addRow() throws unhelpful exception #109

Open
svigerske opened this issue Mar 2, 2019 · 1 comment
Open

OsiSolverInterface::addRow() throws unhelpful exception #109

svigerske opened this issue Mar 2, 2019 · 1 comment
Labels
enhancement New feature or request Osi Base Class

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: gidden

Original creation time: 2014-02-07 16:22:39

Assignee: @mjsaltzman

Version: 0.104

Code snippet:
Code snippet:

  OsiSolverInterface* si = new OsiClpSolverInterface();
  CoinPackedVector row1;
  row1.setElement(0, 1.0); // x                                                                                                                       
  row1.setElement(1, 1.0); // y                                                                                                                       
  si->addRow(row1, 'G', 1.0, 0.0);
  delete si;

Results in the following:
unknown file: Failure
Unknown C++ exception thrown in the test body.

@svigerske svigerske added bug Something isn't working major Osi Base Class labels Mar 2, 2019
@svigerske
Copy link
Member Author

Comment by gidden created at 2014-02-07 17:13:29

I'll note this was because I used the setElement member function rather than insert. I should have read the documentation more carefully, however, I think two things would be great in order to close this ticket:

  • if possible, identify the throw and add a message
  • add an @throws directive in the doxygen documentation

@svigerske svigerske added enhancement New feature or request and removed major bug Something isn't working labels Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Osi Base Class
Projects
None yet
Development

No branches or pull requests

1 participant