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
- Type:
string
(external doc) - Proto-Index: 1
amount
- Type:
double
(external doc) - Proto-Index: 2
amountFormula
- Type:
string
(external doc) - Proto-Index: 3
baseUncertainty
- Type:
optional
double
(external doc) - Proto-Index: 4
costFormula
A formula for calculating the costs of this exchange.
- Type:
string
(external doc) - Proto-Index: 5
costValue
The costs of this exchange.
- Type:
optional
double
(external doc) - Proto-Index: 6
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.
- Type:
string
(external doc) - Proto-Index: 9
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.
- Type:
string
(external doc) - Proto-Index: 10
flow
The reference to the flow of the exchange.
flowProperty
The quantity in which the amount is given.
- Type: Ref of FlowProperty
- Proto-Index: 12
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.
- Type:
int
(external doc) - Proto-Index: 13
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.
- Type:
boolean
(external doc) - Proto-Index: 14
isInput
- Type:
boolean
(external doc) - Proto-Index: 15
isQuantitativeReference
Indicates whether the exchange is the quantitative reference of the process.
- Type:
boolean
(external doc) - Proto-Index: 16
location
uncertainty
- Type: Uncertainty
- Proto-Index: 18
unit
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."
}