Replies: 1 comment
-
|
I think you need some integer variables: Let Then: To get at least one even value, you need one variable to be greater or equal to 1. I hope that helps. At least it is way to start. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have this code:
I want to add a condition where at least one value in "variables_decision" must be even (not counting values where solution is 0)
I tried % shenanigans:
[variables_decision[i] % 2
But pulp complain with:
TypeError: unsupported operand type(s) for %: 'LpVariable' and 'int'Any advice is welcome, thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions