Hello
I defined 3sets for my model. Now I need to add a term to my OBJ function which is the sum of a sum.
these are my sets:
sets
i "option" /p,b,s,d,f,1,2,3,4,5,6,7,8,9,10,11,12/
j "products" /c,l,m/
k "type of product" /1,2,3,4,5,6,7,8,9,10,11,12,13,14/;
this is my parameter:
C(i) cost per ha of BMPs/
"1" -111
"2" 471
"3" 73
"4" 82
"5" 82
"6" 82
"7" 31.32
"8" 31.32
"9" 50.30
"10" 182.20
"11" 21.43
"12" 2.68
/
I want to write this equation:
sum of i from 1 to 12 in x(i"c"k) times c(i) over k
would you please help me with the syntax of this term.
Thank so much in advance
summation
Re: summation
Hi
From your question it is not completely clear to me what you want. Is this what you are looking for (otherwise write down the mathematical expression for your question):
OBJ =E= sum((i,k), X(i,k)*C(i))
Renger
From your question it is not completely clear to me what you want. Is this what you are looking for (otherwise write down the mathematical expression for your question):
OBJ =E= sum((i,k), X(i,k)*C(i))
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Re: summation
Thank you so much. I figured it out. But I have another question!
I wrote the following sum but I got $140 error. would you please help me!
sum((k),(sum((i),x(i,"c",k)* t(ibmp)$ibmp(i))* N(k)) =L= 1420
ibmp(i) is a subset of i
Thanks in advance
I wrote the following sum but I got $140 error. would you please help me!
sum((k),(sum((i),x(i,"c",k)* t(ibmp)$ibmp(i))* N(k)) =L= 1420
ibmp(i) is a subset of i
Thanks in advance