quintel / etmoses

Online decision support tool to create local energy situations for neighbourhoods, cities and regions with a time resolution of 15 minutes created and maintained by Quintel – Not maintained
https://moses.energytransitionmodel.com
MIT License
11 stars 3 forks source link

Select topology templates based on the scaling attribute of the scenario #1531

Open grdw opened 7 years ago

grdw commented 7 years ago

Topology templates should be in the list on the import screen depending on the scaling factor of a certain LES. A topology usually represents a certain amount of households, a scenario usually is scaled to a certain amount of households. Now these two are not connected.

The way I see this technically is that we sum up all the units attributes from a topology_template. This will give us a maximum (? @ChaelKruip) amount of households a certain topology represents. So:

{
  "name": "HV Network",
  "stakeholder": "producer",
  "children": [
    {
      "name": "HV-MV Trafo",
      "capacity": 16000,
      "technical_lifetime": 30,
      "investment_cost": 150003,
      "stakeholder": "system operator",
      "children": [
        {
          "name": "MV-LV Trafo #1",
          "capacity": 2000,
          "technical_lifetime": 30,
          "investment_cost": 50000,
          "stakeholder": "system operator",
          "children": [
            {
              "name": "Households 1",
              "capacity": 17.25,
              "units": 33, //<---
              "stakeholder": "customer"
            }
          ]
        },
        {
          "name": "MV-LV Trafo #2",
          "capacity": 2000,
          "technical_lifetime": 30,
          "investment_cost": 50000,
          "stakeholder": "system operator",
          "children": [
            {
              "name": "Households 2",
              "capacity": 17.25,
              "units": 33, //<---
              "stakeholder": "customer"
            }
          ]
        },
        {
          "name": "MV-LV Trafo #3",
          "capacity": 2000,
          "technical_lifetime": 30,
          "investment_cost": 50000,
          "stakeholder": "system operator",
          "children": [
            {
              "name": "Households 3",
              "capacity": 17.25,
              "units": 33, //<---
              "stakeholder": "cooperation"
            }
          ]
        }
      ]
    }
  ]
}

This amounts to 99 households and a minimum ofcourse of 3 households. So if you scaled your households somewhere in between 3..99 households, this topology could be suited for your LES.


Scribbles of code:

class Topology < ActiveRecord::Base
  def self.for_scaling(scaling_amount)
    all.select do |topology|
      topology.units_range.include?(scaling_amount)
    end
  end

  private

  def units_range
    # (amount_of_endpoints..max units)
  end
end
ChaelKruip commented 7 years ago

This requires us to ensure that the units are given for the end-points of featured topologies.

I'm not sure if we should show all topologies with households > households_in_LES or also limit the size of the topology at some point. For example we could show topologies in the range 0.8 * households < connections in topology < 1.2 * households, or something similar.