Hello all,

I’m a newbie in GAMS, hope you can help me in my study.

In my problem (in the attachment) I’m trying to see optimal lifetime values for different types of wireless sensor networks.

For this problem;

- I have 26 different power levels (noted as a set named “a”),
- A base station (where it collects all the data and named as “n1” in my topology)
- Some number of sensor node (Starting from “n2” to “n101” and defined as a set)
- Linear topology is used where base station is located at (0,0) and inter-node distance is 10 meters (dint=10)

I want to calculate the maximum lifetime starting from 2 nodes (1 base station + 1 sensor node) with 26 different power levels (thus having 26 different optimal values) up to 101 nodes (1 base station + 100 sensor nodes) with again 26 different power levels.

My problem is about increasing the number of elements in a set (this set is actually notated by i(iall)) dynamically. In other words in the first iteration I need to have n1 and n2 nodes, and in the last iteration I need to have n1, n2,…,n101, and each time I’d like to calculate the optimal lifetime for 26 different power levels. In the attachment you may find my work for this problem. But I keep getting errors. Is there a possible alternative way to do such an implementation?

Thanks for your help,

Yours,

## Ugur

\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/GEPrxcbfKwYJ.

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.