matto.mma#

The method of moving asymptotes (Svanberg 1987), with the subproblem solved by a primal-dual interior-point method and the design vector distributed over MPI ranks.

matto.mma.mma_optimizer(m, n, opt_iter, xval, xmin, xmax, xold1, xold2, df0dx, fval, dfdx, low, upp, *, comm, a0=1, a=None, c=None, d=None, move=0.05, asyinit=0.5, asydecr=0.7, asyincr=1.2, low_bnd=0.002, up_bnd=1.0, albefa=0.1, feps=1e-06)[source]#

Solution update scheme with the method of moving asymptotes (MMA). The algorithm is available in https://doi.org/10.1002/nme.1620240207.

Minimize:

f_0(x) + a_0*z + sum(c_i*y_i + 0.5*d_i*(y_i)^2)

Subjected to:

f_i(x) - a_i*z - y_i <= 0, i = 1, 2, …, m xmin_j <= x_j <= xmax_j, j = 1, 2, …, n y_i >= 0, i = 1, 2, …, m z >= 0

Parameters:
  • m – The number of general constraints.

  • n – The number of the variables, x_j.

  • opt_iter – Iteration counter.

  • xval – Current values of the variables, x_j.

  • xmin – Lower and upper bounds of the variables, x_j.

  • xmax – Lower and upper bounds of the variables, x_j.

  • xold1 – The values of x_j at one and two iterations ago.

  • xold2 – The values of x_j at one and two iterations ago.

  • df0dx – The derivatives of the objective function, f_0(x), with respect to the variables, x_j, calculated at xval.

  • fval – The values of the constraint functions, f_i(x), calculated at xval.

  • dfdx – An (m, n) array with the derivatives of the constraint functions, f_i(x), with respect to the variables, x_j, calculated at xval.

  • low – Lower and upper asymptotes from the previous iteration.

  • upp – Lower and upper asymptotes from the previous iteration.

  • comm – MPI communicator for the problem. Keyword-only. Use the same communicator as the mesh, not a hard-coded world communicator.

  • a0 – Coefficients in the objective function. Keyword-only.

  • a – Coefficients in the objective function. Keyword-only.

  • c – Coefficients in the objective function. Keyword-only.

  • d – Coefficients in the objective function. Keyword-only.

  • move – Move limit of the variables, x_j. Keyword-only; default DEFAULT_MOVE. Passing this positionally after upp is a TypeError instead of silently binding to a0.

  • asyinit – Initial rate of the asymptotes.

  • asydecr – Decreasing rate of the asymptotes when the variables are oscillating.

  • asyincr – Increasing rate of the asymptotes when the variables are monotonically updated.

  • low_bnd – Lower and upper bounds for determining the asymptotes.

  • up_bnd – Lower and upper bounds for determining the asymptotes.

  • albefa – A parameter for determining the bounds of the variables.

  • feps – A parameter for approximating the objective function.

Returns:

Optimal values of the variables, x_j, in the current subproblem. change: Maximum change of the variables, x_j. low, upp: Lower and upper asymptotes calculated and used in the current subproblem.

Return type:

x_new

matto.mma.solve_subproblem(m, epsimin, low, upp, alpha, beta, p0, q0, P_mat, Q_mat, a0, a, b, c, d, comm)[source]#

Solve the MMA subproblem with a primal-dual interior-point approach.

Minimize:

sum[p0j/(uppj-xj) + q0j/(xj-lowj)] + a0*z + sum(ci*yi + 0.5*di*yi^2)

Subjected to:

sum[pij/(uppj-xj) + qij/(xj-lowj)] - ai*z - yi <= bi, i = 1, 2, …, m alphaj <= xj <= betaj, j = 1, 2, …, n yi >= 0, i = 1, 2, …, m z >= 0