Search found 137 matches

by aileen
3 years ago
Forum: GAMS-FAQ
Topic: How do I union two different sets?
Replies: 1
Views: 2154

How do I union two different sets?

How do I union two different sets in GAMS?
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: How do I model a band matrix?
Replies: 1
Views: 1982

Re: How do I model a band matrix?

A band matrix can be modeled efficiently in GAMS using circular leads (++) and circular lags (--), see chapter lag and lead operator of the GAMS User's Guide for more information. Using circular leads and lags, the first and last members of the set are assumed to be adjacent, so as to form a circula...
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: How do I model a band matrix?
Replies: 1
Views: 1982

How do I model a band matrix?

How do I model a band matrix in GAMS?
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: Reusing optimal values
Replies: 1
Views: 1943

Re: Reusing optimal values

Write the level and the marginals of the variables you are interested in into a GDX container and load that GDX container into your second model. At the end of the first model add something like (assuming that you are interested in x ): execute_unload 'results.gdx', x; and load this data into your s...
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: Reusing optimal values
Replies: 1
Views: 1943

Reusing optimal values

How can I save the optimal values of a certain variable x that appears in one model, and reuse in another model that is otherwise unrelated, i.e. the save/restart facilities are not appropriate?
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: How do I model an absolute value in a linear model?
Replies: 1
Views: 2483

Re: How do I model an absolute value in a linear model?

You cannot put an absolute term for a variable directly into a linear model such as LP or MIP. The model fragment below will not work: [...] obj.. z=e=sum(j, abs(x(j))); cons(i).. sum(j, a(i,j)*x(j)) =l= b(i); model foo /all/; solve foo minimizing z using lp; Various error messages will be given: 14...
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: How do I model an absolute value in a linear model?
Replies: 1
Views: 2483

How do I model an absolute value in a linear model?

How can I put an absolute term for a variable into a linear model?
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: MIN function, don't use it
Replies: 1
Views: 2067

Re: MIN function, don't use it

The min function is a very dangerous one. To discourage users to use this function we don't allow this in an NLP model, and you are forced to declare the model as a DNLP model. The problem is that the min function is not differentiable, just like the max and the abs . The best advice I can give you ...
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: MIN function, don't use it
Replies: 1
Views: 2067

MIN function, don't use it

I have the following equation in my model:

Code: Select all

obj.. y=e=min(xa,xb,xc)+xd;
model m /all/;
solve m using dnlp maximizing y;
MINOS was able to solve a very small instance of my model, but as the size increased MINOS was giving up.
by aileen
3 years ago
Forum: GAMS-FAQ
Topic: I know a better solution
Replies: 1
Views: 1968

Re: I know a better solution

Sometimes the solver found an optimal solution x with objective value z , but one believes that there is a better solution y which has objective value z* . There are different ways to look at such a situation: 1. For models with discrete variables or global solvers in general, make sure you have set...