Ask Your Question
1

Maximize nonlinear function with linear constraints

asked 2019-04-04 01:13:14 +0200

merluza gravatar image

updated 2019-04-04 01:15:33 +0200

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 :-)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-04-04 01:59:37 +0200

slelievre gravatar image

Hint: maximize f by minimizing (-f).

edit flag offensive delete link more

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: 2019-04-04 01:13:14 +0200

Seen: 339 times

Last updated: Apr 04 '19