help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] How I do for write a restriction with binary variables, with


From: luisjaime
Subject: [Help-glpk] How I do for write a restriction with binary variables, with dynamic restriction
Date: Thu, 5 Nov 2015 21:54:44 -0500
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Good day for all persons in this list.

I have a model which  has the next lines

set J:={1..3}; #Número de centrales hidroeléctricas del sistema
set T:={1..3}; #Número de periodos del horizonte temporal

param Pmin{j in J, t in T};
param Pmax{j in J, t in T};
var v{j in J, t in T}, binary, >=0;
#constraint:
prodTer{j in J, t in T}: Pmin[j,t]*v[j,t] <= p[j,t] <= Pmax[j,t]*v[j,t];

when I try to compile appear the next error:

"leftmost expression in double inequality cannot be linear form
Context:  , t in T } : Pmin [ j , t ] * v [ j , t ] <= p [ j , t ] <=
MathProg model processing error"

What's wrong in the restriction?

On the other hand, if I have a restriction like:

ContHidrica {i in I, t in T}: V[i,t] = V[i,t-1] + r[i,t]

How can I  supply the value V[i,0] at the begining?  or If I have

rampaBaj{j in J, t in T}: p[j,t] - p[j,t+1] <= X[j]

How  can I  for manipulate the subscripts to avoid  go beyond limits?

Thanks.


Cordially,


luis jaime



reply via email to

[Prev in Thread] Current Thread [Next in Thread]