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
Set correct flux bounds #866
Conversation
Codecov Report
@@ Coverage Diff @@
## devel #866 +/- ##
==========================================
- Coverage 84.39% 84.38% -0.02%
==========================================
Files 47 47
Lines 4216 4213 -3
Branches 981 981
==========================================
- Hits 3558 3555 -3
Misses 424 424
Partials 234 234
Continue to review full report at Codecov.
|
Hi @MaxGreil, Some smaller things I would change
The problem with setting the upper and lower bounds individually, is that there are 2 checks performed (both time it is checked if the bounds fit, whereas setting both at once requires only one check). In addition as far as I remember the constraints in optlang are generated at once, instead after each other (which results in some speedup for many reactions). I.e. use
to set the upper and lower bound at the same time directly from configuration, i.e. instead of
better
Same at the other two locations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Would be helpful to add a test to avoid regressions in the future.
Hi @cdiener , |
Sets default bounds via configuration, adds a reaction with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't get a chance to look at this earlier. Just some style changes:
- There is no need for parentheses in these cases.
- Please rename the global
CONFIGURATION
variable toconfig
. I would like to do this everywhere anyhow.
@MaxGreil you are almost there. Just write the test and do the minor changes proposed by @Midnighter then this pull request can be merged. |
Thanks a lot for your contribution @MaxGreil 😃 |
This PR is supposed to fix #858.