Skip to content

QuadraticPenaltyParams

Bases: BaseModel

Implements all constraints through quadratic penalties.

Adds penalty terms to the objective. Adds slack variables for inequality constraints if neccessaray.

Attributes:

Name Type Description
penalty float | None

Custom penalty factor for quadratic penalty terms. If none is set, it is automatically determined by taking 10 times the maximum absolute initial bias.

penalty class-attribute instance-attribute

penalty: float | None = Field(
    default=None,
    ge=0,
    description="Custom penalty factor for quadratic penalty terms. If none set, automatically determined by taking 10 times the maximum absolute initial bias.",
)