## Search found 384 matches

- 3 hours ago
- Forum: Syntax
- Topic: Flow equation
- Replies:
**3** - Views:
**56**

### 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...

- 1 day ago
- Forum: Solvers
- Topic: What are the cause of the infeasibility ?
- Replies:
**1** - Views:
**58**

### 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...

- 1 day ago
- Forum: Modeling
- Topic: Error 142 suffix is not allowed
- Replies:
**1** - Views:
**70**

### 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 ...

- 1 day ago
- Forum: Archive Google Group
- Topic: Reach two different answers in two different versions of GAMS
- Replies:
**2** - Views:
**31**

### 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 ...

- 1 day ago
- Forum: Syntax
- Topic: Flow equation
- Replies:
**3** - Views:
**56**

### 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 ...

- 5 days ago
- Forum: Modeling
- Topic: changing the amount of sets in parameter
- Replies:
**3** - Views:
**78**

### 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

- 1 week ago
- Forum: Modeling
- Topic: changing the amount of sets in parameter
- Replies:
**3** - Views:
**78**

### 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...

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

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

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

### 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...