Why do I get different solutions for the same model?

Dear Friends,

I have two GAMS files; In one of them, I have defined the value of parameters (Thesis- NP6- GAMS) and in the other (NP6 - New), GAMS reads data from an Excel file (input) and transfers data to another Excel file (Xresult). I do not know why I get different answers for the same set of parameters. For example, for the first set of parameters (row 2 in input.xlsx) these two files produce two different answers. The files are attached.

Moreover, in NP6 - New, I want GAMS send 0 for the sets of parameters that whose model status is infeasible. But, I do not know why my code does not work.

I would highly appreciate it if somebody helps me solving these two issues.

Best regards.


GAMS.rar (25.9 KB)

The values for R1 and R2 are swapped in the excel file…

Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Zohreh
Sent: Donnerstag, 27. Februar 2014 06:41
To: gamsworld@googlegroups.com
Subject: Why do I get different solutions for the same model?



Dear Friends,



I have two GAMS files; In one of them, I have defined the value of parameters (Thesis- NP6- GAMS) and in the other (NP6 - New), GAMS reads data from an Excel file (input) and transfers data to another Excel file (Xresult). I do not know why I get different answers for the same set of parameters. For example, for the first set of parameters (row 2 in input.xlsx) these two files produce two different answers. The files are attached.



Moreover, in NP6 - New, I want GAMS send 0 for the sets of parameters that whose model status is infeasible. But, I do not know why my code does not work.



I would highly appreciate it if somebody helps me solving these two issues.



Best regards.


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/groups/opt_out.


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/groups/opt_out.

Sorry! You are right.

Thank you very much.

Could you please help me and say why if statement in the model does not work. I mean, zero values are not shown for the scenarios with infeasible- No solution.

I would be looking forward to hearing your kind response.

Best regards.

On Thursday, February 27, 2014 1:41:25 PM UTC+8, Zohreh wrote:

Dear Friends,

I have two GAMS files; In one of them, I have defined the value of parameters (Thesis- NP6- GAMS) and in the other (NP6 - New), GAMS reads data from an Excel file (input) and transfers data to another Excel file (Xresult). I do not know why I get different answers for the same set of parameters. For example, for the first set of parameters (row 2 in input.xlsx) these two files produce two different answers. The files are attached.

Moreover, in NP6 - New, I want GAMS send 0 for the sets of parameters that whose model status is infeasible. But, I do not know why my code does not work.

I would highly appreciate it if somebody helps me solving these two issues.

Best regards.


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/groups/opt_out.

Hi

If you set the results to 0, gdxxrw drops them when writing them to your sheet, I usually add EPS

Results(“z6”,scenario) = EPS;

Results(“T1”,scenario) = EPS;

Results(“T2”,scenario) = EPS;

Results(“v”,scenario) = EPS;

Results(“g”,scenario) = EPS;



Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Zohreh
Sent: Donnerstag, 27. Februar 2014 09:38
To: gamsworld@googlegroups.com
Subject: Re: Why do I get different solutions for the same model?



Sorry! You are right.



Thank you very much.



Could you please help me and say why if statement in the model does not work. I mean, zero values are not shown for the scenarios with infeasible- No solution.



I would be looking forward to hearing your kind response.



Best regards.


On Thursday, February 27, 2014 1:41:25 PM UTC+8, Zohreh wrote:

Dear Friends,



I have two GAMS files; In one of them, I have defined the value of parameters (Thesis- NP6- GAMS) and in the other (NP6 - New), GAMS reads data from an Excel file (input) and transfers data to another Excel file (Xresult). I do not know why I get different answers for the same set of parameters. For example, for the first set of parameters (row 2 in input.xlsx) these two files produce two different answers. The files are attached.



Moreover, in NP6 - New, I want GAMS send 0 for the sets of parameters that whose model status is infeasible. But, I do not know why my code does not work.



I would highly appreciate it if somebody helps me solving these two issues.



Best regards.


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/groups/opt_out.


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/groups/opt_out.

Dear Renger,

I really really appreciate your kind and helpful responses.

Wish you all the bests.



On Thursday, February 27, 2014 1:41:25 PM UTC+8, Zohreh wrote:

Dear Friends,

I have two GAMS files; In one of them, I have defined the value of parameters (Thesis- NP6- GAMS) and in the other (NP6 - New), GAMS reads data from an Excel file (input) and transfers data to another Excel file (Xresult). I do not know why I get different answers for the same set of parameters. For example, for the first set of parameters (row 2 in input.xlsx) these two files produce two different answers. The files are attached.

Moreover, in NP6 - New, I want GAMS send 0 for the sets of parameters that whose model status is infeasible. But, I do not know why my code does not work.

I would highly appreciate it if somebody helps me solving these two issues.

Best regards.


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/groups/opt_out.