Exchange

An Exchange is an input or output of a Flow in a Process. The amount of an exchange is given in a specific unit of a quantity (FlowProperty) of the flow. The allowed units and flow properties that can be used for a flow in an exchange are defined by the flow property information in that flow (see also the FlowPropertyFactor type).

Properties

@type

Inherited from Entity.@type

amount

amountFormula

baseUncertainty

costFormula

A formula for calculating the costs of this exchange.

costValue

The costs of this exchange.

currency

The currency in which the costs of this exchange are given.

defaultProvider

A default provider is a Process that is linked as the provider of a product input or the waste treatment provider of a waste output. It is just an optional default setting which can be also ignored when building product systems in openLCA. The user is always free to link processes in product systems ignoring these defaults (but the flows and flow directions have to match of course).

description

A general comment about the input or output.

dqEntry

A data quality entry like (1;3;2;5;1). The entry is a vector of data quality values that need to match the data quality scheme for flow inputs and outputs that is assigned to the Process. In such a scheme the data quality indicators have fixed positions and the respective values in the dqEntry vector map to these positions.

flow

The reference to the flow of the exchange.

  • Type: Ref of Flow
  • Proto-Index: 11

flowProperty

The quantity in which the amount is given.

internalId

The process internal ID of the exchange. This is used to identify exchanges unambiguously within a process (e.g. when linking exchanges in a product system where multiple exchanges with the same flow are allowed). The value should be >= 1.

isAvoidedProduct

Indicates whether this exchange is an avoided product (or waste flow). Note that there is a difference in the data model and the openLCA user interface: in the user interface avoided products (waste flows) are shown as outputs (inputs) but in the data model avoided products (waste flows) have isInput set to true (false). The reason for this is, that it is (maybe) more understandable in the user interface that the production (treatment) of some other product (waste) is avoided this way. However, openLCA links product inputs and waste outputs to providers. Avoided flows are linked in the same way but with a negative sign so that the respective upstream (downstream) chain is subtracted effectively from the result. This is why in the data model we have the isInput property set according to this linking logic.

isInput

isQuantitativeReference

Indicates whether the exchange is the quantitative reference of the process.

location

uncertainty

unit

  • Type: Ref of Unit
  • Proto-Index: 19

Python class stub

The snippet below shows the names of the properties of the corresponding Python class of the olca-schema package. Note that this is not the full class definition but just shows the names of the class and its properties.


@dataclass
class Exchange:
  amount: float
  amount_formula: str
  base_uncertainty: float
  cost_formula: str
  cost_value: float
  currency: Ref
  default_provider: Ref
  description: str
  dq_entry: str
  flow: Ref
  flow_property: Ref
  internal_id: int
  is_avoided_product: bool
  is_input: bool
  is_quantitative_reference: bool
  location: Ref
  uncertainty: Uncertainty
  unit: Ref

JSON example

{
  "@type": "Exchange",
  "internalId": 1,
  "amount": 1.0,
  "isAvoidedProduct": false,
  "isInput": false,
  "isQuantitativeReference": true,
  "flow": {
    "@type": "Flow",
    "@id": "54290a29-8baa-495c-84b3-db212c75f7b7",
    "name": "Steel"
  },
  "unit": {
    "@type": "Unit",
    "@id": "20aadc24-a391-41cf-b340-3e4529f44bde",
    "name": "kg"
  },
  "flowProperty": {
    "@type": "FlowProperty",
    "@id": "93a60a56-a3c8-11da-a746-0800200b9a66",
    "name": "Mass"
  },
  "description": "This is an example output of 1 kg steel."
}