e4st-dev / E4ST.jl

Engineering, Economic, and Environmental Electricity Simulation Tool (E4ST)
GNU General Public License v3.0
7 stars 1 forks source link

Add net revenue welfare check #256

Open sallyrobson opened 10 months ago

sallyrobson commented 10 months ago

We came up with another welfare check to make sure the net_revenue_total_prelim is getting calculated correctly for generators and storage. This is primarily important with reserve requirements because otherwise it is mostly things that inherently cancel out. The following formula should be true:

electricity_revenue (gen + storage) + reserve requirement cost (bus) - reserve requirement merchandising surplus (bus) + net government revenue (gen + storage) - production cost (gen + storage) - past invest cost (gen + storage) + gs_rebate (gen) = net_revenue_total_prelim (gen + storage)

There is a smaller version of this check which is just:

reserve requirement cost (bus) - reserve requirement merch surplus (bus) = reserve requirement rebate (gen + storage)

but it doesn't hurt to have the whole thing.