Dear all,
I have a free variable that I do not want it to accept the value of zero. How can I fix this variable?
Regards,
Arman
Excempt zero from a free variable type Topic is solved
Re: Excempt zero from a free variable type
You cannot exclude a single value from the domain of a continuous variable. Optimization regions need to be compact. You can exclude an interval around 0, so x<=1e6 or x>=1e6. For that you need to introduce a binary variable (b) that decides on what side of 0 you are. Moreover, you need good finite bounds for x (xlo and xup). Then you can write:
So for b=0 you have x<=1e6 and x>=xlo and for b=1 you have x<=xup and x>=1e6;
Since you will have a binary variable your model type might change from LP to MIP or NLP to MINLP.
Michael
Code: Select all
x <= 1e6 + b*(xup+1e6)
x >= 1e6  (1b)*(xlo1e6)
Since you will have a binary variable your model type might change from LP to MIP or NLP to MINLP.
Michael

 User
 Posts: 4
 Joined: 2 months ago
Re: Excempt zero from a free variable type
Dear Bussieck,
I guessed so. Thank you very much for your reply.
Regards,
Arman
I guessed so. Thank you very much for your reply.
Regards,
Arman