How to write below quadratic utility function equations in GAMS with conditions Topic is solved

Problems with modeling
Post Reply
ersuhaib786
User
User
Posts: 10
Joined: 3 years ago

How to write below quadratic utility function equations in GAMS with conditions

Post by ersuhaib786 »

JPG file
JPG file
how can i write quadratic equation in gams with upper and lower bounds. Attaching JPG file for reference. yours suggestions please.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: How to write below quadratic utility function equations in GAMS with conditions

Post by bussieck »

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
Post Reply