Skip to content

cvxpy_constraints

CVXPy-lowered constraint dataclass.

LoweredCvxpyConstraints dataclass

CVXPy-lowered convex constraints.

Contains constraints that have been lowered to CVXPy constraint objects. These are added directly to the optimal control problem without linearization.

Attributes:

Name Type Description
constraints list[Constraint]

List of CVXPy constraint objects (cp.Constraint). Includes both nodal and cross-node convex constraints.

Source code in openscvx/lowered/cvxpy_constraints.py
@dataclass
class LoweredCvxpyConstraints:
    """CVXPy-lowered convex constraints.

    Contains constraints that have been lowered to CVXPy constraint objects.
    These are added directly to the optimal control problem without
    linearization.

    Attributes:
        constraints: List of CVXPy constraint objects (cp.Constraint).
            Includes both nodal and cross-node convex constraints.
    """

    constraints: list["cp.Constraint"] = field(default_factory=list)