fixing binary variable

Problems with modeling
Post Reply
ferrib
User
User
Posts: 4
Joined: 1 month ago

fixing binary variable

Post by ferrib » 1 month 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

GabrielYin
User
User
Posts: 43
Joined: 6 months ago
Location: Dallas, TX, USA

Re: fixing binary variable

Post by GabrielYin » 1 month 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.

Cheers!
Gabriel

Post Reply