[SciPy-User] fsolve with restriction on variable
Ernest Adrogué
eadrogue at gmx.net
Tue Aug 4 07:23:55 EDT 2009
4/08/09 @ 10:49 (+0200), thus spake Sebastian Walter:
> what you can try to do is using a penalty method:
>
> x_* = argmin_x f(x)
> subject to g(x) <= 0
>
> then you can try to do:
>
> x_* = argmin_x f(x) + \rho (max(g(x), 0))^p
> where e.g. p =2, and make \rho large
>
> problem: badly conditioned for \rho very large.
>
> But that's still much better than adding a constant when g(x) > 0!
But... this won't prevent the function from being evaluated
outside of its domain, which is the real issue here, will it?
Ernest
More information about the SciPy-User
mailing list