I want to use NMaximize to solve a problem like this:
$\quad \quad \max_y f(y) \text{ subject to } \max_x g(x, y) \leq c.$
Rather than reproduce my (messier) problem, I have provided a very simple example of how I tried to solve this problem:
f[y_] := 1 - y
g[x_, y_] := x - y
NMaximize[{f[y], y >= 0, NMaximize[{g[x, y], 0 <= x <= 1}, x][1] <= 1/2}, y]
This shows my problem, which is that NMaximize does not nest in this way: It seems that rather than plug the same y in for both problems, Mathematica attempts to evaluate the inner function first and then complains that y is not a number:
NMaximize::nnum: The function value -0.0914636+y is not a number at {x} = {0.0914636}. >>
Is there an alternative approach that could solve a problem like this one?