I am trying to solve an optimization problem where I do not have the analytic form of the objective function. I am doing analysis by FEM to find a value for displacement in each iteration but I don't have the displacement function itself. How can I minimize displacement (Objective function) then? For example this can be done in matlab with fmincon easily. How can we do the same in python? I do the following in matlab

x = fmincon(fun,v,[],[],Aeq,beq,lb,ub,[],opts);

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

I have seen some solvers like gekko, but they all want the function to be given in an analytical form. However I only have basically a vector from my Finite Element Method

  • 1
    $\begingroup$ I think this forum is not the right for this kind of question. Furthermore, I am quite surprised you haven't found the scipy.optimize package yet ;) $\endgroup$
    – Laurent90
    Feb 26 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.