Maximizing a maximum

Problems with syntax of GAMS
Post Reply
suprafluid
User
User
Posts: 7
Joined: 5 months ago

Maximizing a maximum

Post by suprafluid » 5 months ago

Hello everyone,

I am developing a model for the purpose of finding out the maximum power needed for an application. The power p needed per timestep t depends on eight different objects i, hence p(i,t). I want to maximize the objective function P, which should be a single instance maximum of all power(t) defined by

Code: Select all

power(t)=sum(i,p(i,t))
I am experimenting with smax here, but can't really figure out how to use it properly. Do you have any suggestions?

Best regards
supra

User avatar
bussieck
Moderator
Moderator
Posts: 340
Joined: 2 years ago

Re: Maximizing a maximum

Post by bussieck » 3 months ago

What about,

Code: Select all

eq(t,i).. power(t)=g=p(i,t)
If the model wants to have minimum of power (because of cost or so) the equality for for i will happen automatically. If that's not the case, you need to introduce binary variables that make sure at least one of the constraints is fulfilled with equality. These constraints make a model very difficult.

-Michael

Post Reply