TransWikia.com

Minimize doesn't work with more parameters

Mathematica Asked on December 25, 2020

In the code I wrote there is a ParametricNDSolve with four parameters. I want to minimize an error function with Minimize. If I consider ParametricNDSolve with just one parameter everything works, and Minimize takes nearly 114 s to evaluate. but if I enter other parameters and modify the code to take them into account, NMinimize stops working and continues to evaluate for an unspecified time without giving any results. I tried to change the Method, but nothing changes. Is it possible to get an idea of what the reasons are?

Do[errfunc[x_?NumberQ,y_?NumberQ][a][b]:=Sum[(f[x,y][a][b][tobs[[i]]]-fobs[[i]])^2,{i,1,20}],{a,1,2},{b,5000,5100,100}]
Table[{a,b,NMinimize[{errfunc[x,y][a][b],{1950<x<1952},{y>0}},{x,y}][[1]]},{a,1,2},{b,5000,5100,100}]

f[x,y] is a result from parametricNDSolve, tobs and fobs are observed quantities.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP