Dear all,

My problem setting is as follows:

- I have set of linear equations, the
**variables** obtained after solving these are X1,X2…,Xn and Y1,Y2…,Yn.
- Once the above variables are obtained,
**these are required as parameters in the rest of the problem**.

Can you please tell me how to do it?

Parag,

The variables levels are available after the solve using the .L attribute, e.g.

```
set i / 1 * 3 /;
variable x(i);
* I don't list it here, but imagine some code to solve a model and by doing so setting the variable levels for x
* now x.L(i) is available, just like a parameter.
parameter c(i), v(i);
c(i) = x.L(i);
v(i) = ord(i) / [x.L(i) + 2];
```

Using the variable levels like this is fundamental stuff. It is described in the Rosenthal tutorial (just digest the whole tutorial, it is not wasted time) and in more detail in the chapter on variables.

https://www.gams.com/latest/docs/UG_Tutorial.html

https://www.gams.com/latest/docs/UG_Variables.html

-Steve

Hi,

Thank you for your reply.