Esempio n. 1
0
def get_setup(config):
    DeviceRegistry.REGISTRY = device_registry_dict
    ConstSettings.BalancingSettings.FLEXIBLE_LOADS_SUPPORT = False
    ConstSettings.BalancingSettings.ENABLE_BALANCING_MARKET = True
    # Two sided market
    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.LoadSettings.MIN_ENERGY_RATE = 0
    ConstSettings.LoadSettings.MAX_ENERGY_RATE = 35

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 Storage',
                 strategy=StorageStrategy(
                     initial_capacity_kWh=10, battery_capacity_kWh=12, risk=0),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area(
                'H2 General Load',
                strategy=LoadHoursStrategy(
                    avg_power_W=100,
                    hrs_per_day=24,
                    hrs_of_day=list(range(0, 24)),
                    min_energy_rate=ConstSettings.LoadSettings.MIN_ENERGY_RATE,
                    max_energy_rate=ConstSettings.LoadSettings.MAX_ENERGY_RATE
                ),
                appliance=SwitchableAppliance()),
        ]),
    ],
                config=config)
    return area
def get_setup(config):
    ConstSettings.IAASettings.MARKET_TYPE = 2
    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load 1',
                 strategy=LoadHoursStrategy(
                     avg_power_W=200,
                     hrs_of_day=list(range(0, 24)),
                     update_interval=duration(minutes=30),
                     initial_buying_rate=user_profile_int,
                     final_buying_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H1 General Load 2',
                 strategy=LoadHoursStrategy(
                     avg_power_W=200,
                     hrs_of_day=list(range(0, 24)),
                     initial_buying_rate=user_profile_str,
                     final_buying_rate=35),
                 appliance=SwitchableAppliance()),
        ]),
        Area('Commercial Energy Producer',
             strategy=CommercialStrategy(energy_rate=9),
             appliance=SimpleAppliance()),
    ],
                config=config)
    return area
def get_setup(config):
    area = Area(
        'Grid',
        children=[
            Area('House 1',
                 event_list=[DisconnectAreaEvent(6),
                             ConnectAreaEvent(16)],
                 children=[
                     Area('H1 General Load',
                          strategy=LoadHoursStrategy(avg_power_W=200,
                                                     hrs_per_day=24,
                                                     hrs_of_day=list(
                                                         range(0, 24)),
                                                     final_buying_rate=27),
                          appliance=SwitchableAppliance()),
                     Area('H1 Storage1',
                          strategy=StorageStrategy(initial_soc=50,
                                                   battery_capacity_kWh=30,
                                                   max_abs_battery_power_kW=1),
                          appliance=SwitchableAppliance()),
                 ]),
            Area('Commercial Energy Producer',
                 strategy=CommercialStrategy(energy_rate=20),
                 appliance=SimpleAppliance()),
        ],
        config=config)
    return area
Esempio n. 4
0
def get_setup(config):
    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.GeneralSettings.EXPORT_OFFER_BID_TRADE_HR = True

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 Storage1',
                 strategy=StorageStrategy(initial_soc=100,
                                          min_allowed_soc=10,
                                          battery_capacity_kWh=1.2,
                                          max_abs_battery_power_kW=5,
                                          initial_selling_rate=30,
                                          final_buying_rate=25,
                                          final_selling_rate=25.1,
                                          initial_buying_rate=0,
                                          fit_to_limit=True,
                                          update_interval=1),
                 appliance=SwitchableAppliance()),
        ]),
        Area('Cell Tower',
             strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                 hrs_per_day=24,
                                                 hrs_of_day=list(range(0, 24)),
                                                 final_buying_rate=30,
                                                 fit_to_limit=True,
                                                 update_interval=3),
             appliance=SwitchableAppliance()),
    ],
                config=config)
    return area
Esempio n. 5
0
def get_setup(config):
    config.read_market_maker_rate(30)
    area = Area(
        'Grid',
        [
            Area(
                'House 1',
                [
                    Area('H1 General Load', strategy=LoadHoursStrategy(avg_power_W=100,
                                                                       hrs_per_day=24,
                                                                       hrs_of_day=list(
                                                                           range(0, 24)),
                                                                       final_buying_rate=25),
                         appliance=SwitchableAppliance()),
                    Area('H1 Storage1', strategy=StorageStrategy(initial_soc=50,
                                                                 fit_to_limit=False,
                                                                 energy_rate_increase_per_update=7,
                                                                 energy_rate_decrease_per_update=7,
                                                                 battery_capacity_kWh=1.2,
                                                                 max_abs_battery_power_kW=0.05,
                                                                 initial_buying_rate=0,
                                                                 final_buying_rate=16,
                                                                 final_selling_rate=17.01),
                         appliance=SwitchableAppliance()),

                ]
            ),
            Area('Commercial Energy Producer',
                 strategy=CommercialStrategy(energy_rate=15),
                 appliance=SimpleAppliance()),
        ],
        config=config
    )
    return area
Esempio n. 6
0
def get_setup(config):
    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=4,
                                            hrs_of_day=list(range(12, 16))),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage1',
                 strategy=StorageStrategy(initial_capacity_kWh=0.6),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=4,
                                            hrs_of_day=list(range(12, 16))),
                 appliance=SwitchableAppliance()),
            Area('H2 PV', strategy=PVStrategy(6, 80), appliance=PVAppliance()),
        ]),
        Area('Commercial Energy Producer',
             strategy=CommercialStrategy(energy_rate=30),
             appliance=SimpleAppliance()),
    ],
                config=config)
    return area
def get_setup(config):
    area = Area(
        'Grid',
        [
            Area(
                'House 1',
                [
                    Area('H1 General Load', strategy=LoadHoursStrategy(avg_power_W=200,
                                                                       hrs_per_day=4,
                                                                       hrs_of_day=list(
                                                                           range(19, 24)),
                                                                       final_buying_rate=30),
                         appliance=SwitchableAppliance()),
                    Area('H1 ESS', strategy=StorageStrategy(),
                         appliance=SwitchableAppliance()),
                    Area('H1 PV', strategy=PVStrategy(panel_count=2, initial_selling_rate=30,
                                                      final_selling_rate=5),
                         appliance=PVAppliance()),
                ],
                grid_fee_percentage=0, grid_fee_constant=0,

            ),
            Area('Commercial Energy Producer',
                 strategy=CommercialStrategy(energy_rate=31),
                 appliance=SimpleAppliance()
                 ),

        ],
        config=config
    )
    return area
Esempio n. 8
0
def get_setup(config):

    ConstSettings.IAASettings.MARKET_TYPE = 3
    ConstSettings.GeneralSettings.MARKET_CLEARING_FREQUENCY_PER_SLOT = 3
    ConstSettings.LoadSettings.INITIAL_BUYING_RATE = 35
    ConstSettings.LoadSettings.FINAL_BUYING_RATE = 35
    ConstSettings.StorageSettings.BUYING_RANGE = RangeLimit(24.99, 25)
    ConstSettings.StorageSettings.SELLING_RANGE = RangeLimit(30, 25.01)

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=24,
                                            hrs_of_day=list(range(24)),
                                            final_buying_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage1',
                 strategy=StorageStrategy(initial_soc=50),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage2',
                 strategy=StorageStrategy(initial_soc=50),
                 appliance=SwitchableAppliance()),
            Area('H1 PV', strategy=PVStrategy(4), appliance=PVAppliance()),
            Area('H1 CEP',
                 strategy=CommercialStrategy(energy_rate=30),
                 appliance=SimpleAppliance()),
        ]),
    ],
                config=config)
    return area
Esempio n. 9
0
def get_setup(config):
    from d3a.models.const import ConstSettings
    ConstSettings.GeneralSettings.MAX_OFFER_TRAVERSAL_LENGTH = 1
    area = Area('Grid', [
        Area('House 1', [
            Area('H1 Storage1',
                 strategy=StorageStrategy(risk=0,
                                          initial_capacity_kWh=1.5,
                                          battery_capacity_kWh=15.0,
                                          break_even=(23.99, 28.01)),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage2',
                 strategy=StorageStrategy(risk=0,
                                          initial_capacity_kWh=1.5,
                                          battery_capacity_kWh=15.0,
                                          break_even=(22.99, 28.01)),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 PV',
                 strategy=PVStrategy(
                     1, 0, min_selling_rate=23.0, initial_rate_option=2),
                 appliance=PVAppliance()),
        ]),
    ],
                config=config)
    return area
Esempio n. 10
0
def get_setup(config):
    # Two sided market
    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.LoadSettings.MIN_ENERGY_RATE = 15
    ConstSettings.LoadSettings.MAX_ENERGY_RATE = 35

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 Storage',
                 strategy=StorageStrategy(initial_capacity_kWh=0.6, risk=0),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area(
                'H2 General Load',
                strategy=LoadHoursStrategy(
                    avg_power_W=100,
                    hrs_per_day=10,
                    hrs_of_day=list(range(8, 18)),
                    min_energy_rate=ConstSettings.LoadSettings.MIN_ENERGY_RATE,
                    max_energy_rate=ConstSettings.LoadSettings.MAX_ENERGY_RATE
                ),
                appliance=SwitchableAppliance()),
        ]),
    ],
                config=config)
    return area
def get_setup(config):
    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=200,
                                            hrs_per_day=6,
                                            hrs_of_day=list(range(12, 18)),
                                            max_energy_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage1',
                 strategy=CustomStorageStrategy(initial_capacity_kWh=0.6),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=200,
                                            hrs_per_day=4,
                                            hrs_of_day=list(range(12, 16)),
                                            max_energy_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H2 PV', strategy=PVStrategy(4, 80), appliance=PVAppliance()),
        ]),
        Area('Cell Tower',
             strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                 hrs_per_day=24,
                                                 hrs_of_day=list(range(0, 24)),
                                                 max_energy_rate=35),
             appliance=SwitchableAppliance())
    ],
                config=config)
    return area
Esempio n. 12
0
def get_setup(config):
    # Two sided market
    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.LoadSettings.INITIAL_BUYING_RATE = 15
    ConstSettings.LoadSettings.FINAL_BUYING_RATE = 35

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 Storage',
                 strategy=StorageStrategy(initial_soc=50),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=10,
                                            hrs_of_day=list(range(8, 18)),
                                            initial_buying_rate=ConstSettings.
                                            LoadSettings.INITIAL_BUYING_RATE,
                                            final_buying_rate=ConstSettings.
                                            LoadSettings.FINAL_BUYING_RATE),
                 appliance=SwitchableAppliance()),
        ]),
    ],
                config=config)
    return area
Esempio n. 13
0
def get_setup(config):

    ConstSettings.IAASettings.MARKET_TYPE = 3
    ConstSettings.IAASettings.PAY_AS_CLEAR_AGGREGATION_ALGORITHM = 1
    ConstSettings.GeneralSettings.MARKET_CLEARING_FREQUENCY_PER_SLOT = 1
    ConstSettings.LoadSettings.INITIAL_BUYING_RATE = 35
    ConstSettings.LoadSettings.FINAL_BUYING_RATE = 35
    ConstSettings.StorageSettings.INITIAL_BUYING_RATE = 24.99
    ConstSettings.StorageSettings.FINAL_BUYING_RATE = 25
    ConstSettings.StorageSettings.INITIAL_SELLING_RATE = 30
    ConstSettings.StorageSettings.FINAL_SELLING_RATE = 25.01

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load1',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=24,
                                            hrs_of_day=list(range(24)),
                                            initial_buying_rate=28.8,
                                            fit_to_limit=False,
                                            energy_rate_increase_per_update=0),
                 appliance=SwitchableAppliance()),
            Area('H1 General Load2',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=24,
                                            hrs_of_day=list(range(24)),
                                            initial_buying_rate=18.8,
                                            fit_to_limit=False,
                                            energy_rate_increase_per_update=0),
                 appliance=SwitchableAppliance()),
            Area('H1 General Load3',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=24,
                                            hrs_of_day=list(range(24)),
                                            initial_buying_rate=8.8,
                                            fit_to_limit=False,
                                            energy_rate_increase_per_update=0),
                 appliance=SwitchableAppliance()),
            Area('H1 CEP1',
                 strategy=FinitePowerPlant(energy_rate=5.1,
                                           max_available_power_kW=0.1),
                 appliance=SimpleAppliance()),
            Area('H1 CEP2',
                 strategy=FinitePowerPlant(energy_rate=15.5,
                                           max_available_power_kW=0.1),
                 appliance=SimpleAppliance()),
            Area('H1 CEP3',
                 strategy=FinitePowerPlant(energy_rate=25.001,
                                           max_available_power_kW=0.1),
                 appliance=SimpleAppliance()),
            Area('H1 CEP4',
                 strategy=FinitePowerPlant(energy_rate=28.001,
                                           max_available_power_kW=0.1),
                 appliance=SimpleAppliance()),
        ]),
    ],
                config=config)
    return area
Esempio n. 14
0
def get_setup(config):
    area = Area(
        'Grid',
        [
            Area(
                'House 1',
                [
                    Area('H1 General Load',
                         strategy=LoadHoursStrategy(avg_power_W=200,
                                                    hrs_per_day=6,
                                                    hrs_of_day=list(
                                                        range(12, 18)),
                                                    final_buying_rate=35),
                         appliance=SwitchableAppliance()),
                    Area('H1 Storage1',
                         strategy=StorageStrategy(initial_soc=50),
                         appliance=SwitchableAppliance()),
                    Area('H1 Storage2',
                         strategy=StorageStrategy(initial_soc=50),
                         appliance=SwitchableAppliance()),
                ],
                transfer_fee_pct=0,
                transfer_fee_const=0,
            ),
            Area(
                'House 2',
                [
                    Area('H2 General Load',
                         strategy=LoadHoursStrategy(avg_power_W=200,
                                                    hrs_per_day=4,
                                                    hrs_of_day=list(
                                                        range(12, 16)),
                                                    final_buying_rate=35),
                         appliance=SwitchableAppliance()),
                    Area('H2 PV',
                         strategy=PVStrategy(panel_count=4,
                                             initial_selling_rate=30,
                                             final_selling_rate=5),
                         appliance=PVAppliance()),
                ],
                transfer_fee_pct=0,
                transfer_fee_const=0,
            ),
            Area('Cell Tower',
                 strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                     hrs_per_day=24,
                                                     hrs_of_day=list(
                                                         range(0, 24)),
                                                     final_buying_rate=35),
                 appliance=SwitchableAppliance()),
            # Area('Commercial Energy Producer',
            #      strategy=CommercialStrategy(energy_rate=30),
            #      appliance=SimpleAppliance()
            #      ),
        ],
        config=config)
    return area
Esempio n. 15
0
def get_setup(config):
    ConstSettings.GeneralSettings.DEFAULT_UPDATE_INTERVAL = 5
    area = Area(
        'Grid',
        [
            Area(
                'House 1',
                [
                    Area('H1 General Load', strategy=LoadHoursStrategy(avg_power_W=200,
                                                                       hrs_per_day=6,
                                                                       hrs_of_day=list(
                                                                           range(12, 18)),
                                                                       final_buying_rate=25),
                         appliance=SwitchableAppliance(), grid_fee_percentage=0),
                    Area('H1 Storage1', strategy=StorageStrategy(initial_soc=50),
                         appliance=SwitchableAppliance(), grid_fee_percentage=0),
                    Area('H1 Storage2', strategy=StorageStrategy(initial_soc=50),
                         appliance=SwitchableAppliance(), grid_fee_percentage=0),
                ],
                grid_fee_percentage=0, transfer_fee_const=0,

            ),
            Area(
                'House 2',
                [
                    Area('H2 General Load', strategy=LoadHoursStrategy(avg_power_W=200,
                                                                       hrs_per_day=4,
                                                                       hrs_of_day=list(
                                                                           range(12, 16)),
                                                                       final_buying_rate=35),
                         appliance=SwitchableAppliance(), grid_fee_percentage=0),
                    Area('H2 PV', strategy=PVStrategy(10),
                         appliance=PVAppliance(), grid_fee_percentage=0),

                ],
                grid_fee_percentage=0, transfer_fee_const=0,

            ),
            Area('Cell Tower', strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                                   hrs_per_day=24,
                                                                   hrs_of_day=list(range(0, 24)),
                                                                   final_buying_rate=35),
                 appliance=SwitchableAppliance(), grid_fee_percentage=0)
            # Area('Commercial Energy Producer',
            #      strategy=CommercialStrategy(energy_range_wh=(40, 120), energy_price=30),
            #      appliance=SimpleAppliance()
            #      ),

        ],
        config=config
    )
    return area
Esempio n. 16
0
def get_setup(config):
    GlobalConfig.POWER_FLOW = True
    area = Area(
        'Grid',
        [
            Area(
                'House 1',
                [
                    Area('H1 General Load', strategy=LoadHoursStrategy(avg_power_W=200,
                                                                       hrs_per_day=6,
                                                                       hrs_of_day=list(
                                                                           range(12, 18)),
                                                                       final_buying_rate=35),
                         appliance=SwitchableAppliance()),
                    Area('H1 Storage1', strategy=StorageStrategy(initial_soc=50),
                         appliance=SwitchableAppliance()),
                    Area('H1 Storage2', strategy=StorageStrategy(initial_soc=50),
                         appliance=SwitchableAppliance()),
                ],
                grid_fee_percentage=0, transfer_fee_const=0,
            ),
            Area(
                'House 2',
                [
                    Area('H2 General Load', strategy=LoadHoursStrategy(avg_power_W=200,
                                                                       hrs_per_day=4,
                                                                       hrs_of_day=list(
                                                                           range(12, 16)),
                                                                       final_buying_rate=35),
                         appliance=SwitchableAppliance()),
                    Area('H2 PV', strategy=PVStrategy(panel_count=4, initial_selling_rate=30,
                                                      final_selling_rate=5, max_panel_power_W=100),
                         appliance=PVAppliance()),

                ],
                grid_fee_percentage=0, transfer_fee_const=0,

            ),
            Area('Cell Tower', strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                                   hrs_per_day=24,
                                                                   hrs_of_day=list(range(0, 24)),
                                                                   final_buying_rate=35),
                 appliance=SwitchableAppliance()),
            Area('DSO',
                 strategy=InfiniteBusStrategy(energy_buy_rate=10, energy_sell_rate=30),
                 appliance=SimpleAppliance()
                 ),
        ],
        config=config,
    )
    return area
Esempio n. 17
0
def get_setup(config):

    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.LoadSettings.INITIAL_BUYING_RATE = 35
    ConstSettings.LoadSettings.FINAL_BUYING_RATE = 35
    ConstSettings.StorageSettings.INITIAL_BUYING_RATE = 24.99
    ConstSettings.StorageSettings.FINAL_BUYING_RATE = 25
    ConstSettings.StorageSettings.INITIAL_SELLING_RATE = 30
    ConstSettings.StorageSettings.FINAL_SELLING_RATE = 25.01

    area = Area(
        'Grid',
        [
            Area('House 1', [
                Area('H1 General Load',
                     strategy=LoadHoursStrategy(avg_power_W=100,
                                                hrs_per_day=6,
                                                hrs_of_day=list(range(12, 18)),
                                                final_buying_rate=35),
                     appliance=SwitchableAppliance()),
                Area('H1 Storage1',
                     strategy=StorageStrategy(initial_soc=50),
                     appliance=SwitchableAppliance()),
                Area('H1 Storage2',
                     strategy=StorageStrategy(),
                     appliance=SwitchableAppliance())
            ]),
            Area('House 2', [
                Area('H2 General Load',
                     strategy=LoadHoursStrategy(avg_power_W=100,
                                                hrs_per_day=4,
                                                hrs_of_day=list(range(12, 16)),
                                                final_buying_rate=35),
                     appliance=SwitchableAppliance()),
                Area('H2 PV', strategy=PVStrategy(4), appliance=PVAppliance()),
            ]),
            Area('Cell Tower',
                 strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                     hrs_per_day=24,
                                                     hrs_of_day=list(
                                                         range(0, 24)),
                                                     final_buying_rate=35),
                 appliance=SwitchableAppliance())
            # Area('Commercial Energy Producer',
            #      strategy=CommercialStrategy(energy_range_wh=(40, 120), energy_price=30),
            #      appliance=SimpleAppliance()
            #      ),
        ],
        config=config)
    return area
Esempio n. 18
0
def get_setup(config):
    area = Area('Grid', [
        Area('Finite Power Plant',
             strategy=FinitePowerPlant(energy_rate=30,
                                       max_available_power_kW=100),
             appliance=SwitchableAppliance()),
        Area('Load',
             strategy=LoadHoursStrategy(avg_power_W=100,
                                        hrs_per_day=9,
                                        hrs_of_day=list(range(8, 18))),
             appliance=SwitchableAppliance()),
    ],
                config=config)
    return area
Esempio n. 19
0
def get_setup(config):

    i_c = 12 * 1.2
    i_c_f = 1
    area = Area('Grid', [
        Area('House 1', [
            Area('H1 PV', strategy=PVStrategy(60, 80),
                 appliance=PVAppliance()),
            Area('H1 General Load',
                 strategy=DefinedLoadStrategy(daily_load_profile=os.path.join(
                     d3a_path, 'resources', 'SAM_MF2_Summer.csv'),
                                              max_energy_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage1',
                 strategy=StorageStrategy(battery_capacity_kWh=i_c,
                                          max_abs_battery_power_kW=i_c,
                                          initial_capacity_kWh=i_c_f * i_c),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 PV', strategy=PVStrategy(60, 80),
                 appliance=PVAppliance()),
            Area('H2 General Load',
                 strategy=DefinedLoadStrategy(daily_load_profile=os.path.join(
                     d3a_path, 'resources', 'SAM_MF2_Summer.csv'),
                                              max_energy_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H2 Storage1',
                 strategy=StorageStrategy(battery_capacity_kWh=i_c,
                                          max_abs_battery_power_kW=i_c,
                                          initial_capacity_kWh=i_c_f * i_c),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 3', [
            Area('H3 General Load',
                 strategy=DefinedLoadStrategy(daily_load_profile=os.path.join(
                     d3a_path, 'resources', 'SAM_MF2_Summer.csv'),
                                              max_energy_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H3 Storage1',
                 strategy=StorageStrategy(battery_capacity_kWh=i_c,
                                          max_abs_battery_power_kW=i_c,
                                          initial_capacity_kWh=i_c_f * i_c),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 4', [
            Area('H4 General Load',
                 strategy=DefinedLoadStrategy(daily_load_profile=os.path.join(
                     d3a_path, 'resources', 'SAM_MF2_Summer.csv'),
                                              max_energy_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H4 Storage1',
                 strategy=StorageStrategy(battery_capacity_kWh=i_c,
                                          max_abs_battery_power_kW=i_c,
                                          initial_capacity_kWh=i_c_f * i_c),
                 appliance=SwitchableAppliance()),
        ]),
    ],
                config=config)
    return area
Esempio n. 20
0
def get_setup(config):

    ConstSettings.IAASettings.MARKET_TYPE = 3
    # ConstSettings.GeneralSettings.SUPPLY_DEMAND_PLOTS = False
    ConstSettings.GeneralSettings.MARKET_CLEARING_FREQUENCY_PER_SLOT = 3
    ConstSettings.LoadSettings.INITIAL_BUYING_RATE = 35
    ConstSettings.LoadSettings.FINAL_BUYING_RATE = 35
    ConstSettings.StorageSettings.INITIAL_BUYING_RATE = 24.99
    ConstSettings.StorageSettings.FINAL_BUYING_RATE = 25
    ConstSettings.StorageSettings.INITIAL_SELLING_RATE = 30
    ConstSettings.StorageSettings.FINAL_SELLING_RATE = 25.01

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=6,
                                            hrs_of_day=list(range(12, 18)),
                                            initial_buying_rate=35,
                                            final_buying_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage1',
                 strategy=StorageStrategy(initial_soc=50),
                 appliance=SwitchableAppliance()),
            Area('H1 Storage2',
                 strategy=StorageStrategy(initial_soc=50),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=100,
                                            hrs_per_day=4,
                                            hrs_of_day=list(range(12, 16)),
                                            final_buying_rate=35),
                 appliance=SwitchableAppliance()),
            Area('H2 PV', strategy=PVStrategy(4), appliance=PVAppliance()),
            Area('H2 CEP',
                 strategy=CommercialStrategy(energy_rate=10),
                 appliance=SimpleAppliance()),
        ]),
        Area('Cell Tower',
             strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                 hrs_per_day=24,
                                                 hrs_of_day=list(range(0, 24)),
                                                 final_buying_rate=35),
             appliance=SwitchableAppliance()),
    ],
                config=config)
    return area
Esempio n. 21
0
def get_setup(config):
    DeviceRegistry.REGISTRY = device_registry_dict
    ConstSettings.BalancingSettings.ENABLE_BALANCING_MARKET = True
    area = Area(
        'Grid',
        [
            Area(
                'House 1',
                [
                    Area('H1 General Load', strategy=LoadHoursStrategy(avg_power_W=200,
                                                                       hrs_per_day=6,
                                                                       hrs_of_day=list(
                                                                           range(12, 18)),
                                                                       max_energy_rate=35),
                         appliance=SwitchableAppliance()),
                    Area('H1 Storage1', strategy=StorageStrategy(initial_capacity_kWh=0.6),
                         appliance=SwitchableAppliance()),
                    Area('H1 Storage2', strategy=StorageStrategy(initial_capacity_kWh=0.6),
                         appliance=SwitchableAppliance()),
                ]
            ),
            Area(
                'House 2',
                [
                    Area('H2 General Load', strategy=LoadHoursStrategy(avg_power_W=200,
                                                                       hrs_per_day=4,
                                                                       hrs_of_day=list(
                                                                           range(12, 16)),
                                                                       max_energy_rate=35),
                         appliance=SwitchableAppliance()),
                    Area('H2 PV', strategy=PVStrategy(4, 80),
                         appliance=PVAppliance()),

                ]
            ),
            Area('Cell Tower', strategy=CellTowerLoadHoursStrategy(avg_power_W=100,
                                                                   hrs_per_day=24,
                                                                   hrs_of_day=list(range(0, 24)),
                                                                   max_energy_rate=35),
                 appliance=SwitchableAppliance()),
            # Area('Commercial Energy Producer',
            #      strategy=CommercialStrategy(energy_rate=30),
            #      appliance=SimpleAppliance()
            #      ),

        ],
        config=config
    )
    return area
Esempio n. 22
0
def get_setup(config):
    ConstSettings.IAASettings.MARKET_TYPE = 3
    area = Area(
            'Grid',
            [
                    Area(
                            'House 1',
                            [
                                    Area('H1 PV', strategy=PVUserProfileStrategy(
                                                power_profile=house1_pv_production),
                                         appliance=PVAppliance()),
                                    Area('H1 General Load', strategy=DefinedLoadStrategy(
                                        daily_load_profile=load_profile_path,
                                        final_buying_rate=28),
                                         appliance=SwitchableAppliance()),
                             ]),
                    Area(
                            'House 2',
                            [
                                    Area('H2 PV', strategy=PVStrategy(30),
                                         appliance=PVAppliance()),
                                    Area('H2 General Load',
                                         strategy=DefinedLoadStrategy(
                                             daily_load_profile=house2_load_dict),
                                         appliance=SwitchableAppliance()),
                             ]),
                    Area(
                            'House 3',
                            [
                                    Area('H3 General Load', strategy=DefinedLoadStrategy(
                                        daily_load_profile=house3_load_dict,
                                        final_buying_rate=25),
                                         appliance=SwitchableAppliance()),
                            ]),
                    Area(
                            'House 4',
                            [
                                    Area('H4 General Load',
                                         strategy=DefinedLoadStrategy(
                                             daily_load_profile=load_profile_path,
                                             final_buying_rate=24),
                                         appliance=SwitchableAppliance()),
                            ]),
                    Area('Infinite Power Plant', strategy=CommercialStrategy(energy_rate=30),
                         appliance=SimpleAppliance()),
                            ],
            config=config
        )
    return area
Esempio n. 23
0
def get_setup(config):
    ConstSettings.IAASettings.MARKET_TYPE = 3

    area = Area('Grid', [
        Area(
            'Energy Community',
            [
                Area('Load',
                     strategy=LoadHoursStrategy(avg_power_W=5000,
                                                hrs_per_day=24,
                                                hrs_of_day=list(range(24)),
                                                initial_buying_rate=25,
                                                final_buying_rate=25),
                     appliance=SwitchableAppliance()),
                Area('Local Supply 1',
                     strategy=FinitePowerPlant(energy_rate=10,
                                               max_available_power_kW=1.0),
                     appliance=SimpleAppliance()),
                Area('Local Supply 2',
                     strategy=FinitePowerPlant(energy_rate=15,
                                               max_available_power_kW=1.0),
                     appliance=SimpleAppliance()),
                Area('Local Supply 3',
                     strategy=FinitePowerPlant(energy_rate=20,
                                               max_available_power_kW=1.0),
                     appliance=SimpleAppliance()),
            ],
        ),
    ],
                config=config)
    return area
Esempio n. 24
0
def get_setup(config):
    area = Area('Grid', [
        Area(
            'House 1',
            [
                Area('Penalty PV',
                     strategy=PVStrategy(panel_count=10,
                                         initial_selling_rate=30,
                                         final_selling_rate=5),
                     appliance=PVAppliance()),
            ],
            grid_fee_percentage=0,
            transfer_fee_const=0,
        ),
        Area(
            'House 2',
            [
                Area('Non Penalty Load',
                     strategy=LoadHoursStrategy(avg_power_W=100,
                                                hrs_per_day=6,
                                                hrs_of_day=list(range(10, 16)),
                                                final_buying_rate=35),
                     appliance=SwitchableAppliance()),
            ],
            grid_fee_percentage=0,
            transfer_fee_const=0,
        ),
    ],
                config=config)
    return area
Esempio n. 25
0
def get_setup(config):
    config.grid_fee_type = 1
    ConstSettings.GeneralSettings.DEFAULT_UPDATE_INTERVAL = 5
    area = Area('Grid', [
        Area('Neighborhood 1', [
            Area('House 1', [
                Area('H1 General Load',
                     strategy=LoadHoursStrategy(avg_power_W=200,
                                                hrs_per_day=24,
                                                hrs_of_day=list(range(0, 24)),
                                                initial_buying_rate=30,
                                                final_buying_rate=30),
                     appliance=SwitchableAppliance()),
            ],
                 grid_fee_constant=0)
        ],
             grid_fee_constant=1),
        Area('Neighborhood 2', [
            Area('House 2', [
                Area('H2 PV',
                     strategy=PVStrategy(panel_count=10,
                                         initial_selling_rate=10,
                                         final_selling_rate=10),
                     appliance=PVAppliance()),
            ],
                 grid_fee_constant=0),
        ],
             grid_fee_constant=1)
    ],
                config=config,
                grid_fee_constant=2)
    return area
def get_setup(config):
    config.read_market_maker_rate(market_maker_rate)
    area = Area(
        'Grid',
        [
            Area(
                'House',
                [
                    Area('H1 General Load', strategy=LoadHoursStrategy(
                            avg_power_W=500,
                            hrs_per_day=6,
                            hrs_of_day=list(
                                range(6, 22)),
                            max_energy_rate=35.01
                        ),
                         appliance=SwitchableAppliance()),
                    # The default value is 1, for historical average price
                    # Here a value of 2 is used, which is using the market maker rate
                    Area('H1 PV', strategy=PVStrategy(4, 80, initial_rate_option=2),
                         appliance=PVAppliance()),
                ]
            ),
        ],
        config=config
    )
    return area
Esempio n. 27
0
def get_setup(config):
    # Two sided market
    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.PVSettings.MIN_SELLING_RATE = 0
    ConstSettings.GeneralSettings.DEFAULT_MARKET_MAKER_RATE = 30
    ConstSettings.LoadSettings.MIN_ENERGY_RATE = 0
    ConstSettings.LoadSettings.MAX_ENERGY_RATE = 30
    DeviceRegistry.REGISTRY = device_registry_dict
    ConstSettings.BalancingSettings.FLEXIBLE_LOADS_SUPPORT = False
    ConstSettings.BalancingSettings.ENABLE_BALANCING_MARKET = True

    area = Area('Grid', [
        Area('House 1', [
            Area(
                'H1 General Load',
                strategy=LoadHoursStrategy(
                    avg_power_W=200,
                    hrs_per_day=6,
                    hrs_of_day=list(range(9, 15)),
                    min_energy_rate=ConstSettings.LoadSettings.MIN_ENERGY_RATE,
                    max_energy_rate=ConstSettings.LoadSettings.MAX_ENERGY_RATE
                ),
                appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 PV', strategy=PVStrategy(4, 0), appliance=PVAppliance()),
        ]),
    ],
                config=config)
    return area
Esempio n. 28
0
def get_setup(config):
    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.PVSettings.FINAL_SELLING_RATE = 0
    ConstSettings.GeneralSettings.DEFAULT_MARKET_MAKER_RATE = 30
    ConstSettings.LoadSettings.INITIAL_BUYING_RATE = 0
    ConstSettings.LoadSettings.FINAL_BUYING_RATE = 30

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load',
                 strategy=LoadHoursStrategy(avg_power_W=1000,
                                            hrs_per_day=24,
                                            hrs_of_day=list(range(0, 24)),
                                            initial_buying_rate=ConstSettings.
                                            LoadSettings.INITIAL_BUYING_RATE,
                                            final_buying_rate=ConstSettings.
                                            LoadSettings.FINAL_BUYING_RATE),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 PV1', strategy=PVStrategy(1), appliance=PVAppliance()),
            Area('H2 PV2', strategy=PVStrategy(1), appliance=PVAppliance()),
            Area('H2 PV3', strategy=PVStrategy(1), appliance=PVAppliance()),
            Area('H2 PV4', strategy=PVStrategy(1), appliance=PVAppliance()),
            Area('H2 PV5', strategy=PVStrategy(1), appliance=PVAppliance()),
        ]),
    ],
                config=config)
    return area
Esempio n. 29
0
def get_setup(config):
    ConstSettings.GeneralSettings.KEEP_PAST_MARKETS = True
    area = Area('Grid', [
        Area(
            'House 1',
            [
                Area('H1 General Load',
                     strategy=LoadHoursStrategy(avg_power_W=200,
                                                hrs_per_day=24,
                                                hrs_of_day=list(range(24)),
                                                final_buying_rate=35),
                     appliance=SwitchableAppliance()),
                Area('H1 PV',
                     strategy=PVStrategy(panel_count=4,
                                         initial_selling_rate=30,
                                         final_selling_rate=5),
                     appliance=PVAppliance()),
            ],
            transfer_fee_pct=0,
            transfer_fee_const=0,
        ),
        Area('Commercial Energy Producer',
             strategy=CommercialStrategy(energy_rate=30),
             appliance=SimpleAppliance()),
    ],
                config=config)
    return area
Esempio n. 30
0
def get_setup(config):
    # Two sided market
    ConstSettings.IAASettings.MARKET_TYPE = 2
    ConstSettings.PVSettings.FINAL_SELLING_RATE = 0
    ConstSettings.GeneralSettings.DEFAULT_MARKET_MAKER_RATE = 30
    ConstSettings.LoadSettings.INITIAL_BUYING_RATE = 0
    ConstSettings.LoadSettings.FINAL_BUYING_RATE = 30

    area = Area('Grid', [
        Area('House 1', [
            Area('H1 General Load',
                 strategy=CustomLoadStrategy(avg_power_W=200,
                                             hrs_per_day=6,
                                             hrs_of_day=list(range(9, 15)),
                                             initial_buying_rate=ConstSettings.
                                             LoadSettings.INITIAL_BUYING_RATE,
                                             final_buying_rate=ConstSettings.
                                             LoadSettings.FINAL_BUYING_RATE),
                 appliance=SwitchableAppliance()),
        ]),
        Area('House 2', [
            Area('H2 PV', strategy=PVStrategy(4, 0), appliance=PVAppliance()),
        ]),
    ],
                config=config)
    return area