bw2io.strategies.json_ld_allocation#

Module Contents#

Functions#

allocatable_exchanges(exchanges)

allocation_needed(ds)

causal_allocation(exchanges, ad)

get_allocation_dict(factors)

get_production_exchange(exchanges, flow_id)

get_production_exchanges(exchanges)

json_ld_allocate_datasets(db[, preferred_allocation])

Perform allocation on multifunctional datasets.

Attributes#

VALID_METHODS

bw2io.strategies.json_ld_allocation.allocatable_exchanges(exchanges)[source]#
bw2io.strategies.json_ld_allocation.allocation_needed(ds)[source]#
bw2io.strategies.json_ld_allocation.causal_allocation(exchanges, ad)[source]#
bw2io.strategies.json_ld_allocation.get_allocation_dict(factors)[source]#
bw2io.strategies.json_ld_allocation.get_production_exchange(exchanges, flow_id)[source]#
bw2io.strategies.json_ld_allocation.get_production_exchanges(exchanges)[source]#
bw2io.strategies.json_ld_allocation.json_ld_allocate_datasets(db, preferred_allocation=None)[source]#

Perform allocation on multifunctional datasets.

Uses the preferred_allocation method if available; otherwise, the default method.

Here are the allocation methods listed in the JSON-LD spec:

  • PHYSICAL_ALLOCATION

  • ECONOMIC_ALLOCATION

  • CAUSAL_ALLOCATION (Can be exchange-specific)

  • USE_DEFAULT_ALLOCATION

  • NO_ALLOCATION

We can’t use @id values as codes after allocation, so we combine the process id and the flow id for the allocated dataset.

bw2io.strategies.json_ld_allocation.VALID_METHODS[source]#