First time here? Check out the FAQ!

Ask Your Question
1

Maximize nonlinear function with linear constraints

asked 6 years ago

merluza gravatar image

updated 6 years ago

I would like to have Sage maximize 60 * 5^{x0} *4^{x1} * 3^{x2}, where x0, x1, x2 are nonnegative integers such that

x0+x1+x2=2k-3 and x1+2*x2 >= 3k-3,

where k is any nonnegative integer such that 3<= k <=20. I would like to create a loop so that Sage does this for me for each of these values of k.

I know that Sage has a tool called minimize_constrained, but I can't find a tool called "maximize_constrained". Please help! Thank you in advance :-)

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 6 years ago

slelievre gravatar image

Hint: maximize f by minimizing (-f).

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 518 times

Last updated: Apr 04 '19