Thank so much, that really helps,
But, now i have another question about the same subsets but now in this equations
parameter
D(i,j)
sup(p,i,t)
Integer Variables
V(p,i,t)
X(p,p’,i,l,t)
Z(p,i,j,t)
Equation
-sup(p,i,t)<= V(p,i,t)+Σ((j,i):(t-d(j,i)>=1), Z(p,i,j,t)+Σ(L∈TL(p’),p’∈P:p∈TF(l,p’) X(p’,p,i,l,t)- V(p,i,t)-Σ(i,j) Z(p,i,j,t)-Σ(L∈TL(p),p’∈TF(l,p) X(p,p’,i,l,t)
For all p, i, t
In gams, I wrote it in this way
set
P 'products' /1A,11A,12A/
L 'activities' /1L/
TF(p,l) 'Variables de productos' /11A.1l,12A.1L/
TL(l,p) 'actividades diferenciadoras aplicadas' /1L.1A/
N 'localizaciones' /mont, tol, ZC1/
T'peridos' /0,1,2,3/
TR 'Tiempos reales' /1*3/;
A(i,j) 'links de transporte permitidos' /mont.tol, tol.zc1, mont.zc1/
alias (n,i,j),(p,df);
Parameter
D(i,j);
Integer variable
Z(p,i,j,t) producto enviado
x(p,df,i,l,t) cantidad de producto transformado
v(p,i,t) cantidad de inventario;
Flow1.. flu1(p,mn(i),f3(t)).. -sup(p,i,t)=g=V(p,i,t-1)
+sum(a(j,i)$(ord(t)-d(j,i)>1), Z(p,j,i,t-d(j,i)))
+sum((df,l), x(df,p,i,l,t))
-v(p,i,t)-sum(a(i,j),Z(p,i,j,t))
-sum((l,df),X(p,df,i,l,t))=g=-sup(p,i,t);
Could you help me if is the right way to write the Equation?
Thank you
Cheers