Symmetry in an Optimization - fmincon
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am running an fmincon optimization where sometimes multiple variables can have the same effect on the objective function. As a result, the optimizer doesn't prefer one variable over the other and can find multiple solutions all with the same objective value. Sometimes this will result in an exitflag of 2.
This can cause it to "switch" between values as the optimization is run over and over again. This is not necessarily a problem, but rather an annoyance and does not realistically represent the physical system that optimization is attempting to model.
My question is, is there a way to "detect" that this kind of symmetry exists in the problem?
My problem is quite complex and uses linear equality constraints and both linear and nonlinear inequality constraints. And 'x' can be anywhere from a few values to several dozen.
Thank you for you time.
0 comentarios
Respuestas (1)
Walter Roberson
el 23 de Mzo. de 2016
In the situation where the calculation is all by formula and no "if" or logical indexing, then if you have the symbolic toolbox, you can call the objective function with different orders of symbols and see if you get the same output. The outputs might not be in identical order, so subtract the two prospective outputs and see if the result is 0.
If f(x,y,z) has output equivalent to f(x,z,y) for symbolic x, y, z then the function is symmetric around y vs z.
0 comentarios
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!