How to write below quadratic utility function equations in GAMS with conditions Topic is solved
-
- User
- Posts: 10
- Joined: 3 years ago
How to write below quadratic utility function equations in GAMS with conditions
how can i write quadratic equation in gams with upper and lower bounds. Attaching JPG file for reference. yours suggestions please.
Re: How to write below quadratic utility function equations in GAMS with conditions
You either introduce a binary variable b that tells you where you x is (x<=omega/alpha => b=0, else b=1) and use that to model the function or if you are in the lon-linear model realm anyway use ifthen(x<=omega/alpha, omega*x - alpha/2*sqr(x), omega/alpha).
-Michael
-Michael