OnlyConstraint

class glotaran.model.constraint.OnlyConstraint[source]

Bases: glotaran.model.interval_property.IntervalProperty

A only constraint sets the calculated matrix row of a compartment to 0 outside the given intervals.

Attributes Summary

interval

ModelProperty is an extension of the property decorator.

target

ModelProperty is an extension of the property decorator.

Methods Summary

applies

Returns true if value is in one of the intervals.

as_dict

fill

from_dict

get_parameter_labels

markdown

validate

Methods Documentation

applies(value: float) bool[source]

Returns true if value is in one of the intervals.

Parameters

index (float) –

Returns

applies

Return type

bool

as_dict() dict
fill(model: Model, parameters: ParameterGroup) cls
classmethod from_dict(values: dict) cls
get_parameter_labels() list[str]
property interval: model_property.glotaran_property_type

ModelProperty is an extension of the property decorator.

It adds convenience functions for meta programming model items.

markdown(all_parameters: ParameterGroup = None, initial_parameters: ParameterGroup = None) MarkdownStr
property target: model_property.glotaran_property_type

ModelProperty is an extension of the property decorator.

It adds convenience functions for meta programming model items.

validate(model: Model, parameters: ParameterGroup | None = None) list[str]