How can I change step tolerance, optimality measure, or optimaility/consraint tolerance for a non-linear optimization problem?

25 vues (au cours des 30 derniers jours)
I am trying to maximize a non-linear optimization problem using the Optimization Toolbox. However, I run into an issue when I attempt to solve, as it finds essentially whatever initial point I give (that is inside the constraint range) to be a local minimum and it does not attempt to maximize the objective. I get the following message:
Initial point is a local minimum that satisfies the constraints.
Optimization completed because at the initial point, the objective function is non-decreasing
in feasible directions to within the value of the optimality tolerance, and
constraints are satisfied to within the value of the constraint tolerance.
...
Optimization completed: The final point is the initial point.
The first-order optimality measure, 0.000000e+00, is less than options.OptimalityTolerance =
1.000000e-06, and the maximum constraint violation, 0.000000e+00, is less than
options.ConstraintTolerance = 1.000000e-06.
I've looked online about trying to change these various characteristics, but I've only found solutions changing it for when one directly runs a command like fmincon; I'm not sure how it needs to be changed for my setup here. I have the (relevant) code below, I can provide more if needed. Thank you.
pllPM = optimproblem('ObjectiveSense','maximize');
...
c1_pico = optimvar('cap1', 1);
...
con_min = c1_pico >= 1E-1;
con_max = c1_pico <= 1E1;
pllPM.Constraints.cap_max = con_max;
pllPM.Constraints.cap_min = con_min;
...
pllPM.Objective = atan(r1*c1*unity) - atan(r1*c_eq*unity);
show(pllPM)
c0.cap1 = 5;
c1_struct = solve(pllPM, c0)
  1 commentaire
Matt J
Matt J le 8 Sep 2020
Modifié(e) : Matt J le 8 Sep 2020
It appears that you have only a single unknown variable. It may therefore be better just to use fminsearch or fminbnd.

Connectez-vous pour commenter.

Réponses (1)

Matt J
Matt J le 8 Sep 2020
Modifié(e) : Matt J le 8 Sep 2020
This example shows how you can pass an optimoptions object to the solver
However, one reason why it may not be progressing past the initial point is if you are initializing in a region with very low gradient. Note that if r1*c1*unity and r1*c_eq*unity are large, the atan() terms will have very smalll slope.

Catégories

En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by