When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
Help:
When I using GAMS to solve an Economic phenomenon based on Stacklberg Modle, once I operate the system ,some error occurs, the information shows in the below picture:
Below is the whole program:
set i (*)
j (*);
$load i j
parameters
t(i,j) unit transport cost
c(j) unit product cost
sl(i) supply limit
da(j) demand constant a
db(j) demand constant b
dl(j) demand limit;
$load t c sl da db dl
$ gdxin
display i,j,t,c,sl,da,db,dl;
set leader(i) /6/;
positive variables
ps(i) supply price
pd(j) demand price
x(i,j) traffic volume between supply i to demand j;
variable benefitleader leader's benefit;
equations
profit_leader leader's profit
profit_follwer(i,j) follower's profit
sb(i) supply balance
deb(j) demand balance;
alias (i,ii);
x.lo(i,j)=0.01;
deb(j).. sum(i,x(i,j))=g=dl(j);
sb(i).. sl(i)=g=sum(j,x(i,j));
profit_follwer(i,j)$(not leader(i)).. t(i,j)+c(j)+ps(i)pd(j)exp(da(j))*sum(ii,x(ii,j))**db(j)=g=0;
profit_leader.. benefitleader =e=sum((i,j)$leader(i),exp(da(j))*sum(ii,x(i,j))**db(j)*x(i,j)c(j)*x(i,j)t(i,j)*x(i,j));
model sitanboge /sb.ps,deb.pd,profit_follwer.x,profit_leader/;
solve sitanboge using mpec max benefitleader;
option NLP=conopt;
display x.l,ps.l,pd.l;
Parameter report1(i,*) supply summary report
report2(j,*) demand summary report ;
report1(i,"supply") = sum(j,x.l(i,j)); report1(i,"capacity") = sl(i); report1(i,"prices") = ps.l(i);
report2(j,"demandl") = dl(j);report2(j,"demand")=sum(i,x.l(i,j)); report2(j,"priced") = pd.l(j);
Display report1,report2, x.l;
Sincerely ask for a solution to solve this problem !!!!
Many Many Thanks !!!!!!

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.
RE: When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
Hi ??
Without the possibility of running your code (as you didn't send the input files) or at least information from the listing file with the exact error message, I must have superpowers to give you an answer (but perhaps others are better in guessing ).
Cheers
Renger
Sent from my Samsung Note 4
 Original message 
From: lkcumt@163.com
Date: 4/18/2016 15:17 (GMT+01:00)
To: gamsworld
Subject: When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
Help:
When I using GAMS to solve an Economic phenomenon based on Stacklberg Modle, once I operate the system ,some error occurs, the information shows in the below picture:
Below is the whole program:
set i (*)
j (*);
$load i j
parameters
t(i,j) unit transport cost
c(j) unit product cost
sl(i) supply limit
da(j) demand constant a
db(j) demand constant b
dl(j) demand limit;
$load t c sl da db dl
$ gdxin
display i,j,t,c,sl,da,db,dl;
set leader(i) /6/;
positive variables
ps(i) supply price
pd(j) demand price
x(i,j) traffic volume between supply i to demand j;
variable benefitleader leader's benefit;
equations
profit_leader leader's profit
profit_follwer(i,j) follower's profit
sb(i) supply balance
deb(j) demand balance;
alias (i,ii);
x.lo(i,j)=0.01;
deb(j).. sum(i,x(i,j))=g=dl(j);
sb(i).. sl(i)=g=sum(j,x(i,j));
profit_follwer(i,j)$(not leader(i)).. t(i,j)+c(j)+ps(i)pd(j)exp(da(j))*sum(ii,x(ii,j))**db(j)=g=0;
profit_leader.. benefitleader =e=sum((i,j)$leader(i),exp(da(j))*sum(ii,x(i,j))**db(j)*x(i,j)c(j)*x(i,j)t(i,j)*x(i,j));
model sitanboge /sb.ps,deb.pd,profit_follwer.x,profit_leader/;
solve sitanboge using mpec max benefitleader;
option NLP=conopt;
display x.l,ps.l,pd.l;
Parameter report1(i,*) supply summary report
report2(j,*) demand summary report ;
report1(i,"supply") = sum(j,x.l(i,j)); report1(i,"capacity") = sl(i); report1(i,"prices") = ps.l(i);
report2(j,"demandl") = dl(j);report2(j,"demand")=sum(i,x.l(i,j)); report2(j,"priced") = pd.l(j);
Display report1,report2, x.l;
Sincerely ask for a solution to solve this problem !!!!
Many Many Thanks !!!!!!

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.

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.
Re: When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
Hi Renger;
Thanks for your reply!!
Attachment is my input file, looking forwarding your reply !
On Monday, April 18, 2016 at 9:57:30 PM UTC+8, Renger van Nieuwkoop wrote:
Hi ??
Without the possibility of running your code (as you didn't send the input files) or at least information from the listing file with the exact error message, I must have superpowers to give you an answer (but perhaps others are better in guessing ).
Cheers
Renger
Sent from my Samsung Note 4
 Original message 
From: lkc...@163.com
Date: 4/18/2016 15:17 (GMT+01:00)
To: gamsworld
Subject: When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
Help:
When I using GAMS to solve an Economic phenomenon based on Stacklberg Modle, once I operate the system ,some error occurs, the information shows in the below picture:
Below is the whole program:
set i (*)
j (*);
$load i j
parameters
t(i,j) unit transport cost
c(j) unit product cost
sl(i) supply limit
da(j) demand constant a
db(j) demand constant b
dl(j) demand limit;
$load t c sl da db dl
$ gdxin
display i,j,t,c,sl,da,db,dl;
set leader(i) /6/;
positive variables
ps(i) supply price
pd(j) demand price
x(i,j) traffic volume between supply i to demand j;
variable benefitleader leader's benefit;
equations
profit_leader leader's profit
profit_follwer(i,j) follower's profit
sb(i) supply balance
deb(j) demand balance;
alias (i,ii);
x.lo(i,j)=0.01;
deb(j).. sum(i,x(i,j))=g=dl(j);
sb(i).. sl(i)=g=sum(j,x(i,j));
profit_follwer(i,j)$(not leader(i)).. t(i,j)+c(j)+ps(i)pd(j)exp(da(j))*sum(ii,x(ii,j))**db(j)=g=0;
profit_leader.. benefitleader =e=sum((i,j)$leader(i),exp(da(j))*sum(ii,x(i,j))**db(j)*x(i,j)c(j)*x(i,j)t(i,j)*x(i,j));
model sitanboge /sb.ps,deb.pd,profit_follwer.x,profit_leader/;
solve sitanboge using mpec max benefitleader;
option NLP=conopt;
display x.l,ps.l,pd.l;
Parameter report1(i,*) supply summary report
report2(j,*) demand summary report ;
report1(i,"supply") = sum(j,x.l(i,j)); report1(i,"capacity") = sl(i); report1(i,"prices") = ps.l(i);
report2(j,"demandl") = dl(j);report2(j,"demand")=sum(i,x.l(i,j)); report2(j,"priced") = pd.l(j);
Display report1,report2, x.l;
Sincerely ask for a solution to solve this problem !!!!
Many Many Thanks !!!!!!

 Attachments

 sitanboge.xlsx
 (1.48 MiB) Downloaded 32 times
RE: When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
But then you should also send the code for reading the xlsx. Not that it is much work for me, but if the error is there, I wonâ€™t be able to reproduce your error.
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of lkcumt@163.com
Sent: Dienstag, 19. April 2016 03:38
To: gamsworld
Subject: Re: When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
Hi Renger;
Thanks for your reply!!
Attachment is my input file, looking forwarding your reply !
On Monday, April 18, 2016 at 9:57:30 PM UTC+8, Renger van Nieuwkoop wrote:
Hi ??
Without the possibility of running your code (as you didn't send the input files) or at least information from the listing file with the exact error message, I must have superpowers to give you an answer (but perhaps others are better in guessing ).
Cheers
Renger
Sent from my Samsung Note 4
 Original message 
From: lkc...@163.com
Date: 4/18/2016 15:17 (GMT+01:00)
To: gamsworld
Subject: When solve Stackelberg problems with MPEC type, shows 1 error that "571 rows 599 columns 12094 nonzeroes 13372 nlcode 9947 nlnonzeros "
Help:
When I using GAMS to solve an Economic phenomenon based on Stacklberg Modle, once I operate the system ,some error occurs, the information shows in the below picture:
Below is the whole program:
set i (*)
j (*);
$load i j
parameters
t(i,j) unit transport cost
c(j) unit product cost
sl(i) supply limit
da(j) demand constant a
db(j) demand constant b
dl(j) demand limit;
$load t c sl da db dl
$ gdxin
display i,j,t,c,sl,da,db,dl;
set leader(i) /6/;
positive variables
ps(i) supply price
pd(j) demand price
x(i,j) traffic volume between supply i to demand j;
variable benefitleader leader's benefit;
equations
profit_leader leader's profit
profit_follwer(i,j) follower's profit
sb(i) supply balance
deb(j) demand balance;
alias (i,ii);
x.lo(i,j)=0.01;
deb(j).. sum(i,x(i,j))=g=dl(j);
sb(i).. sl(i)=g=sum(j,x(i,j));
profit_follwer(i,j)$(not leader(i)).. t(i,j)+c(j)+ps(i)pd(j)exp(da(j))*sum(ii,x(ii,j))**db(j)=g=0;
profit_leader.. benefitleader =e=sum((i,j)$leader(i),exp(da(j))*sum(ii,x(i,j))**db(j)*x(i,j)c(j)*x(i,j)t(i,j)*x(i,j));
model sitanboge /sb.ps,deb.pd,profit_follwer.x,profit_leader/;
solve sitanboge using mpec max benefitleader;
option NLP=conopt;
display x.l,ps.l,pd.l;
Parameter report1(i,*) supply summary report
report2(j,*) demand summary report ;
report1(i,"supply") = sum(j,x.l(i,j)); report1(i,"capacity") = sl(i); report1(i,"prices") = ps.l(i);
report2(j,"demandl") = dl(j);report2(j,"demand")=sum(i,x.l(i,j)); report2(j,"priced") = pd.l(j);
Display report1,report2, x.l;
Sincerely ask for a solution to solve this problem !!!!
Many Many Thanks !!!!!!

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.

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.

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.