Hi all, So much thanks for so many kind people. fdu.xiaojf@gmail.com wrote:
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.
I'm sorry that I haven't fully stated my question correctly. There are still inequality constraints for my problem. All the variables(x1, x2, ..., xn) should be equal or bigger than 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
Regards, Xiao Jianfeng