Search found 639 matches

by Renger
4 years ago
Forum: Modeling
Topic: changing the amount of sets in parameter
Replies: 3
Views: 3244

Re: changing the amount of sets in parameter

Hi
Please, show me your code that producers the error.
Cheers
Renger
by Renger
4 years ago
Forum: Modeling
Topic: changing the amount of sets in parameter
Replies: 3
Views: 3244

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...
by Renger
4 years ago
Forum: Modeling
Topic: How I can code this formula with if operator ?
Replies: 2
Views: 2230

Re: How I can code this formula with if operator ?

Hi
Have a look at this post.
Cheers
Renger
by Renger
4 years ago
Forum: Syntax
Topic: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0
Replies: 7
Views: 5569

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

Hi
You could have a look at the paper by Robinson (they also provide the code). .
Cheers
Renger
by Renger
4 years ago
Forum: Syntax
Topic: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0
Replies: 7
Views: 5569

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...
by Renger
4 years ago
Forum: Syntax
Topic: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0
Replies: 7
Views: 5569

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

Hi

You write that disaggregating the data causes problem when solving. If you set the iteration limit to zero, how big is the infeasibility of the disaggregated model? Could you attach the model?
Cheers
Renger
by Renger
4 years ago
Forum: Syntax
Topic: Error in the constraint writing
Replies: 8
Views: 5213

Re: Error in the constraint writing

Hi Stef See here the equation 4. You need to use the alias. alias(t,j); eq_sum(t,k).. sum(i, sum(j$((j.val > max(1, t.val +1 )-1) and j.val < min(t.val, card(t) -d(i)+ 1)), X(i,j)) * a(i,k)) =L= r(k,t); See if this can help you formulate the other equations. Cheers Renger
by Renger
4 years ago
Forum: Modeling
Topic: assign parameters in sequence
Replies: 4
Views: 5165

Re: assign parameters in sequence

Hi I assume that after assigning the value to P_1(ii) you have some more code that uses the single-valued P_1(ii). You could do this by setting all the values to zero before you assign the single-value and set them after your additional code once again to zero. loop (ii, P_1(ii) = 0; subi(ii)=yes; P...
by Renger
4 years ago
Forum: API
Topic: GamsException: Error retrieving audit info
Replies: 3
Views: 5045

Re: GamsException: Error retrieving audit info

I think it is the version. Just download a trial and see if the problem disappears, then you know at least if this is the cause.
Cheers
Renger
by Renger
4 years ago
Forum: Modeling
Topic: Coding second order cone constraint in GAMS
Replies: 3
Views: 2621

Re: Coding second order cone constraint in GAMS

Hi
Did you have a look at the documentation on conic programming: Conic programming?
Cheers
Renger