## Search found 394 matches

- 2 weeks ago
- Forum: Syntax
- Topic: Flow equation
- Replies:
**3** - Views:
**1052**

### Re: Flow equation

I think it should be: alias(np,anp); flow(n,np)$ar(n,np).. QN(n,np) =e= sum(anp$(ord(anp) < ord(np), XN(n,anp)) + q; . This will take all XN for which the first index is the same as in QN (i.e. 'n') and the second index anp goes from the first element of np to the one just before n. Hope this clarif...

- 3 weeks ago
- Forum: Solvers
- Topic: What are the cause of the infeasibility ?
- Replies:
**1** - Views:
**994**

### Re: What are the cause of the infeasibility ?

Hi If I run your model with Bonmin, inspecting the listing files gives me **** REPORT SUMMARY : 12 NONOPT ( NOPT) 292 INFEASIBLE (INFES) SUM 74.671 MAX 1.473 MEAN 0.256 0 UNBOUNDED 0 ERRORS 4830 PROJECTED Searching upwards for INFES gives me, for example, ---- EQU eq6 LOWER LEVEL UPPER MARGINAL 8 .t...

- 3 weeks ago
- Forum: Modeling
- Topic: Error 142 suffix is not allowed
- Replies:
**6** - Views:
**1112**

### Re: Error 142 suffix is not allowed

Hi Wegik It looks like you mix the concept of parameter, variables and equations. Variables can have bounds, levels and marginals and you can set them by using the extension .UP, .LO for bounds, .L for levels and .M for marginals. Parameters are constants and do not have bounds (well, you could say ...

- 3 weeks ago
- Forum: Archive Google Group
- Topic: Reach two different answers in two different versions of GAMS
- Replies:
**2** - Views:
**833**

### Re: Reach two different answers in two different versions of GAMS

Hi If you have a model that can have multiple solutions and use a non-global solver, this might be (but I am no solver expert) due to a newer version of the solver that leads due to changes in the solver to another local solution It also depends on what you call different. You can save the solution ...

- 3 weeks ago
- Forum: Syntax
- Topic: Flow equation
- Replies:
**3** - Views:
**1052**

### Re: Flow equation

Hi You can use -1 for the previous index and the $-sign to constrain the summation, like this alias(m, am); Q(m,n) = sum(am$(ord(am) < ord(m)+1), Q(am-1,n)X(am-1,n))+ QIN(am,n); Note, that you have to use an alias, as you can't sum over m as it is already used for indicating the variable Q(m,n), so ...

- 3 weeks ago
- Forum: Modeling
- Topic: changing the amount of sets in parameter
- Replies:
**3** - Views:
**493**

### Re: changing the amount of sets in parameter

Hi

Please, show me your code that producers the error.

Cheers

Renger

Please, show me your code that producers the error.

Cheers

Renger

- 4 weeks ago
- Forum: Modeling
- Topic: changing the amount of sets in parameter
- Replies:
**3** - Views:
**493**

### Re: changing the amount of sets in parameter

Hi Yes, this is possible. The most secure way is just summing all the values so all the items are taken from the original tabel Prices_data(centralamerica,crops,Year) = sum((AreaCode, ItemDoce, ElementCode, dollars, YearCode), Prices_data(AreaCode,centralamerica,ItemCode,crops,ElementCode,dollars,Ye...

- 4 weeks ago
- Forum: Modeling
- Topic: How I can code this formula with if operator ?
- Replies:
**1** - Views:
**106**

- 4 weeks ago
- Forum: Syntax
- Topic: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0
- Replies:
**7** - Views:
**230**

- 1 month ago
- Forum: Syntax
- Topic: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0
- Replies:
**7** - Views:
**230**

### Re: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0

Hi I would be 100% sure that the sum over the household demands is equal to the total, e.g. parameter check(*); check("GOV_in") = sum(phh, sam("GOV_in",phh)) - sam("GOV_in","CONS"); ... and see if you assgined the values correctly. You see the infeasibility in your output screen: ** EXIT - iteration...