## Search found 636 matches

1 week ago
Forum: Syntax
Topic: limited sums
Replies: 3
Views: 434

### Re: limited sums

Your question is still not clear to me. The equation is for all i,j,k. I don't understand what you mean by summing is a problem.
Cheers
Renger
1 week ago
Forum: Syntax
Topic: limited sums
Replies: 3
Views: 434

### Re: limited sums

Hi
Looks fine. However, notice that if you are at the last k and the one before that the constraint will read

Code: Select all

``````
last k
y(i,j,k)=l= 1;
* Last k - 1
y(i,j,k)+y(i,j,k+1) =l= 1;
``````
Cheers

Renger
1 week ago
Forum: Modeling
Topic: Loop issue
Replies: 10
Views: 864

### Re: Loop issue

Hi Sorry, I overlooked something. Just put in the version I sent you the following loop (no need for the additional constraint). loop (q, solve Model9 MAXIMIZING z using MIP; if (z.l gt 0, counter = counter + 1; display "solved",counter, K.L; Eff(j)\$(K.L(j) = 1) = YES; K.FX(j)\$(K.L(j) = 1) = 0; ); )...
1 week ago
Forum: Modeling
Topic: Loop issue
Replies: 10
Views: 864

### Re: Loop issue

Hi Mateo

I think you don't need the additional constraint. If you find a solution for a DMU, you can fix the K-Variable to zero.
I attached my solution.

CHeers
Renger
Model9 - Loop - Copia.gms
1 week ago
Forum: Modeling
Replies: 6
Views: 365

gdxxrw
1 week ago
Forum: Modeling
Replies: 6
Views: 365

Hi Your tables are all two-dimensional tables, so not many options needed. Work through the examples in the GDXXR documentation (unfortunately, it starts with all options. It is better to start with the examples and if you encounter more difficult tables/problem, you can look through the settings). ...
1 week ago
Forum: Modeling
Topic: Loop issue
Replies: 10
Views: 864

### Re: Loop issue

What is not working? Send all the files, so I can at least run your model to see what is happening.
Cheers
Renger
1 week ago
Forum: Modeling
Topic: Loop issue
Replies: 10
Views: 864

### Re: Loop issue

Hi

If you define f over q as a dynamic set (and not an alias), I think you can do it as follows:

Code: Select all

``````set f(q)  dynamic set;

...

...
loop (q,

solve Model9 MAXIMIZING z using MIP;
if (z.l gt 0,
f(q)\$k.l(q) = yes;
);
);

...
``````
Hope this helps
Renger
1 week ago
Forum: Syntax
Topic: Weighted sum method with three objectives
Replies: 4
Views: 174

### Re: Weighted sum method with three objectives

Hi According to me, you will have 55 combinations of weights. I used this code (there might be a more subtle way to do this): set ln1 /1*10/; set cnt /1*110/ Counter; parameter w, w1, w2, w3, delta; parameter counter; * Set the first value (as not calculated in the loop) w("1","1") = 1; w("1","2") =...
1 week ago
Forum: Syntax
Topic: Weighted sum method with three objectives
Replies: 4
Views: 174

### Re: Weighted sum method with three objectives

Hi Kaidr Why don't you use the random number generator and generate a set of random weights? Something like this: set u /1*11/; Option Seed=12 parameter w1(u), w2(u), w3(u), delta(u); w1(u) = uniformInt(0,10); w2(u) = uniformInt(0,10); w3(u) = uniformInt(0,10); delta(u) = w1(u) + w2(u) + w3(u); w1(u...