0

There are three process units that can transfer mass among each other. I am using two indices i in I and j in J to denote the flow between the three units and the values for flow from unit i to unit j is given by the decision variable supply[I][J]. So, the supply from unit 1 to unit 2 is given by supply[1][2]. Conversely, the mass obtained by unit 2 from 1 is given by supply[1][2]. So, to estimate the total mass leaving unit i, I need to sum supply[I][J] over j whereas to estimate the total mass entering a unit i, I need to sum supply[I][J] over i.

Also each unit can take supply from an external source, defined by the decision variable inlet[I], and can send out an exit stream given by outlet[I]. I am defining the following constraint to enforce that the net mass inlet is equal to the net mass outlet for any unit:

// constraint for mass balance for each unit 

forall (i in I)

{
ct1: inlet[i]+sum (j in J)supply[i][j] == outlet[i]+sum(j in J)supply[j][i];
}

end

When the number of units is just three, the model works and provides results in 5 seconds, but once the number of units is increased to 30, the cplex is not able to find even a solution even after 48 hours. I'm not sure whether the constraint definition is correct or not. And also, if this is creaitng any issues in solving the cplex. Is the constraint defined above correct?

Jamiu S.
  • 5,257
  • 5
  • 12
  • 34
DKumar
  • 1
  • 1
  • Can you try to set supply[I][J] as a dvar float if it was integer ? – Alex Fleischer Oct 09 '22 at 05:26
  • Don't underestimate the combinatorics of these problems. Have you tried slowly increasing the number of units and observe how the solve time increases with 4 units, 5 units, 6 units etc. As Alex said, don't make variables integers unless you need to do so. – TimChippingtonDerrick Oct 09 '22 at 07:49
  • Hi @AlexFleischer The variables supply[I][J], inlet[I] and outlet[I] are dvar float+. – DKumar Oct 10 '22 at 06:24

0 Answers0