EqualAreaPenalty

class glotaran.model.clp_penalties.EqualAreaPenalty[source]

Bases: object

An equal area constraint adds a the differenc of the sum of a compartments in the e matrix in one ore more intervals to the scaled sum of the e matrix of one or more target compartments to residual. The additional residual is scaled with the weight.

Attributes Summary

parameter

source

source_intervals

target

target_intervals

weight

Methods Summary

applies

Returns true if the index is in one of the intervals.

as_dict

fill

Returns a copy of the {cls._name} instance with all members which are Parameters are replaced by the value of the corresponding parameter in the parameter group.

from_dict

get_parameters

Returns all parameter full labels of the item.

mprint

validate

Methods Documentation

applies(index: Any) bool[source]

Returns true if the index is in one of the intervals.

Parameters

index

Returns

applies

Return type

bool

as_dict() dict
fill(model: Model, parameters: ParameterGroup) cls

Returns a copy of the {cls._name} instance with all members which are Parameters are replaced by the value of the corresponding parameter in the parameter group.

Parameters
  • model – A glotaran model.

  • parameter (ParameterGroup) – The parameter group to fill from.

classmethod from_dict(values: dict) cls
get_parameters() list[str]

Returns all parameter full labels of the item.

mprint(parameters: ParameterGroup = None, initial_parameters: ParameterGroup = None) str
property parameter: prop_type
property source: prop_type
property source_intervals: prop_type
property target: prop_type
property target_intervals: prop_type
validate(model: Model, parameters: ParameterGroup | None = None) list[str]
property weight: prop_type