quintel / etsource

Data source for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
12 stars 8 forks source link

Future costs of electricity query should be updated #2991

Open mabijkerk opened 5 months ago

mabijkerk commented 5 months ago

Background The costs_carriers contains the costs for electricity, which has present and future costs. The query for future costs, costs_carriers_electricity_future, has two issues. It looks like this;

    future:SUM(
      PRODUCT_CURVES(
        V(energy_interconnector_1_imported_electricity, electricity_output_curve),
        Q(interconnector_1_marginal_cost_curve)
      ),
      PRODUCT_CURVES(
        V(energy_interconnector_2_imported_electricity, electricity_output_curve),
        Q(interconnector_2_marginal_cost_curve)
      ),
      PRODUCT_CURVES(
        V(energy_interconnector_3_imported_electricity, electricity_output_curve),
        Q(interconnector_3_marginal_cost_curve)
      ),
      PRODUCT_CURVES(
        V(energy_interconnector_4_imported_electricity, electricity_output_curve),
        Q(interconnector_4_marginal_cost_curve)
      ),
      PRODUCT_CURVES(
        V(energy_interconnector_5_imported_electricity, electricity_output_curve),
        Q(interconnector_5_marginal_cost_curve)
      ),
      PRODUCT_CURVES(
        V(energy_interconnector_6_imported_electricity, electricity_output_curve),
        Q(interconnector_6_marginal_cost_curve)
      )
    )-
    PRODUCT(
      V(energy_export_electricity, weighted_carrier_cost_per_mj),
      V(energy_export_electricity, demand)
    )

Issue

  1. The query is missing imported costs for the interconnectors 7 to 12
  2. The query uses weighted_carrier_cost_per_mj and demand to calculate the exported costs, which seem to be yearly attributes. The question is why, if we use hourly values to calculate import costs, we do not seem to use hourly values to calculate export gains.

Solution

@KoenvanB I will pick up the first to do. Could you pick up the remaining to do's? We can discuss them together.

mabijkerk commented 5 months ago

The first to do is picked up on the fix-intereconnector-query branch.

KoenvanB commented 5 months ago

From what I see, the energy_export_electricity node receives the total annual output of all energy_interconnector_XX_exported_electricity nodes. That means that the export costs are now indeed calculated on an annual basis.

However, the import costs are calculated on an hourly basis. The query does so by multiplying the hourly electricity output by the marginal costs curve of the interconnector. The latter is either constant and equal to the marginal costs (default option), or (user-)defined by a marginal costs curve.

Either way, if we take a similar approach for the exports, the result should be different from using the weighed_carrier_costs_per_mj annual approach. Indeed, for the II3050 DEC 2050 scenario on branch fit, if we run the following test for interconnector 1 only:

SUM(
      PRODUCT_CURVES(
        V(energy_interconnector_1_exported_electricity, electricity_input_curve),
        Q(interconnector_1_marginal_cost_curve)
     )
  )

we get €1,346,545,600, whereas

PRODUCT(
      V(energy_interconnector_1_exported_electricity, weighted_carrier_cost_per_mj),
      V(energy_interconnector_1_exported_electricity, demand)
  )

yields €154,717,428.

Solution I propose to replace the export term by an hourly, PRODUCT_CURVES approach similar to the import costs. See the first test code example above. From what I understand, the marginal costs curves for import and export are the same for each connector. That means that we can simply reuse the interconnector_XX_marginal_cost_curve (which refers to the import interconnector nodes) for the export nodes too.

mabijkerk commented 5 months ago

I would use the domestic electricity price to determine the revenue from export. For a blank nl2019 scenario this leads to the following comparison:

EACH(
  SUM(
    PRODUCT_CURVES(
      V(energy_interconnector_1_exported_electricity, electricity_input_curve),
      V(CARRIER(electricity), cost_curve)
    )
  ),
  PRODUCT(
      V(energy_interconnector_1_exported_electricity, weighted_carrier_cost_per_mj),
      V(energy_interconnector_1_exported_electricity, demand)
  )
)

[
  969,484,492.0140538,
  284,633,046.0676482,
]
github-actions[bot] commented 3 months ago

This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.