# Solve optimization problem that iterates on parameters with constraints defined with numerical solutions to differential equations depending on those parameters

3 views (last 30 days)
Johan Poccard on 19 May 2020
Commented: Johan Poccard on 24 May 2020
I want to search for an optimum in a problem where the constraints are numerical solutions of differential equations (these equations don't have analytical solutions) but the parameters I want to iterate on are parameters that appear in the differential equation so that the solver would need to:
• compute the numerical solution to the differential equations with current parameters
• check if my constraints on the numerical solutions are verified and compute
• if they are not, change parameters and compute the numerical solutions again to see if it gets closer
• once they are, try to minimize my objective function (which is also a function of these parameters) which to complicate even more is the maximum value in a vector
I don't have a lot of code to show because I don't know where to begin but basically I would like to do this :
objective: minimize (max(k))
constraints:
I=1;
k01=0.1;
k12=0.1;
Fm=10;
Fg=0.1;
l=30*10^(-3);
tspan = [0 5];
end
[t,theta] = ode45(@(t,theta) odefcn(t,theta,k), tspan, theta0);
theta(t_final)-theta_objective < tol
I guess come optimization toolboxes offer this possibility but I can't find one.

Alan Weiss on 20 May 2020
Perhaps the example Fit an Ordinary Differential Equation (ODE) can help.
Alan Weiss
MATLAB mathematical toolbox documentation
Johan Poccard on 24 May 2020
Thank you !