Re: Nesting NMaximize
- To: mathgroup at smc.vnet.net
- Subject: [mg126738] Re: Nesting NMaximize
- From: danl at wolfram.com
- Date: Sun, 3 Jun 2012 05:00:25 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jqcne6$15j$1@smc.vnet.net>
On Saturday, June 2, 2012 4:46:46 AM UTC-5, Manolo Mart=EDnez wrote: > 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 > > -- 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