Borrar filtros
Borrar filtros

Fmincon, is it possible to give a priority to the constraints defined?

2 visualizaciones (últimos 30 días)
Dear all, I have to solve a simple optimization problem with few equality and inequality constraints. To do that, I am using fmincon. Due to the fact that not all the constraints that I am using have the same priority in my problem, I was wandering if there is any way to tell Matlab which constraint is more important and have to be satisfied first. If the less important constraints are not satisfied, this will not cause an issue to my work. Thank you very much in advance, Jacopo

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Jun. de 2017
Depending on you function, you might be able to express your less important constraints in terms of numeric penalties. For example, if x(3) being outside the range [x(2)-5, x(2)+5] is not critical, then
f = .... + (x(3) < x(2)-5 | x(3) > x(2)+5) .* 5 .* abs(x(3)-x(2))^2
would give a penalty of 5 times the square of the difference to x(2) for being outside the area, but would otherwise not reject the possibility. (The best weight for the penalty would depend upon the priority and upon the typical function values.)

Más respuestas (0)

Categorías

Más información sobre Get Started with Optimization Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by