engforge.solver_utils.create_constraint

create_constraint(system, comp, Xref, contype, ref, prob, con_args=None, *args, **kwargs)[source]

creates a constraint with bounded solver input from a constraint definition in dictionary with type and value. If value is a function it will be evaluated with the extra arguments provided. If var is None, then the constraint is assumed to be not in reference to the comp x vars, otherwise lookups are made to that var.

Creates F(x_solver:array) such that the current vars of comp are reverted to after the function has returned, which is used directly by SciPy’s optimize.minimize

Parameters:

contype (str)