Skip to main content
Solved

Linearise objective function

  • July 16, 2019
  • 2 replies
  • 132 views

Forum|alt.badge.img+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

Best answer by deannezhang

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.

2 replies

deannezhang
AIMMS Champ
Forum|alt.badge.img+3
  • AIMMS Champ
  • 61 replies
  • Answer
  • July 17, 2019
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.

Forum|alt.badge.img+3
  • Author
  • Enthusiast
  • 9 replies
  • July 17, 2019
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!


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

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