Page 1 of 1

fixing binary variable

Posted: Wed Aug 22, 2018 11:03 am
by ferrib
Hi there,

I have an array with 4 binary decision variables and i would like to have one of them constant and equal to zero. Is it possible using u.fx('a',t)=0?
That would be a matter of simplification, otherwise I need to create new sets to go around and change some formulation already done.

Assuming it is possible to do the above, are both solutions equivalent regarding execution time?


Thanks in advance

Re: fixing binary variable

Posted: Fri Aug 24, 2018 12:00 am
by GabrielYin
The former one is simple and efficient. I never use the latter method to do this so I do not know which one performs better w.r.t. running time. But the former one is simply good and easy to implement. Execution time of the solver might not be influenced with how you define the variable. But the latter one renders more constraints which may result in higher execution time.

Cheers!
Gabriel