mma_numpy
- compas_tno.solvers.mma_numpy(f_g_eval, f_df_g_dg_eval, x0, bounds, args=(), kkttol=1e-06, maxoutit=100, plot='2')[source]
Method of Moving Asymptotes (MMA) implementation from K. Svanberg.
- Parameters
f_g_eval (callable) – The function used by the minimizer to evaluate the objective function (f) and the constraints (g). It takes as input the point to evaluate (x), and the arguments (args). It returns two arrays, one for the evaluation of (f-1x1 array) and one for the evaluation of (g-mx1 array).
f_df_g_dg_eval (callable) – The function used by the minimizer to evaluate the objective function (f) and the constraints (g) and its derivatives. It takes as input the point to evaluate (x), and the arguments (args). It returns four arrays, first the evaluation of (f - 1x1 array) and (dfdx - nx1 array), and also the evaluation of (g - mx1 array) and its derivative (dgdx - mxn array).
x0 (array) – Starting point for the MMA optimisation.
bounds (list) – Bounds for each variable of the optimisation.
args (tuple) – Argument to be passed with the callables.
kkttol (float [10e-6]) – The tolerance for the KKT check, i.e. the tolerance for the stopping point observing the null derivatives.
maxoutit (int [100]) – Maximum number of iterations to perform in the optimisation.
plot (int [2]) – Control plots on screen. ‘0’ nothing is plot, ‘1’ detailled plot and ‘2’ summary plot.
- Returns
fopt (float) – The value of the minimisation.
xval (array) – Value of the variables on the optimum.
Notes
For more info, see [1]. This is the python version of the code written by Arjen Deetman [2].
Notes
- 1
Svanberg, K., The method of moving asymptotes–a new method for structural optimization, International Journal for Numerical Methods in Engineering, 24, 359-373, 1987.
- 2
Deetman A. GCMMA-MMA-Python. https://github.com/arjendeetman/GCMMA-MMA-Python