fixing binary variable

Problems with modeling
Post Reply
ferrib
User
User
Posts: 14
Joined: 5 years ago

fixing binary variable

Post 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
GabrielYin
User
User
Posts: 72
Joined: 6 years ago
Location: Dallas, TX, USA
Contact:

Re: fixing binary variable

Post 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
Post Reply