Dear staff,
I would like to receive your help with linearizing the following constraint.
Given the indexes i, j, c, a
I have the following variables and parameters:
x (i,j,a) continuous variable
y (i,j,a) continuous variable
R (i,j,c,a) binary variable
A (i,j) parameter
B (c) parameter
The constraint that I need to write is the following:
y(i,j,a) = (x(i,j,a) / A(i,j)) * (1 - sum((c,a1)|ord(a1) <= ord(a), R(i,j,c,a1))) + sum((c,a1)|ord(a1) <= ord(a), (x(i,j,a) / B(c)) * R(i,j,c,a1)) forall i, j, a
I am struggling in particular with the linearization of the second part:
sum((c,a1)|ord(a1) <= ord(a), (x(i,j,a) / B(c)) * R(i,j,c,a1))
Please note that there are already other constraints imposing that sum((c,a), R(i,j,c,a)) <= 1 forall i, j, therefore the summation of sum((c,a1)|ord(a1) <= ord(a), R(i,j,c,a1)) is always either 0 or 1.
Thank you,
Kind regards,