--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
where n is months and h quantities.It is RCON(n).
2011/10/17, Tavallali <tavallal...@gmail.com>:
> Hello
> 1-Can you please clarify the definition of set n? Is that alias (t,n) ?
> 2-Also how exactly do you define RCON? Is that RCON(n), RCON(t) or RCON?
>
> If you can provide the above information , it will be easier to discuss.
> I hope it will help.
> Regards
> -----
> محمد صادق تولّلی
> Mohammad Sadegh Tavallali <tavallal...@gmail.com>
Hi Sener
Take a good look at your equations: you define demand as a single equation, but in the equation itself, you have the set h as index but on the left hand side you have q without an index.
demand..q =g=c(h) + d(h)*p(h);
so GAMS gets confused:
This would work better
Equation demand;
Demand..q=g=sum(h, c(h) + d(h)*p(h));
Or:
Equation demand(h);
Demand(h)..q(h) =g=c(h) + d(h)*p(h);
Cheers
____________________
Modelworks
Gewerbestrasse 15
3600 Thun – Switzerland
Von: gams...@googlegroups.com [mailto:gams...@googlegroups.com]
Im Auftrag von Sener Salci
Gesendet: Mittwoch, 21. November 2012 06:49
An: gams...@googlegroups.com
Betreff: Re: $149 message error
Hi
I also need help PLSSSSS
I have equilibrium model such that
h= 7 days and I want equilibrium for each day seperatelly given the firms
f=4 firms
h=1,2,3,4,5,6,7
f=f1,f2,f3,f4
I define demand function as demand(h)=a+bP
I define supply function for each firm as supply(h)=c+dP
Therefore, I define a and b demand parameters for each day. Also,c and d are cost parameters for each firm!
At the equilibrium D=S
equations
demand
supply;
demand..q =g=c(h) + d(h)*p(h)=;
supply.. a(i) + b(i)*q(i)=g=p(h);
model equilibrium /supply.q, demand.p/;
solve equilibrium using mcp;
i want to find both equilibrium price and quantities. I want to see that may be 2 firms will sell in the market because they charge lower than other firms.
I have the same problem, it says for each parameter I define above, demand and supply - uncontrolled set entered as constant: 149.
hope you can help me.
thanks
--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/Ji7v3FixsaUJ.
Hi
In this equation
c3.. Sum(j,x(j)) =l= cap(i);
you have cap(i) on the right-hand side, but you don’t reference i:
This would work: C3(i).. Sum(j,x(j)) =l= cap(i);
But this doesn’t make much sense: total assembled in one year is in each month less than the monthly capacity. You are probably looking for something like c3(j).. x(j) =l= cap(j)
Some other hint: It is better to define the months as one set i, and alias it with j and define x,cap, and d over i.
Cheers
Renger
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to
gams...@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "gamsworld" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gamsworld/mAof3sg3azA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gamsworld+...@googlegroups.com.
Hi Kiran
You have to make sure that there is no equation for January (as you don’t have information on the December last year), so you add:
c1(j)$(ord(j) gt 1).. y(j-1) - y(j) + x(j) =e= d(j);
This drops the equation for January. Note that you must define the equations over the whole set.
You don’t need an alias (but you could have used i as an alias for j and keep your code with the j as well as the i index
Cheers
Renger