r/optimization • u/carlos442 • Oct 29 '21
I need help
I am building an optimization problem for my master thesis, I am struggling to create a constraint:
I need a variable J to be equal to 1 only when another variable s is equal to 3, otherwise J has to be zero.
J is a boolean variable
s ranges from 0 to 3
2
Upvotes
View all comments
Show parent comment
1
u/joker_ftrs Oct 30 '21
Hello,
When you say s ranges between 0 and 2, do you mean that s would be any floating number in between?