I’m trying to use 2 variables:

- X to show the percentage of project finished in one year;
- Y to choose the project to invest.

There are some constraints like if I couldn’t finish one, it should be finished on the next year

eg: X(“1”, “2”, “2”) + X(“1”, “2”, “3”) - Y(“1”, “2”, “2”) == 0;

I compiled but X(i, j, k) shows only one element (where should be at least 4 because of Y variable has 4 values).

Did I forget to add another constraint?

–

parcial.gms (4.19 KB)

Hi Hugo:

You can see that Y(1,y1,y1) is the binary that takes the value of 1 for project 1, but it doesn’t appear on any constraint. That is why it doesn’t influence any X. I guess you are forgetting a constraint or something.

There also seems to be something strange for project 3, which has only one cosntraint when all other have two.

You could take advantage of GAMS projecting equations over sets features to minimize this types of errors.

Hope to help !

Regards

Claudio

On Mon, Feb 17, 2014 at 2:43 PM, Hugo Hiroshi Yamamura wrote:

I’m trying to use 2 variables:

- X to show the percentage of project finished in one year;
- Y to choose the project to invest.

There are some constraints like if I couldn’t finish one, it should be finished on the next year

eg: X(“1”, “2”, “2”) + X(“1”, “2”, “3”) - Y(“1”, “2”, “2”) == 0;

I compiled but X(i, j, k) shows only one element (where should be at least 4 because of Y variable has 4 values).

Did I forget to add another constraint?

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.