Skip to content

Molecule graph demands are set twice based on demand and from_energy #3454

Description

@kndehaan

Context

In the direct emissions project it was found that the molecule graph demands are set twice, see full explanation in this comment.

In summary, molecule demands are first set based on demand, and are secondly set based on presence of from_energy nodes. For derived datasets, the double defining of demands raises a Refinery error when changing the demand of a molecule node that doesn't have from_energy specified, which is for example the case for molecules_other_utilisation_delayed_emitted_co2. Also see related issue #3453.

For the emissions project, a temporary solution has been implemented where sparse graph queries are used and set to zero, which overcomes this issue. See for example molecules_other_utilisation_delayed_emitted_co2.

Proposed solution

Where demand of molecule nodes is set for full datasets, it should also be possible to set demand for derived datasets. Therefore, the correct approach for setting demand in the molecule graph needs to determined that avoids double defining of demand and causing the graph to break.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PinnedWill never be marked as stale or auto-closed.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions