Error messages:“Set is under control already”,please help!

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Error messages:“Set is under control already”,please help!

Post by Archiver »


Now I'm using GAMS to solve the MCP with "THE SOLVER PATH", blow is the relevant program:


set i (*)
j (*);
parameters
sl(i) capacity of plant i in cases
da(j) demand constant a of plant j
db(j) demand constant b of plant j
t(i,j) unit transport cost between i and j
c(j) unit product cost of plant j;
display i,j,sl,da,db,t,c;
variables
x(i,j)
ps(i);
positive variables x,ps;
equations
sb(i) supply balance
ireation(i,j);
sb(i).. sl(i)=g=sum(j,x(i,j));
ireation(i,j).. t(i,j)+c(j)+ps(i)=g=exp(da(j))*sum(i,x(i,j))**db(j);
model Perfectcompetition /ireation.x,sb.ps/;
option mcp = path;
solve Perfectcompetition using mcp;

The error message shows in the red sentence: "Set is under control already",the equation behind this red sentence is :
I have tried changing dimension (i and j) to find a solution but it still doesn't work.. How can I solve this prolem?

Please help me !! Thanks a lot:))





--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

AW: Error messages:“Set is under control already”,please help!

Post by Archiver »


With ireation(i,j).. you are defining an equation “ireation” for every combination of i and j.

For one of these combinations i and j are “fixed” items.

Now you make a sum over i, but what I think you want to do is to sum over every set item of i.



For this you have to use this (changes in blue):

set i (*)

j (*);

alias(i, ai);

parameters

sl(i) capacity of plant i in cases

da(j) demand constant a of plant j

db(j) demand constant b of plant j

t(i,j) unit transport cost between i and j

c(j) unit product cost of plant j;

display i,j,sl,da,db,t,c;

variables

x(i,j)

ps(i);

positive variables x,ps;

equations

sb(i) supply balance

ireation(i,j);

sb(i).. sl(i)=g=sum(j,x(i,j));

ireation(i,j).. t(i,j)+c(j)+ps(i)=g=exp(da(j))*sum(ai, x(ai,j))**db(j);

model Perfectcompetition /ireation.x,sb.ps/;

option mcp = path;

solve Perfectcompetition using mcp;



Good luck

J.Schlutter





Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von cumtlk@gmail.com
Gesendet: Montag, 1. Februar 2016 07:20
An: gamsworld
Betreff: Error messages:“Set is under control already”,please help!



Now I'm using GAMS to solve the MCP with "THE SOLVER PATH", blow is the relevant program:





set i (*)

j (*);

parameters

sl(i) capacity of plant i in cases

da(j) demand constant a of plant j

db(j) demand constant b of plant j

t(i,j) unit transport cost between i and j

c(j) unit product cost of plant j;

display i,j,sl,da,db,t,c;

variables

x(i,j)

ps(i);

positive variables x,ps;

equations

sb(i) supply balance

ireation(i,j);

sb(i).. sl(i)=g=sum(j,x(i,j));

ireation(i,j).. t(i,j)+c(j)+ps(i)=g=exp(da(j))*sum(i,x(i,j))**db(j);

model Perfectcompetition /ireation.x,sb.ps/;

option mcp = path;

solve Perfectcompetition using mcp;



The error message shows in the red sentence: "Set is under control already",the equation behind this red sentence is :

I have tried changing dimension (i and j) to find a solution but it still doesn't work.. How can I solve this prolem?



Please help me !! Thanks a lot:))









--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

LichtBlick SE
Geschaeftsfuehrung: Heiko von Tschischwitz (Vorsitzender), Wilfried Gillrath, Gero Luecking, Mustafa Oezen, Olaf Westermann

Vorsitzender des Verwaltungsrats: Michael Saalfeld

Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 126094

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Post Reply