Search found 4 matches
- 4 years ago
- Forum: Modeling
- Topic: random variable in gams
- Replies: 3
- Views: 3215
Re: random variable in gams
Maybe not the most optimum method to generate random variables in GAMS, but you can find an example in the attached file.
Sincerely
- 4 years ago
- Forum: Syntax
- Topic: Preventing divison by zero
- Replies: 2
- Views: 2927
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.
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.
- 6 years ago
- Forum: Syntax
- Topic: optimal dual variables
- Replies: 1
- Views: 3091
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,
You are looking for marginal variables in GAMS. So you could use Con1.m(k), Con2.m, Con3.m.
Sincerely,
- 6 years ago
- Forum: Syntax
- Topic: error 148 Dimension different
- Replies: 2
- Views: 9539
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...