OPerations between Alias and Parameters

Problems with modeling
Post Reply
andresgerman
User
User
Posts: 1
Joined: 1 year ago

OPerations between Alias and Parameters

Post by andresgerman »

Hi,

I have a problem with my code, I am trying to do an operation between two parameters and a set of Alias to determine the value of a binary variable, but it seems that the operations between the parameters and the Alias generate an error (infeasibility) the fallowing is the parts of the code:

Code: Select all

/
Alias(j, j1)/
Parameter
PH2C(j) H2 consumer inlet pressure (PSIA)/
HCU 2309
DHT 1438
CNHT 300
MISC 412

PH2H(j) H2 consumer high pressure flash pressure (PSIA)/
HCU 2087
DHT 1073
CNHT 205
MISC 411
/
CONSJJH2(j1,j)..PH2C(j)-PH2H(j1)-(zcomjj(j1,j)*Upr)=l=0;
CONSJJH3(j1,j)..PH2C(j)-PH2H(j1)+(1-zcomjj(j1,j)*Upr)=g=0;
The binary variable should be 1 for a positive difference and cero for negative this what the code is doing:
LOWER LEVEL UPPER MARGINAL

HCU .HCU -223.000 -222.000 +INF .
HCU .DHT 648.000 . +INF 0.002 INFES
HCU .CNHT 1786.000 . +INF 9.7656E-4 INFES
HCU .MISC 1674.000 . +INF 9.7656E-4 INFES
DHT .HCU -1237.000 -1236.000 +INF .
DHT .DHT -366.000 -365.000 +INF .
DHT .CNHT 772.000 . +INF 0.002 INFES
DHT .MISC 660.000 . +INF 0.002 INFES
CNHT.HCU -2105.000 -2104.000 +INF .
CNHT.DHT -1234.000 -1233.000 +INF .
CNHT.CNHT -96.000 -95.000 +INF .
CNHT.MISC -208.000 -207.000 +INF .
MISC.HCU -1899.000 -1898.000 +INF .
MISC.DHT -1028.000 -1027.000 +INF .
MISC.CNHT 110.000 . +INF 0.016 INFES
MISC.MISC -2.000 -1.000 +INF .

Thank you for your help, German
Post Reply