fixing binary variable

Problems with modeling
Post Reply
Posts: 14
Joined: 2 years ago

fixing binary variable

Post by ferrib » 2 years ago

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

Posts: 58
Joined: 3 years ago
Location: Dallas, TX, USA

Re: fixing binary variable

Post by GabrielYin » 2 years ago

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.


Post Reply