Dear staff,
I need your help with an objective function where I have the product of two variables.
I have the following variables and parameters:
y(i,j,c,a) binary variable
x(a) continuous variable
P(c) parameter
How can I linearise the following objective function:
MIN:
sum((i,j,c,a), P(c) * y(i,j,c,a) - P(c) * y(i,j,c,a) * x(a))
Thank you
Page 1 / 1
A similar question was answered in https://community.aimms.com/developers-math-or-programming-39/modelling-question-241. The trick can be used here as well.
Thank you Deanne, you are right!
So basically I just need to create another variable U(a) and then impose that:
if Y(i,j,c,a) = 1 then U(a) = P(c)*x(a)
if Y(i,j,c,a)=0 then U(a) = 0
And then use U(a) in the objective function instead of P(c) * y(i,j,c,a) * x(a)
Therefore yes, this becomes the same type of constraint that you linked.
I will try that!
So basically I just need to create another variable U(a) and then impose that:
if Y(i,j,c,a) = 1 then U(a) = P(c)*x(a)
if Y(i,j,c,a)=0 then U(a) = 0
And then use U(a) in the objective function instead of P(c) * y(i,j,c,a) * x(a)
Therefore yes, this becomes the same type of constraint that you linked.
I will try that!
Reply
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.