我正在尝试解决一个没有目标函数分析形式的优化问题。我正在通过 FEM 进行分析,以找到每次迭代中的位移值,但我没有位移函数本身。那我怎样才能最小化位移(目标函数)?例如,这可以在 matlab 中使用 fmincon 轻松完成。我们如何在 python 中做同样的事情?我在matlab中执行以下操作
x = fmincon(fun,v,[],[],Aeq,beq,lb,ub,[],opts);
where
fun is a function I have written that returns a vector from Finite Element Method
and in opts I have specified interior point as follows
optimoptions('fmincon','Algorithm','interior-point','GradObj','on','display','iter','MaxFunEvals',100);
我见过一些像gekko这样的求解器,但他们都希望以分析形式给出函数。但是我基本上只有一个来自我的有限元方法的向量