constraint.py

ConstraintComp is now deprecated.

class openmdao.components.constraint.ConstraintComp(expr, out='out')[source]

Bases: openmdao.components.exec_comp.ExecComp

ConstraintComp is deprecated. Please see the basic tutorial for more information.

A Component that represents an equality or inequality constraint.

Args:

expr : str

Constraint expression containing an operator that is one of [‘<’, ‘>’, ‘<=’, ‘>=’, ‘=’].

out : str, optional

Name of the output variable containing the result of the constraint equation. Default is ‘out’.

Options:

force_fd : bool(False)

Set to True to finite difference this system.

form : str(‘forward’)

Finite difference mode. (forward, backward, central) You can also set to ‘complex_step’ to peform the complex step method if your components support it.

step_size : float(1e-06)

Default finite difference stepsize

step_type : str(‘absolute’)

Set to absolute, relative