Optimizer.solve

Optimizer.solve(topology, algorithm='SLSQP', grad='AD', step_size=1e-06, iters=100, eps=1e-06, kappa=1e-08, tmax=100, eta=1e-06, verbose=False)[source]

Solve a constrained form-finding problem using gradient-based optimization.

Parameters:
  • topology (compas_cem.diagrams.TopologyDiagram) – A topology diagram.

  • algorithm (str, optional) – The name of the gradient-based local optimization algorithm to use. Only the following local gradient-based optimization algorithms are supported:

    • SLSQP: Sequential Least Squares Programming

    • LBFGS: Low-Storage Broyden-Fletcher-Goldfarb-Shanno

    • MMA: Method of Moving Asymptotes

    • TNEWTON: Preconditioned Truncated Newton

    • AUGLAG: Augmented Lagrangian

    • VAR: Limited-Memory Variable-Metric Algorithm

    Defaults to “SLSQP”. Refer to the NLopt documentation for more details on their theoretical underpinnings.

  • grad (str, optional) – The method to compute the gradient of the objective function. The currently available methods are:

    • AD: Automatic differentiation

    • FD: Finite differences

    Defaults to “AD”.

  • iters (int, optional) – The maximum number of iterations to run the optimization algorithm for. Defaults to 100.

  • eps (float, optional) – The convergence threshold for the output value of the objective function. Defaults to 1e-6.

  • kappa (float, optional) – The convergence threshold for the norm of the gradient of the objective function. Defaults to 1e-8.

  • step_size (float, optional) – The step size to calculate the gradient of the objective function via finite differences. It becomes active only if grad="FD". It is otherwise ignored by this function. Defaults to 1e-3.

  • tmax (int, optional) – The maximum number of iterations the CEM form-finding algorithm will run for. If eta is hit first, the form-finding algorithm will stop early. Defaults to 100.

  • eta (float, optional) – The numerical converge threshold of the CEM form-finding algorithm. If tmax is hit first, the form-finding algorithm will stop early. Defaults to 1e-6.

  • verbose (bool, optional) – A flag to prints statistics of the optimization process. Defaults to True.

Returns:

form (compas_cem.diagrams.FormDiagram) – A form diagram.