lagrange multipliers in python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fdu.xiaojf@gmail.com

    #1

    lagrange multipliers in python

    Hi all,

    Sorry for the cross-posting.

    I'm trying to find the minimum of a multivariate function F(x1, x2, ...,
    xn) subject to multiple constraints G1(x1, x2, ..., xn) = 0, G2(...) =
    0, ..., Gm(...) = 0.

    The conventional way is to construct a dummy function Q,

    $$Q(X, \Lambda) = F(X) + \lambda_1 G1(X) + \lambda_2 G2(X) + ... + \lambda_m
    Gm(X)$$

    and then calculate the value of X and \Lambda when the gradient of function Q
    equals 0.

    I think this is a routine work, so I want to know if there are available
    functions in python(mainly scipy) to do this? Or maybe there is already
    a better way in python?

    I have googled but haven't found helpful pages.

    Thanks a lot.

    Xiao Jianfeng
Working...