Skip to content

ConstraintHandler

ConstraintHandler

ConstraintHandler(handler_type: str)

Bases: AnalysisComponent

Extension base for solver constraint-enforcement definitions.

This is not a domain SP/MP constraint. Subclasses implement the Tcl command contract; ordinary scripts use model.analysis.constraint factories.

Methods:

Name Description
register_handler

Install a class-wide handler factory key, replacing an existing key.

Methods:

register_handler staticmethod

register_handler(name: str, handler_class: Type['ConstraintHandler']) -> None

Install a class-wide handler factory key, replacing an existing key.

Parameters:

Name Type Description Default
name str

Case-insensitive registry key.

required
handler_class type[ConstraintHandler]

Concrete constructor.

required

Registration does not validate subclass compatibility or modify instances.