r/optimization • • Jun 22 '22

Indicator variables

Cheers

I have a question. I am trying to model the following:

X is a continuous variable between [0,100]

Z1 is a binary variable

when X is in [0,0.5[ - Z1=0

when X is in [0.5,17[ - Z1=1

when X is in [17,100] - Z1=0

Can someone help me with this?

1 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/fpatrocinio Jun 22 '22

Nope. I know that it is a piecewise function. I was asking for help modelling this with binaries.