Problem based framework for my optimization problem is not working
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
At first, I was performing an optimization with respect to all elements of 'A' matrix using below command.
[Aopt,fopt]=fminunc(@(A)myObjective(A,N33,p1,v,limit,n),A0,options);
But now I want an extra parameter (x) to be used for optimization also. Hence, I switched to problem based framework implemented using below code segment.
A=optimvar('A',N,3);
x=optimvar('x',1);
fun=fcn2optimexpr(@(A,x)myObjective(A,x,N33,p1,v,limit,n),A,x);
sol0.A=... %initial A0
sol0.x=... %initial x0
sol=solve(optimproblem('Objective',fun),sol0,options);
But, it is not working. I am getting error like this.
Error using optim.internal.problemdef.ProblemImpl/solveImpl
Expected a string scalar or character vector for the parameter name
Error in optim.problemdef.OptimizationProblem/solve
Error in Optimization_FINAL.m (line 145)
sol=solve(optimproblem('Objective',fun),sol0,options);
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Problem-Based Optimization Setup dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!