| Author |
Comment/Response |
Bill Simpson
|
11/08/12 2:30pm
To restrict the domain to 0,1 see what happens if you add a constraint x*(x-1)==0 for all your variables x.
That appears to work for the small example I tried.
In[1]:= NMinimize[{a*3+(b-2)*2,a*(a-1)==0&&b*(b-1)==0&&a+b==1},{a,b}]
Out[1]= {-2.0000, {a->-1.8626*^-9, b->1.0000}}
URL: , |
|