Search found 4 matches

by A.Sen
4 years ago
Forum: Modeling
Topic: random variable in gams
Replies: 3
Views: 3196

Re: random variable in gams

discreteRV.gms
(481 Bytes) Downloaded 263 times
Hi,
Maybe not the most optimum method to generate random variables in GAMS, but you can find an example in the attached file.
Sincerely
by A.Sen
4 years ago
Forum: Syntax
Topic: Preventing divison by zero
Replies: 2
Views: 2905

Re: Preventing divison by zero

Hi,
If all other calculations are working well, one can do the following adjustment:

hexarea(i,j,k)$LMTD(i,j,k).. area(i,j,k) =e= q(i,j,k) / (U(i,j) * LMTD(i,j,k)) ;

This should prevent any constraint from being generated if LMTD(i,j,k) == 0

Sincerely.
by A.Sen
6 years ago
Forum: Syntax
Topic: optimal dual variables
Replies: 1
Views: 2989

Re: optimal dual variables

Hello.
You are looking for marginal variables in GAMS. So you could use Con1.m(k), Con2.m, Con3.m.
Sincerely,
by A.Sen
6 years ago
Forum: Syntax
Topic: error 148 Dimension different
Replies: 2
Views: 9446

Re: error 148 Dimension different

Hello. Please find below some suggestions on your GAMS model wrt error you got. There are many issues related with writing structured, well defined mathematical model on your code. I would suggest reading the manuals and guides line by line one more time. Sincerely. ... variables ..., y1 'definition...