Financial Data Classes¶
Data models for the financial elements of the tool.
NcsPathwayNpv
dataclass
¶
Mapping of the NPV parameters to the corresponding NCS pathway.
base_name
property
¶
Returns a proposed name for the NCS pathway NPV.
An empty string will be return id the pathway
attribute
is not set.
Returns:
Type | Description |
---|---|
str
|
Proposed base name for the NCS pathway NPV. |
NcsPathwayNpvCollection
dataclass
¶
NcsPathwayNpvCollection(minimum_value, maximum_value, use_computed=True, remove_existing=False, mappings=list())
Collection for all NcsPathwayNpv configurations that have been specified by the user.
normalize_npvs ¶
Normalize the NPV values of NCS pathway using the specified normalization range.
If the absolute NPV values are less than or greater than the
normalization range, then they will be truncated to 0.0 and 1.0
respectively. To avoid such a situation from occurring, it is recommended
to make sure that the ranges are synchronized using the latest absolute
NPV values by calling update_computed_normalization_range
before
normalizing the NPVs.
If there is only one NPV mapping, then assign a normalized value of 1.0.
Returns:
Type | Description |
---|---|
bool
|
True if the NPVs were successfully normalized else False due to various reasons such as if the minimum value is greater than the maximum value, if the min/max values are the same, or if there are no NPV mappings. |
Source code in src/cplus_plugin/models/financial.py
pathway_npv ¶
Gets the mapping of an NCS pathway's NPV mapping if defined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pathway_identifier |
str
|
Unique identifier of an NCS pathway whose NPV mapping is to be retrieved. |
required |
Returns:
Type | Description |
---|---|
NcsPathwayNpv
|
The NCS pathway's NPV mapping else None if not found. |
Source code in src/cplus_plugin/models/financial.py
update_computed_normalization_range ¶
Update the minimum and maximum normalization values based on the absolute values of the existing NcsPathwayNpv objects.
Values for disabled Ncs pathway NPVs will be excluded from the computation.
Returns:
Type | Description |
---|---|
bool
|
True if the min/max values were updated else False if there are no mappings or valid absolute NPV values defined. |
Source code in src/cplus_plugin/models/financial.py
NcsPathwayNpvPwl
dataclass
¶
Convenience class that contains parameters for creating a PWL raster layer.
NpvParameters
dataclass
¶
NpvParameters(years, discount, absolute_npv=0.0, normalized_npv=0.0, yearly_rates=list(), manual_npv=False)
Parameters for computing an NCS pathway's NPV.