ExchangeRefs

exception antelope.refs.exchange_ref.UnallocatedExchangeError

Bases: Exception

exception antelope.refs.exchange_ref.InaccessibleExchangeValue

Bases: Exception

The exchange ref is somehow unable to lookup the exchange value

class antelope.refs.exchange_ref.ExchangeRef(process, flow, direction, value=None, unit=None, termination=None, is_reference=False, **kwargs)

Bases: object

Codifies the information required to define an exchange. The supplied information could be either object or reference/link; it isn’t specified.

entity_type = 'exchange'
is_entity = False
is_reference = None
property origin
property process
property flow
property direction
property value
property values
property termination

This can be an entity, str, or None. Note that term_ref replicates the characteristics of Exchange.termination (either None, context, or str).

Returns:

property is_elementary
property term_ref

returns either None, a str external_ref, or a tuple. Equivalent to native Exchange.lkey for hashing purposes :return:

property unit
property type
property key
property lkey

Used for local comparisons :return:

property comment
property locale
class antelope.refs.exchange_ref.RxRef(process, flow, direction, comment=None, value=0.0, **kwargs)

Bases: ExchangeRef

Class for process reference exchanges

property external_ref

Reference exchanges can be used as flows w/l/o/g :return: