AttachedIndicatorConstraint

AttachedIndicatorConstraint#

class AttachedIndicatorConstraint#

Attached indicator constraint — a write-through handle bound to a host (Instance or ParametricInstance).

AttachedIndicatorConstraint is returned by Instance.add_indicator_constraint / ParametricInstance.add_indicator_constraint and by their indicator_constraints[id] getters. Reads pull live data from the parent host and metadata setters write through to its SoA metadata store.

__copy__() AttachedIndicatorConstraint#
__deepcopy__(_memo: Any) AttachedIndicatorConstraint#
__repr__() str#
add_description(description: str) None#

Alias for set_description() (backward compatibility).

add_name(name: str) None#

Alias for set_name() (backward compatibility).

add_parameter(key: str, value: str) None#

Add a single parameter entry. Writes through to the parent host's SoA metadata store.

add_parameters(parameters: Mapping[str, str]) None#

Alias for set_parameters() (backward compatibility).

add_subscripts(subscripts: Sequence[int]) None#

Append subscripts. Writes through to the parent host's SoA metadata store.

detach() IndicatorConstraint#

Return an IndicatorConstraint snapshot of the current state. Mutations on the returned object do not propagate back.

set_description(description: str) None#

Set the description. Writes through to the parent host's SoA metadata store.

set_name(name: str) None#

Set the name. Writes through to the parent host's SoA metadata store.

set_parameters(parameters: Mapping[str, str]) None#

Replace all parameters. Writes through to the parent host's SoA metadata store.

set_subscripts(subscripts: Sequence[int]) None#

Set the subscripts. Writes through to the parent host's SoA metadata store.

property constraint_id: int#

Read-only property.

The id this handle points at.

property description: Optional[str]#

Read-only property.

property equality: Equality#

Read-only property.

property function: Function#

Read-only property.

property indicator_variable_id: int#

Read-only property.

property instance: Any#

Read-only property.

The parent host this constraint lives in.

property name: Optional[str]#

Read-only property.

property parameters: dict[str, str]#

Read-only property.

property provenance: list[Provenance]#

Read-only property.

property subscripts: list[int]#

Read-only property.