quintel / mechanical_turk

Automatic tester for etengine
1 stars 0 forks source link

Add spec to test whether hourly loads and annual volumes add up #149

Open michieldenhaan opened 3 years ago

michieldenhaan commented 3 years ago

We should add a spec for each of the time-resolved carriers to check whether the annual volume in the graph and the sum of the hourly curves match.

E.g.

SUM(
    V(
      FILTER(
             ALL(),
             "merit_order && (merit_order.type == :consumer)"),
      electricity_input_curve)
    ) * 3600 
- 
SUM(
    V(
      FILTER(
            ALL(),
            "merit_order && (merit_order.type == :consumer)"), 
      "input_of_electricity + input_of_loss")
    )

(the input of loss is included because energy_power_hv_network_loss has a loss input, not an electricity input)

This can help to catch issues like this one: https://github.com/quintel/etmodel/issues/3649