[SciPy-user] nonlinear optimisation with constraints
Sun Jun 21 17:25:56 CDT 2009
I am stuck in an obnoxious optimisation problem.
Essentially, I want to find the local maximum of a
multivariate nonlinear function subject to a linear
x = (a1, a2, a2, ..., a_n, b1, b2, b3, ..., b_n)
Subject to: sum(a) - sum(b) = 0
No big deal, apparently. The problem is that f(x) is defined
only when x_n > 0 for all n, as it contains lots of
log(a[i] * b[j])
which are undefined when a[i] or b[j] < 0.
I have tried to specify a lower bound for x, but both
fmin_l_bfgs_b and fmin_tnc seem to evaluate the objective
function with elements of x < 0, regardless of the bounds
specified, making my programme to crash.
fmin_cobyla seems to ignore the constraint altogether.
I have run out of ideas on how to deal with this.
More information about the SciPy-user