Hello,
I am trying to calculate welfare losses of drought. Therefore I am building my model step by step.
However, when I try to solve for the variable "Old_demand(j,y,a)" it says I am using the variable differently then I have declared it (error 148). I cannot seem to solve this error. It is probably very simple but I cannot work it out.
Thank you for your help.
Cannot solve error 148
-
- User
- Posts: 1
- Joined: 7 years ago
Cannot solve error 148
- Attachments
-
- dynamisch maken code.gms
- (2.72 KiB) Downloaded 301 times
Re: Cannot solve error 148
Hi
You have made the following errors:
You are maximizing several variables at the same time (and if this would be possible, you should have written it like
The maximand should be one-dimensional if you want to use (D)NLP, e.g.
You have made the following errors:
Code: Select all
solve IMPREX USING DNLP maximize Old_demand(j,y,a);
Code: Select all
solve IMPREX USING DNLP maximize Old_demand;
Code: Select all
OBJ =E= sum((j,y,a) , Old_Demand(i,y,a));
solve IMPREX USING DNLP maximize OBJ;
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist