Sad,
Unfortunately you can’t maximize equations, only variables, so you have to formulate some kind variable of that incorporates the variables you are interested in. Say, you would like to minimize the total power, then define the define for example, variable: “totpower”, equation: “toteq”, and efficiency “w(f,alphabet)” then your equation could be something like:
toteq … sum((f,alphabet),w(f,alphabet)*Power(f,alphabet))=e=totpower.
Yes, I set the set name of ‘A’,… to alphabet, which is probably incorrect.
-me
On Monday, January 21, 2013 6:15:26 PM UTC+1, sad wrote:
I want to maximize bellow equation simultaneously
CarnotA(f) … sum(k,Demand(k,‘Dmax’))-sum(k,Dem(f,k))-[sum(k,Demand(k,‘ad’))(power_plant(‘A’,‘a’)+2power_plant(‘A’,‘b’)Power(f,‘A’))]-Power(f,‘A’)=e=0;
CarnotB(f) … sum(k,Demand(k,‘Dmax’))-sum(k,Dem(f,k))-[sum(k,Demand(k,‘ad’))(power_plant(‘B’,‘a’)+2power_plant(‘B’,‘b’)Power(f,‘B’))]-Power(f,‘B’)=e=0;
CarnotC(f) … sum(k,Demand(k,‘Dmax’))-sum(k,Dem(f,k))-[sum(k,Demand(k,‘ad’))(power_plant(‘C’,‘a’)+2power_plant(‘C’,‘b’)Power(f,‘C’))]-Power(f,‘C’)=e=0;
CarnotD(f) … sum(k,Demand(k,‘Dmax’))-sum(k,Dem(f,k))-[sum(k,Demand(k,‘ad’))(power_plant(‘D’,‘a’)+2power_plant(‘D’,‘b’)Power(f,‘D’))]-Power(f,‘D’)=e=0;
CarnotE(f) … sum(k,Demand(k,‘Dmax’))-sum(k,Dem(f,k))-[sum(k,Demand(k,‘ad’))(power_plant(‘E’,‘a’)+2power_plant(‘E’,‘b’)*Power(f,‘E’))]-Power(f,‘E’)=e=0;
tank a lot.
On Tue, Jan 22, 2013 at 12:59 AM, HJW Vermue wrote:
Dear Sad,
Well, it is quite unclear to me what you exactly mean. The question does not specify in what way multiple objective functions are used. In either case, both nested and summed objective functions are possible to be optimized. When this response doesn’t answer your question, I advice you to open a new discussion with a bit more details about your problem.
And Renger: Many thanks for the very fast response, though I did not tell that right away, your answer really helped me a lot. (Maybe my initial answer was harsher than intended, as I had problems with GAMS-syntax, not necessarily with the underlying concepts.)
Cheers,
Henry
On Monday, January 21, 2013 3:10:24 PM UTC+1, sad wrote:
hello
can use from multi objective in gams?
On Mon, Jan 21, 2013 at 10:18 PM, HJW Vermue wrote:
Dear all,
I, too, am only a beginner in understanding GAMS, and right now the problem is setting branching priorities for binary variables in my MIP.
Say, I modeled a problem using the TSP idea. The transition variable is Z(k,m,p) (so: Z(k=k1,m=m1,p=p1)=1 if state k1 is directly prior to state m1 during period p1, 0 otherwise). NB States k and m are aliases and not all possible states K are used.
Following the Users Guide, I already tried the following.
model.prioropt=1;
z.prior(k,‘small’)=1;
z.prior(k,‘large’)=2;
z.prior(m,‘small’)=1;
z.prior(m,‘large’)=2;
This resulted in error 148 on each of the set size (Dimension different - The symbol is referenced with more/less indices as declared).
Then, I tried instead:
z.prior(k,m,p,‘small’)=1;
z.prior(k,m,p,‘large’)=2;
This resulted in the same error (148) at the same position.
As a last resort, I tried the congruence with summations:
z.prior((k,m,p),‘small’)=1;
z.prior((k,m,p),‘large’)=2;
Here I received error 36 on the first closing brackets (‘=’ or ‘…’ or ‘:=’ or ‘$=’ operator expected rest of statement ignored).
I hope the problem is clear as described.
NB I know this transition variable can also be implemented as an SOS1 variable, but that forces the (now) continuous variable that governs the ‘visit’ (E(m,p)) to be discrete again. Even then a similar question as the above could be phrased, as only a fraction of all states are used (about 20%).
Regards,
Henry Vermue
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/wF_6HV9OKasJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/77OkLs6DzXoJ.
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/I3rUesVWVhEJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.