An urgent help

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

An urgent help

Post by Archiver »


Dear Gams Users Group,

I am modelling a multistage stochastic programming problem, i have two problems. First problem is Error 795. The second one is one of my set 'k' is changing with scenario. How can i reflect this idea to model and fix 795 problem? My model is in the attachment.

Best regards,
Nazmi


Attachments-306/mssp_bd.gms

Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: An urgent help

Post by Archiver »


The GAMS error message tries to be helpful:

110 solve mssp max z1 using mip scenario dict;
**** $795,257
**** The following MIP errors were detected in model mssp:
**** 795 Domain violation for symbol s_ytwo in scenario dictionary

Use declared parameter s_ytwo with domain scen,k,sn the corresponding symbol in dict is ytwo with domain k,j. sn is a subset of j and since the domain on the right needs to be as large as the domain on the left, you get a compilation error. Changing the sn to j in the declaration of s_ytwo fixes this problem.

To your second question, the rim of the model cannot change by scenario, so you can't have different k's by scenario. When you write your explicit deterministic equivalent (without the use of EMP-SP) you can do what ever you like.

Best,
Michael Bussieck - GAMSWorld Coordinator
On Wednesday, March 11, 2015 at 12:45:26 PM UTC-4, Nazmi wrote:

Dear Gams Users Group,

I am modelling a multistage stochastic programming problem, i have two problems. First problem is Error 795. The second one is one of my set 'k' is changing with scenario. How can i reflect this idea to model and fix 795 problem? My model is in the attachment.

Best regards,
Nazmi

--
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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: An urgent help

Post by Archiver »


Dear Coordinator

I work on GAMS platform and I try to solve a two stochastic program.
I have the same error of Nazmi.
I understand your explabations to overcome this problem. But in my case, I dont see how my the domain could violated.
I think the statement of the sets are exact.

My model and GDX file used are in the attachment. Thank you in advance for your assistance.

Best regards,

Sellé

Le jeudi 12 mars 2015 14:37:13 UTC+1, Michael Bussieck a écrit :

The GAMS error message tries to be helpful:

110 solve mssp max z1 using mip scenario dict;
**** $795,257
**** The following MIP errors were detected in model mssp:
**** 795 Domain violation for symbol s_ytwo in scenario dictionary

Use declared parameter s_ytwo with domain scen,k,sn the corresponding symbol in dict is ytwo with domain k,j. sn is a subset of j and since the domain on the right needs to be as large as the domain on the left, you get a compilation error. Changing the sn to j in the declaration of s_ytwo fixes this problem.

To your second question, the rim of the model cannot change by scenario, so you can't have different k's by scenario. When you write your explicit deterministic equivalent (without the use of EMP-SP) you can do what ever you like.

Best,
Michael Bussieck - GAMSWorld Coordinator
On Wednesday, March 11, 2015 at 12:45:26 PM UTC-4, Nazmi wrote:

Dear Gams Users Group,

I am modelling a multistage stochastic programming problem, i have two problems. First problem is Error 795. The second one is one of my set 'k' is changing with scenario. How can i reflect this idea to model and fix 795 problem? My model is in the attachment.

Best regards,
Nazmi

--
Attachments
data_WLS_MINLP_V1.gdx
(13.41 KiB) Downloaded 352 times
WLS_MINLP_EMP.gms
(11.47 KiB) Downloaded 429 times
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: An urgent help

Post by Archiver »


Selle,

Similar to Nazmi's problem, the compiler is actually pretty helpful. The error is:

**** 795 Domain violation for symbol s_V in scenario dictionary

The symbol s_V is declared as s_V(scen,nbus) the matching symbol zVreal in dict is declared as zVreal which implies zVreal(*). So you either change s_V to s_V(scen,*) or zVreal to zVreal(nbus). I guess the latter is the better change.

Best,
Michael Bussieck - GAMSWorld Coordinator

On Monday, November 23, 2015 at 2:54:13 AM UTC-5, selle.toure@gmail.com wrote:

Dear Coordinator

I work on GAMS platform and I try to solve a two stochastic program.
I have the same error of Nazmi.
I understand your explabations to overcome this problem. But in my case, I dont see how my the domain could violated.
I think the statement of the sets are exact.

My model and GDX file used are in the attachment. Thank you in advance for your assistance.

Best regards,

Sellé

Le jeudi 12 mars 2015 14:37:13 UTC+1, Michael Bussieck a écrit :

The GAMS error message tries to be helpful:

110 solve mssp max z1 using mip scenario dict;
**** $795,257
**** The following MIP errors were detected in model mssp:
**** 795 Domain violation for symbol s_ytwo in scenario dictionary

Use declared parameter s_ytwo with domain scen,k,sn the corresponding symbol in dict is ytwo with domain k,j. sn is a subset of j and since the domain on the right needs to be as large as the domain on the left, you get a compilation error. Changing the sn to j in the declaration of s_ytwo fixes this problem.

To your second question, the rim of the model cannot change by scenario, so you can't have different k's by scenario. When you write your explicit deterministic equivalent (without the use of EMP-SP) you can do what ever you like.

Best,
Michael Bussieck - GAMSWorld Coordinator
On Wednesday, March 11, 2015 at 12:45:26 PM UTC-4, Nazmi wrote:

Dear Gams Users Group,

I am modelling a multistage stochastic programming problem, i have two problems. First problem is Error 795. The second one is one of my set 'k' is changing with scenario. How can i reflect this idea to model and fix 795 problem? My model is in the attachment.

Best regards,
Nazmi

--
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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: An urgent help

Post by Archiver »


Thanks a lot for your help
Sellé

On Monday, November 23, 2015 at 1:08:23 PM UTC+1, Michael Bussieck wrote:

Selle,

Similar to Nazmi's problem, the compiler is actually pretty helpful. The error is:

**** 795 Domain violation for symbol s_V in scenario dictionary

The symbol s_V is declared as s_V(scen,nbus) the matching symbol zVreal in dict is declared as zVreal which implies zVreal(*). So you either change s_V to s_V(scen,*) or zVreal to zVreal(nbus). I guess the latter is the better change.

Best,
Michael Bussieck - GAMSWorld Coordinator

On Monday, November 23, 2015 at 2:54:13 AM UTC-5, selle...@gmail.com wrote:

Dear Coordinator

I work on GAMS platform and I try to solve a two stochastic program.
I have the same error of Nazmi.
I understand your explabations to overcome this problem. But in my case, I dont see how my the domain could violated.
I think the statement of the sets are exact.

My model and GDX file used are in the attachment. Thank you in advance for your assistance.

Best regards,

Sellé

Le jeudi 12 mars 2015 14:37:13 UTC+1, Michael Bussieck a écrit :

The GAMS error message tries to be helpful:

110 solve mssp max z1 using mip scenario dict;
**** $795,257
**** The following MIP errors were detected in model mssp:
**** 795 Domain violation for symbol s_ytwo in scenario dictionary

Use declared parameter s_ytwo with domain scen,k,sn the corresponding symbol in dict is ytwo with domain k,j. sn is a subset of j and since the domain on the right needs to be as large as the domain on the left, you get a compilation error. Changing the sn to j in the declaration of s_ytwo fixes this problem.

To your second question, the rim of the model cannot change by scenario, so you can't have different k's by scenario. When you write your explicit deterministic equivalent (without the use of EMP-SP) you can do what ever you like.

Best,
Michael Bussieck - GAMSWorld Coordinator
On Wednesday, March 11, 2015 at 12:45:26 PM UTC-4, Nazmi wrote:

Dear Gams Users Group,

I am modelling a multistage stochastic programming problem, i have two problems. First problem is Error 795. The second one is one of my set 'k' is changing with scenario. How can i reflect this idea to model and fix 795 problem? My model is in the attachment.

Best regards,
Nazmi

--
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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
muazzam966@gmail.com
User
User
Posts: 1
Joined: 11 months ago

Re: An urgent help

Post by muazzam966@gmail.com »

i am in problem
my code is giving error 795 domain violation
please help me in this matter
code is attached
Attachments
newspaper.gms
(4.31 KiB) Downloaded 222 times
User avatar
bussieck
Moderator
Moderator
Posts: 1037
Joined: 7 years ago

Re: An urgent help

Post by bussieck »

Without Excel file (or GDX file) this is hard to run to see where your problem is. You can also make a version with dummy data. -Michael
Post Reply