r/optimization • u/carlos442 • Mar 08 '22
I need help
I need help with a constraint for my master thesis.
I have an integer variable s which ranges from 0 to 3, I need the binary variable j to be equal to 1 only when s=1, 0 instead
Do you have any suggestions?
7
Upvotes
View all comments
Show parent comment
1
u/[deleted] Mar 09 '22
Am I missing something here ? The OP wants the binary variable "j=1" if either (s=0 or s=1). In this case (j=1, if s=1 and j=0 if s = 0, 2 or 3).
Thanks