Skip to content

constraint

Classes:

ConstraintSign

Constraint available signs.

Attributes:

  • LESS_OR_EQUAL

    "<="

  • GREATER_OR_EQUAL

    ">="

  • EQUAL

    "=="

XpansionConstraint dataclass

XpansionConstraint(
    name: str,
    sign: ConstraintSign,
    right_hand_side: float,
    candidates_coefficients: dict[str, float] = dict(),
)

Represents a linear constraint between invested capacities of Xpansion candidates.

Attributes:

  • name (str) –

    Name of the constraint.

  • sign (ConstraintSign) –

    Sign of the constraint (LESS_OR_EQUAL, GREATER_OR_EQUAL or EQUAL).

  • right_hand_side (float) –

    Right-hand side of the constraint.

  • candidates_coefficients (dict[str, float]) –

    Coefficients of candidate investments in the constraint.

XpansionConstraintUpdate dataclass

XpansionConstraintUpdate(
    name: Optional[str] = None,
    sign: Optional[ConstraintSign] = None,
    right_hand_side: Optional[float] = None,
    candidates_coefficients: Optional[dict[str, float]] = None,
)

Update of a linear constraint between invested capacities of Xpansion candidates.

Attributes:

  • name (Optional[str]) –

    Name of the constraint.

  • sign (Optional[ConstraintSign]) –

    Sign of the constraint (LESS_OR_EQUAL, GREATER_OR_EQUAL or EQUAL).

  • right_hand_side (Optional[float]) –

    Right-hand side of the constraint.

  • candidates_coefficients (Optional[dict[str, float]]) –

    Coefficients of candidate investments in the constraint.