Solved

Linearise objective function

  • 16 July 2019
  • 2 replies
  • 116 views

Userlevel 1
Badge +3
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
icon

Best answer by deannezhang 17 July 2019, 07:35

View original

2 replies

Userlevel 4
Badge +3
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.
Userlevel 1
Badge +3
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!

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator