I need your help regarding solving an optimization problem in LINGO programming.

Assume that there is a set of parameters and variables; e.g., Vark/ 1..18 /: x, c.

I need to partition this set into three sets A, B (it has only one member), and C. The objective function includes the summation of three terms where

- the first term is calculated based on indices only A,

- the second term is calculated on B (with a single index), and

- the third term is calculated based on indices only in C.

So, the partition (i.e., B) moves between 2 to 17 in the example. So, the combinations are as follows:

1, 2, 3..18

1..2, 3, 4..18

1..3, 4, 5..18

.

.

.

1..16, 17, 18

Then, for each of the above combinations, the model is run once. Then, the optimal answer for the combinations is compared and the best one is output. I have written the code for only one combination. The question is how we can define a moving index on Vark and push the model to use @SUM for each set separately.

More Reza Zanjirani Farahani's questions See All
Similar questions and discussions