[SciPy-user] nonlinear optimisation with constraints
Ernest Adrogué
eadrogue at gmx.net
Sun Jun 21 18:25:56 EDT 2009
Hi all,
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
constraint.
x = (a1, a2, a2, ..., a_n, b1, b2, b3, ..., b_n)
Maximise: f(x)
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.
Any advice?
Thanks.
Ernest
More information about the SciPy-User
mailing list