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

Fix convexity unary #124

Merged
merged 4 commits into from
Jul 1, 2021
Merged

Fix convexity unary #124

merged 4 commits into from
Jul 1, 2021

Conversation

svigerske
Copy link
Member

@svigerske svigerske commented Jun 30, 2021

On GAMS modellib model hda, I got a problem because std::dynamic_pointer_cast<ExpressionUnary>(child) was NULL even though child->getNumberOfChildren() == 1. Apparently, child was a product with only 1 child.

This pull request fixes this by checking that the expression is of type ExpressionUnary instead of checking the number of children.

- 1 child could also mean something else, e.g., a product with 1 child
  only
@svigerske
Copy link
Member Author

I don't know how to check why some tests failed. There is too little output to see whether that is connected to this pull-request.

@andreaslundell
Copy link
Member

I will check this later. You can get more output from the tests with

test/test_runner <test> <number>

Where <test> is one of Model, Settings, Cbc, Cplex, Gurobi, GAMS, Solver or Ipopt. <number> is the test number that failed.

@svigerske
Copy link
Member Author

The tests fail with

Starting test to solve problem with semicont. variables:
 Problem file "data/meanvarxsc.osil" does not exist.
Finished test to solve problem with semicont. variables.

I'll conclude that this has nothing to do with the changes in this pull request. You can probably easily add this file.

@andreaslundell andreaslundell merged commit 73e80e2 into master Jul 1, 2021
@andreaslundell andreaslundell deleted the fix-convexity-unary branch July 1, 2021 08:37
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

Successfully merging this pull request may close these issues.

None yet

2 participants