Constraint

class pyoptsparse.pyOpt_constraint.Constraint(name, nCon, linear, wrt, jac, lower, upper, scale)[source]

This class holds the representation of a pyOptSparse constraint group

See also

pyoptsparse.pyOpt_optimization.Optimization.addConGroup

for the full documentation

finalize(variables, dvOffset, index)[source]

After the design variables have been finalized and the order is known we can check the constraint for consistency.

Parameters:
variablesOrderedDict

The pyOpt variable list after they have been finalized.

dvOffsetdict

Design variable offsets from pyOpt_optimization

indexint

The starting index of this constraint in natural order

Warning

This function should not need to be called by the user