Which "optimoptions" should be used for "fmincon()" to optimize a cam-based transmission design using the Optimization Toolbox in MATLAB R2023b?

1 visualización (últimos 30 días)

I am seeking to optimize a cam-based transmission design. In the objective function, properties of different cam options are calculated based on the x-vector which defines a cam option. If some of these properties violate my constraints, that cam option should be understood by "fmincon()" to be infeasible. One of the properties is the variable being minimized by the objective function. Because the cam-based transmission needs to be machinable, we can only accept options within a certain precision.
I have the following questions regarding the "optimoptions" for "fmincon()" that can be leveraged for the application described above.
1) I have a global variable defined and the global variable is shared between optimizer function and non linear constraint function. "fmincon()" function is unable to run properly with the global variables shared between optimizer function and non linear constraint function. It gives a matrix singularity error.
How to achieve the workflow which updates the global variable in the optimizer and also uses the updated global variable for the non-linear constraint function?
2) Is it possible to use an output function and save the history when using "fmincon()" with "UseParallel"?
3) "x0" is set as an initial variable. In history, it is not testing "x0" first, it is testing different values of "x0" based on different bounds. Sometimes these values are infeasible. Why is "x0" not tested when I provided this as the initial variable?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 15 de Ag. de 2024
Here are the "optimoptions" that can be leveraged using "fmincon()" for the cam-based transmission design
1) Regarding sharing the global variable between the optimizer function and non linear constraint function, the documentation attached below provides a nice example of sharing computed values across the objective function and non linear constraints
https://www.mathworks.com/help/releases/R2023b/optim/ug/objective-and-nonlinear-constraints-in-the-same-function.html
Note that the objective function and non linear constraints function also need to follow syntax requirements listed in the links below
        a) Objective function: https://www.mathworks.com/help/releases/R2023b/optim/ug/writing-scalar-objective-functions.html
        b) Non-linear constraints function: https://www.mathworks.com/help/releases/R2023b/optim/ug/nonlinear-constraints.html
2) Regarding using "fmincon()" with "UseParallel", it is indeed possible to use an output function and save history. The output function is still called after each iteration.
3) Regarding not testing "x0" first, for the default interior-point algorithm, "fmincon()" adjusts the initial point to be within the bounds. It does not check whether the adjusted initial point is feasible with regards to the non-linear constraints function. 

Más respuestas (0)

Categorías

Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by