bw_graph_tools.graph_traversal.settings

Classes

GraphTraversalSettings

Graph traversal settings object with reasonable defaults.

TaggedGraphTraversalSettings

Supply Chain Traversal Settings with a functional unit tag

Module Contents

class bw_graph_tools.graph_traversal.settings.GraphTraversalSettings[source]

Bases: pydantic.BaseModel

Graph traversal settings object with reasonable defaults.

Parameters:
  • cutoff (float) – Cutoff value used to stop graph traversal. Fraction of total score, should be in (0, 1)

  • biosphere_cutoff (float) – Cutoff value used to determine if a separate biosphere node is added. Fraction of total score.

  • max_calc (int | None) – Maximum number of inventory calculations to perform

  • max_depth (int) – Maximum depth in the supply chain traversal. Default is no maximum.

  • skip_coproducts (bool) – Don’t traverse co-production edges, i.e. production edges other than the reference product

  • separate_biosphere_flows (bool) – Add separate Flow nodes for important individual biosphere emissions

  • min_coverage_fraction (float) – Minimum fraction of the total LCA score that must be covered by the traversed nodes. A warning is raised if coverage falls below this value. Should be in (0, 1]. Default is 0.9.

max_depth_positive()[source]
biosphere_cutoff: Annotated[float, Field(strict=True, gt=0, lt=1)] = 0.0001[source]
caching_solver: Any | None = None[source]
cutoff: Annotated[float, Field(strict=True, gt=0, lt=1)] = 0.005[source]
max_calc: Annotated[int, Field(strict=True, gt=0)] = 1000[source]
max_depth: int | None = None[source]
min_coverage_fraction: Annotated[float, Field(strict=True, gt=0, le=1)] = 0.9[source]
separate_biosphere_flows: bool = True[source]
skip_coproducts: bool = False[source]
class bw_graph_tools.graph_traversal.settings.TaggedGraphTraversalSettings[source]

Bases: GraphTraversalSettings

Supply Chain Traversal Settings with a functional unit tag

Parameters:

tags (List[str]) – A list of tags to group nodes by

tags: List[str][source]