You should define your constraint per user group ("Altersgruppe"):

Equations

ZFkt1 Zielfunktion

*NB Nebenbedingung

NB(i)

;

ZFkt1..

ZF =e= sum((j,i), r(j) * x(j));

*NB..

*sum(t$(ord(t)<=ord(i)), b(j,t)) =e= a(t);

NB(i)..

sum(j,b(i,j)*x(j))=e=1;

## Search found 24 matches

- 2 years ago
- Forum: Syntax
- Topic: Choosing columns so that sum(rows) are equal 1
- Replies:
**4** - Views:
**1579**

- 2 years ago
- Forum: Modeling
- Topic: Dynamic subset as input extracted from solutions in a two phase model
- Replies:
**0** - Views:
**717**

### Re: Dynamic subset as input extracted from solutions in a two phase model

in mode2 you only want the plants and destinations of that cluster

in all equations of model2 add the conditional $B.l(c,i,j)

and I would change that last loop into:

Loop (c$CC(c),

Solve Model_2 for each cluster.

Display results;

);

in all equations of model2 add the conditional $B.l(c,i,j)

and I would change that last loop into:

Loop (c$CC(c),

Solve Model_2 for each cluster.

Display results;

);

- 2 years ago
- Forum: Syntax
- Topic: Choosing columns so that sum(rows) are equal 1
- Replies:
**4** - Views:
**1579**

### Re: Choosing columns so that sum(rows) are equal 1

you need to use mixed integer programming instead of linear programming

- 2 years ago
- Forum: Syntax
- Topic: how to uses ord on a dynamic set
- Replies:
**6** - Views:
**2874**

### Re: how to uses ord on a dynamic set

The trick is not to loop over the dynamic set but over the constant set using the dynamic set as a conditional scalar timestep /3/ ; Set Year /2014*2033/ delayYr(year) ' Years' ; delayYr(year)$(mod(ord(year)-1,timestep)=0)=Yes; display delayYr; scalar val; loop(Year$delayYr(year), val = ord(year); d...