Optimizer

class compas_cem.optimization.Optimizer[source]

Bases: object

An object that modifies a form diagram to meet multiple constraints.

Methods

add_constraint(constraint)

Adds a goal constraint.

add_parameter(parameter)

Adds a parameter to the optimization problem.

check_optimization_sanity()

Verify the optimization problem is in its sane mind.

gradient_func(topology)

index_parameter()

A dictionary that maps indices to parameter keys.

number_of_constraints()

The number of constraints added to the optimizer.

number_of_parameters()

The number of optimization parameters.

objective_func(topology, grad_func)

Test with autodiff.

optimization_bounds(form)

Creates optimization bounds array.

optimization_parameters(form)

Creates optimization paremeters array.

parameter_index()

A dictionary that maps parameter keys to indices.

remove_constraint(key)

Removes a goal constraint from the optimizer.

remove_parameter(key)

Removes an optimization parameter.

solve_nlopt(topology, algorithm, iters[, eps])

Solve an optimization problem with NLOpt.