Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Nesting NMaximize

15 views
Skip to first unread message

Manolo Martínez

unread,
Jun 2, 2012, 5:46:46 AM6/2/12
to
Hello, I would like to maximize a function, adding the constraint that a
different function is also big enough. To make it clear, what I would
want to ask Mathematica to do is the following:

NMaximize[{F(a,b,c),F2(a,b,c)>=NMaximize[F2(a,d,e),{d,e}]},{a,b,c}]

I had expected (hoped) that Mathematica would substitute the value of
*a*
it is currently considering for the outer nMax in the inner nMax, but it
doesn't: the inner nMax complains that F2(a,d,e) is not a number at
{d,e}={<number1>,<number2>}

Is there any way I can ask Mathematica to use the same value of *a*
outside and inside?

Thanks
Manolo

--

da...@wolfram.com

unread,
Jun 3, 2012, 5:01:17 AM6/3/12
to
Can define F@ something like this.

F2[a_?NumberQ,d_,e_]:=...

That should allow it to be run with strictly numeric input from the outer optimization. But...how do you arrange that for arbitrary (b,c), F2(a,b,c) will be at least as large as F2(a,d,e) over all possible (d,e)?

Daniel Lichtblau
Wolfram Research

0 new messages