Skip to content

feat: create change table to mimic existing grid when scaling new grid#174

Merged
danielolsen merged 3 commits intodevelopfrom
mimic_grid
May 21, 2020
Merged

feat: create change table to mimic existing grid when scaling new grid#174
danielolsen merged 3 commits intodevelopfrom
mimic_grid

Conversation

@danielolsen
Copy link
Copy Markdown
Contributor

Purpose

Simplify scenario creation by automatically generating a change table to scale an arbitrary base grid to match a target grid (reference grid + clean capacity scale-up).

What is the code doing

The main logic is in a new mimic_grid.py file, with a public function mimic_generation_capacity(). This function calculates plant-level scaling factors to scale a base grid to a reference grid, and then passes these scaling factors to _calculate_common_zone_factors(), to allow a simplification of the generated change table by identifying scaling factors common to all plants in a zone. This function does a few things:

  • It identifies when all plants of a given type/zone are scaled to 0, and instead scales that type/zone to 0.
  • It identifies the most common scaling factor by taking a median of all non-zero scaling factors (since many will be very close, differentiated only by floating-point cruft)
  • If the scaling factor is 1, a zone scaling factor is not added. Otherwise, a zone scaling factor is added, and individual plant scaling factors are divided by this number.
  • Then, all plant scaling factors that are approximately 1 are dropped.

In scenario_info.py, we move the main logic for area_to_loadzone out of the ScenarioInfo object, since all it actually needs is a grid, and no more info from the scenario. There are no changes to any of the logic in this function.

In clean_capacity_scaling.py, we create a new method create_change_table(), which creates a change table output. Scaling to get from base to ref is done via mimic_generation_capacity(), and then scale factors by target are applied on top of this scaling.

Validation

All existing unit tests, still pass, so we didn't break anything here. We can validate that the change table generated by mimic_generation_capacity() effective matches the existing change table from scenario 403 (with a different structure, and scaledown for offshore wind), via the following integration test:

from powersimdata.scenario.scenario import Scenario
from powersimdata.input.grid import Grid
from powersimdata.design.mimic_grid import mimic_generation_capacity
ref_scenario = Scenario('403')
ref_grid = ref_scenario.state.get_grid()
base_grid = Grid(['Eastern'])
new_change_table = mimic_generation_capacity(base_grid, ref_grid)

We create a custom function to validate this new output:

def verify_change_table(new_change_table, ref_change_table, base_grid):
    # Check that the reference change table is represented properly in the new
    print('checking for reference change table values in the new change table')
    for fuel in ref_change_table:
        print(fuel)
        if 'zone_id' in ref_change_table[fuel]:
            for z, v in ref_change_table[fuel]['zone_id'].items():
                if abs(v - 1) < 1e-3:
                    print('skipping', fuel, z, '≈ 1')
                else:
                    assert abs(v - new_change_table[fuel]['zone_id'][z]) < 1e-6
        if 'plant_id' in ref_change_table[fuel]:
            for p, v in ref_change_table[fuel]['plant_id'].items():
                if v == 0:
                    plant_fuel = base_grid.plant.loc[p, 'type']
                    plant_zone = base_grid.plant.loc[p, 'zone_id']
                    if (plant_zone in new_change_table[plant_fuel]['zone_id']
                        and new_change_table[plant_fuel]['zone_id'][plant_zone] == 0):
                        # We don't need to scale this plant to 0, because the zone is scale to 0
                        continue
                assert abs(v - new_change_table[fuel]['plant_id'][p]) < 1e-6
    
    # Check that the new change table does not contain anything that doesn't match the reference
    print('checking for new change table values in the reference change table')
    for fuel in new_change_table:
        print(fuel)
        if fuel == 'wind_offshore':
            continue
        if 'zone_id' in new_change_table[fuel]:
            for z, v in new_change_table[fuel]['zone_id'].items():
                if z in ref_change_table[fuel]['zone_id']:
                    # Assert that scaling factors match, if they are present
                    assert abs(v - ref_change_table[fuel]['zone_id'][z]) < 1e-6
                else:
                    # Or assert that all individual plants are scaled down instead
                    plant_ids = base_grid.plant.groupby(['type', 'zone_id']).get_group((fuel, z)).index
                    assert all([ref_change_table[fuel]['plant_id'][p] == 0 for p in plant_ids])
        if 'plant_id' in new_change_table[fuel]:
            for p, v in new_change_table[fuel]['plant_id'].items():
                assert abs(v - new_change_table[fuel]['plant_id'][p]) < 1e-3
    print('the change tables match!')

Let's run it on our new change table, against the existing change table (minus demand and branch scaling):

>>> ref_change_table = ref_scenario.state.get_ct().copy()
>>> unneeded_keys = ['branch', 'demand']
>>> for k in unneeded_keys: del ref_change_table[k]
>>> verify_change_table(new_change_table, ref_change_table, base_grid)
checking for reference change table values in the new change table
coal
skipping coal 42 ≈ 1
skipping coal 6 ≈ 1
skipping coal 12 ≈ 1
skipping coal 39 ≈ 1
skipping coal 43 ≈ 1
skipping coal 52 ≈ 1
skipping coal 49 ≈ 1
skipping coal 2 ≈ 1
skipping coal 7 ≈ 1
skipping coal 8 ≈ 1
skipping coal 47 ≈ 1
skipping coal 18 ≈ 1
skipping coal 50 ≈ 1
skipping coal 45 ≈ 1
skipping coal 44 ≈ 1
dfo
skipping dfo 24 ≈ 1
skipping dfo 42 ≈ 1
skipping dfo 6 ≈ 1
skipping dfo 12 ≈ 1
skipping dfo 20 ≈ 1
skipping dfo 19 ≈ 1
skipping dfo 27 ≈ 1
skipping dfo 43 ≈ 1
skipping dfo 1 ≈ 1
skipping dfo 51 ≈ 1
skipping dfo 49 ≈ 1
skipping dfo 2 ≈ 1
skipping dfo 47 ≈ 1
skipping dfo 10 ≈ 1
skipping dfo 11 ≈ 1
skipping dfo 5 ≈ 1
skipping dfo 50 ≈ 1
skipping dfo 26 ≈ 1
skipping dfo 14 ≈ 1
skipping dfo 15 ≈ 1
skipping dfo 3 ≈ 1
skipping dfo 28 ≈ 1
hydro
skipping hydro 24 ≈ 1
skipping hydro 42 ≈ 1
skipping hydro 6 ≈ 1
skipping hydro 21 ≈ 1
skipping hydro 20 ≈ 1
skipping hydro 19 ≈ 1
skipping hydro 39 ≈ 1
skipping hydro 34 ≈ 1
skipping hydro 33 ≈ 1
skipping hydro 48 ≈ 1
skipping hydro 27 ≈ 1
skipping hydro 43 ≈ 1
skipping hydro 4 ≈ 1
skipping hydro 13 ≈ 1
skipping hydro 1 ≈ 1
skipping hydro 32 ≈ 1
skipping hydro 31 ≈ 1
skipping hydro 37 ≈ 1
skipping hydro 38 ≈ 1
skipping hydro 41 ≈ 1
skipping hydro 40 ≈ 1
skipping hydro 16 ≈ 1
skipping hydro 17 ≈ 1
skipping hydro 51 ≈ 1
skipping hydro 49 ≈ 1
skipping hydro 2 ≈ 1
skipping hydro 9 ≈ 1
skipping hydro 7 ≈ 1
skipping hydro 8 ≈ 1
skipping hydro 29 ≈ 1
skipping hydro 47 ≈ 1
skipping hydro 10 ≈ 1
skipping hydro 11 ≈ 1
skipping hydro 5 ≈ 1
skipping hydro 18 ≈ 1
skipping hydro 50 ≈ 1
skipping hydro 26 ≈ 1
skipping hydro 44 ≈ 1
skipping hydro 14 ≈ 1
skipping hydro 15 ≈ 1
skipping hydro 3 ≈ 1
skipping hydro 36 ≈ 1
skipping hydro 28 ≈ 1
ng
skipping ng 42 ≈ 1
skipping ng 23 ≈ 1
skipping ng 22 ≈ 1
skipping ng 21 ≈ 1
skipping ng 20 ≈ 1
skipping ng 19 ≈ 1
skipping ng 27 ≈ 1
skipping ng 52 ≈ 1
skipping ng 2 ≈ 1
skipping ng 30 ≈ 1
skipping ng 29 ≈ 1
skipping ng 5 ≈ 1
skipping ng 50 ≈ 1
skipping ng 26 ≈ 1
nuclear
skipping nuclear 24 ≈ 1
skipping nuclear 42 ≈ 1
skipping nuclear 6 ≈ 1
skipping nuclear 23 ≈ 1
skipping nuclear 20 ≈ 1
skipping nuclear 39 ≈ 1
skipping nuclear 34 ≈ 1
skipping nuclear 35 ≈ 1
skipping nuclear 48 ≈ 1
skipping nuclear 43 ≈ 1
skipping nuclear 13 ≈ 1
skipping nuclear 32 ≈ 1
skipping nuclear 38 ≈ 1
skipping nuclear 40 ≈ 1
skipping nuclear 25 ≈ 1
skipping nuclear 16 ≈ 1
skipping nuclear 49 ≈ 1
skipping nuclear 2 ≈ 1
skipping nuclear 7 ≈ 1
skipping nuclear 8 ≈ 1
skipping nuclear 30 ≈ 1
skipping nuclear 18 ≈ 1
skipping nuclear 26 ≈ 1
skipping nuclear 15 ≈ 1
skipping nuclear 36 ≈ 1
solar
skipping solar 43 ≈ 1
skipping solar 52 ≈ 1
skipping solar 51 ≈ 1
skipping solar 2 ≈ 1
skipping solar 50 ≈ 1
skipping solar 45 ≈ 1
skipping solar 44 ≈ 1
skipping solar 28 ≈ 1
wind
skipping wind 24 ≈ 1
skipping wind 42 ≈ 1
skipping wind 6 ≈ 1
skipping wind 12 ≈ 1
skipping wind 23 ≈ 1
skipping wind 22 ≈ 1
skipping wind 21 ≈ 1
skipping wind 19 ≈ 1
skipping wind 48 ≈ 1
skipping wind 27 ≈ 1
skipping wind 43 ≈ 1
skipping wind 13 ≈ 1
skipping wind 41 ≈ 1
skipping wind 40 ≈ 1
skipping wind 25 ≈ 1
skipping wind 52 ≈ 1
skipping wind 16 ≈ 1
skipping wind 17 ≈ 1
skipping wind 9 ≈ 1
skipping wind 18 ≈ 1
skipping wind 26 ≈ 1
skipping wind 14 ≈ 1
skipping wind 15 ≈ 1
skipping wind 28 ≈ 1
other
skipping other 42 ≈ 1
skipping other 6 ≈ 1
skipping other 12 ≈ 1
skipping other 20 ≈ 1
skipping other 19 ≈ 1
skipping other 39 ≈ 1
skipping other 34 ≈ 1
skipping other 35 ≈ 1
skipping other 33 ≈ 1
skipping other 48 ≈ 1
skipping other 27 ≈ 1
skipping other 4 ≈ 1
skipping other 13 ≈ 1
skipping other 1 ≈ 1
skipping other 32 ≈ 1
skipping other 31 ≈ 1
skipping other 41 ≈ 1
skipping other 40 ≈ 1
skipping other 25 ≈ 1
skipping other 52 ≈ 1
skipping other 16 ≈ 1
skipping other 17 ≈ 1
skipping other 51 ≈ 1
skipping other 49 ≈ 1
skipping other 2 ≈ 1
skipping other 9 ≈ 1
skipping other 46 ≈ 1
skipping other 7 ≈ 1
skipping other 8 ≈ 1
skipping other 30 ≈ 1
skipping other 29 ≈ 1
skipping other 47 ≈ 1
skipping other 10 ≈ 1
skipping other 11 ≈ 1
skipping other 5 ≈ 1
skipping other 18 ≈ 1
skipping other 50 ≈ 1
skipping other 26 ≈ 1
skipping other 45 ≈ 1
skipping other 44 ≈ 1
skipping other 3 ≈ 1
skipping other 36 ≈ 1
skipping other 28 ≈ 1
checking for new change table values in the reference change table
coal
hydro
nuclear
wind_offshore
dfo
ng
other
solar
wind
the change tables match!

Integration for the entire feature can be demonstrated via the following test, which follows our current clean capacity calculation process:

import pandas as pd
from powersimdata.scenario.scenario import Scenario
from powersimdata.design.scenario_info import ScenarioInfo
from powersimdata.design.clean_capacity_scaling import CollaborativeStrategyManager
scenario_string = '403'
targets_info_location = 'Eastern 2030 Clean Energy Targets.csv'
ref_scenario = Scenario(scenario_string)
scenario_info = ScenarioInfo(ref_scenario)
eastern = pd.read_csv(targets_info_location)
eastern['external_ce_historical_amount'] = eastern['external_ce_historical_amount'].fillna(0)
eastern['allowed_resources'] = eastern['allowed_resources'].fillna('solar,wind')
eastern['ce_category'] = eastern['ce_category'].fillna('TBD')
eastern['solar_percentage'] = eastern['solar_percentage'].fillna('None')
collaborative_strategy_manager = CollaborativeStrategyManager()
collaborative_strategy_manager.targets_from_data_frame(eastern)
start_time = '2016-01-01 00:00:00'
end_time = '2016-12-31 23:00:00'
collaborative_strategy_manager.populate_targets_with_resources(scenario_info, start_time, end_time)
ct = collaborative_strategy_manager.create_change_table(ref_scenario)

We can also verify that this change table structure is compatible with the ChangeTable methods:

new_scenario = Scenario('')
new_scenario.state.set_builder(['Eastern'])
base_grid = new_scenario.state.builder.change_table.grid
for fuel in ct:
    if 'zone_id' in ct[fuel]:
        zone_name_ct = {base_grid.transform['id2zone'][z]: v
                        for z, v in ct[fuel]['zone_id'].items()}
        new_scenario.state.builder.change_table.scale_plant_capacity(fuel, zone_name=zone_name_ct)
    if 'plant_id' in ct[fuel]:
        new_scenario.state.builder.change_table.scale_plant_capacity(fuel, plant_id=ct[fuel]['plant_id'])

The only outputs are for the case where we apply a scaling factor based on a state, but one zone in that state does not have at least one of the resources:

No solar plants in Michigan Northern.
No solar plants in Virginia Mountains.
No wind plants in Georgia South.

All relevant information makes it into the ChangeTable object.

Time to review

One to two hours.

Comment thread powersimdata/design/mimic_grid.py
@danielolsen
Copy link
Copy Markdown
Contributor Author

@dmuldrew here is the output from my clustering algorithm when matching Scenario 403. Between zone scaling and plant scaling, over 10000 individual plant scaling factors are represented by a combination of ~360 zone and plant scaling factors. Plant scaling factors are all zero, so I think this is the most compact it can be.

There are plenty of potential clustering algorithms in the world, but in our applications, most of the plants in a zone/type are scaling by the same factor (subject to floating point precision), with only a few exceptions, so the median seems to work very well.

coal
zone 1 0
zone 4 0
zone 9 0.6623914176784267
zone 10 0.9750600059615584
zone 11 0.9750600059615584
zone 13 0.9928562057985187
zone 14 0.9220999200726755
zone 15 0.9220999200726755
zone 16 1.0010845999695832
zone 17 1.0010845999695832
zone 19 0.9703801223752527
zone 20 0.9703801223752528
zone 21 1.0702500513275708
zone 22 1.0702500513275708
zone 23 1.0702500513275708
zone 24 1.0065514991573825
zone 25 0.9298321186175452
zone 26 0.9742220536333722
zone 27 1.0542300084654928
zone 28 0.9967378048176053
zone 29 0.9618960861573744
zone 30 0.9618960861573744
zone 31 0.9906821504751502
zone 32 0.9906821504751502
zone 33 0.9946245911396483
zone 34 0.9871736560699336
zone 35 0.9871736560699336
zone 36 0.9611162324464143
zone 37 1.019725972832655
zone 38 1.019725972832655
zone 40 0.9935407648029402
zone 41 0.9935407648029402
zone 48 0.9834228946882184
zone 51 1.034377209138445
plant 1872 0.0
plant 2082 0.0
plant 2083 0.0
plant 2308 0.0
plant 2435 0.0
plant 2492 0.0
plant 2493 0.0
plant 2494 0.0
plant 2619 0.0
plant 2620 0.0
plant 2737 0.0
plant 2806 0.0
plant 2807 0.0
plant 2895 0.0
plant 2896 0.0
plant 2913 0.0
plant 3018 0.0
plant 3019 0.0
plant 3165 0.0
plant 3166 0.0
plant 3307 0.0
plant 3382 0.0
plant 3808 0.0
plant 4053 0.0
plant 4261 0.0
plant 4262 0.0
plant 4306 0.0
plant 4307 0.0
plant 4594 0.0
plant 4595 0.0
plant 4596 0.0
plant 4807 0.0
plant 4808 0.0
plant 4886 0.0
plant 4887 0.0
plant 4888 0.0
plant 5043 0.0
plant 5044 0.0
plant 5082 0.0
plant 5083 0.0
plant 5109 0.0
plant 5137 0.0
plant 5138 0.0
plant 5156 0.0
plant 5157 0.0
plant 5219 0.0
plant 5220 0.0
plant 5295 0.0
plant 5296 0.0
plant 5297 0.0
plant 5298 0.0
plant 5337 0.0
plant 5338 0.0
plant 5764 0.0
plant 5765 0.0
plant 5766 0.0
plant 5767 0.0
plant 5768 0.0
plant 6142 0.0
plant 6143 0.0
plant 6360 0.0
plant 6361 0.0
plant 6740 0.0
plant 6741 0.0
plant 6821 0.0
plant 6822 0.0
plant 6838 0.0
plant 6881 0.0
plant 7057 0.0
plant 7058 0.0
plant 7059 0.0
plant 7067 0.0
plant 7266 0.0
plant 7267 0.0
plant 7518 0.0
plant 8704 0.0
plant 8705 0.0
plant 8751 0.0
plant 8752 0.0
plant 8753 0.0
plant 8885 0.0
plant 8886 0.0
plant 10330 0.0
hydro
zone 52 0
nuclear
zone 4 0
zone 9 1.151486166219904
zone 10 1.1049928429069595
zone 11 1.1049928429069595
plant 1960 0.0
plant 2216 0.0
wind_offshore
zone 1 0
zone 2 0
zone 4 0
zone 5 0
zone 6 0
zone 7 0
zone 9 0
zone 12 0
zone 13 0
zone 15 0
zone 16 0
zone 18 0
zone 20 0
zone 22 0
zone 23 0
dfo
zone 4 1.041603515123172
zone 7 0.9642971771478441
zone 8 0.9642971771478441
zone 9 0.34829316997093673
zone 13 0.9532071749718317
zone 16 0.9279756194440515
zone 17 0.9279756194440515
zone 18 0.9984903461609754
zone 21 0.8736873275617113
zone 22 0.8736873275617113
zone 23 0.8736873275617113
zone 25 0.3749999999999997
zone 29 0.9518273123310288
zone 30 0.9518273123310288
zone 31 0.966804994058939
zone 32 0.966804994058939
zone 33 0.4042744586047457
zone 34 1.0034557978339684
zone 35 1.0034557978339684
zone 36 0.9781541029876055
zone 37 0.9808934206541243
zone 38 0.9808934206541243
zone 39 0.9576596459454402
zone 40 1.0152037509218936
zone 41 1.0152037509218936
zone 48 1.0367338330872906
plant 760 0.0
plant 3203 0.0
plant 3204 0.0
plant 3730 0.0
plant 4381 0.0
plant 4382 0.0
ng
zone 1 0.9849350329220252
zone 4 1.1114740765842086
zone 6 1.0204997663847009
zone 7 1.001098322058577
zone 8 1.001098322058577
zone 9 1.0206322057380224
zone 10 1.0020369445578527
zone 11 1.0020369445578527
zone 12 0.9875339831576154
zone 13 1.0339400398107113
zone 14 1.0217392668520127
zone 15 1.0217392668520127
zone 16 1.0320508269010868
zone 17 1.0320508269010868
zone 18 1.0067131047063245
zone 24 1.0032506021583834
zone 25 0.9918448532083475
zone 28 0.994397508145414
zone 31 1.0249331185437722
zone 32 1.0249331185437722
zone 33 1.0134999475491442
zone 34 1.013152562354934
zone 35 1.013152562354934
zone 36 0.9978605183961953
zone 37 1.0925064568617686
zone 38 1.0925064568617686
zone 39 0.927636022401932
zone 40 0.997871726369205
zone 41 0.997871726369205
zone 43 1.0125474469580742
zone 44 1.0066851727187969
zone 45 1.0066851727187969
zone 46 0.9888312019303892
zone 47 1.0294436378526552
zone 48 1.0129988662503473
zone 49 0.9912745949965382
zone 51 1.5073097215042996
plant 203 0.0
plant 204 0.0
plant 1179 0.0
plant 1898 0.0
plant 1899 0.0
plant 1900 0.0
plant 1901 0.0
plant 1914 0.0
plant 1915 0.0
plant 1916 0.0
plant 1917 0.0
plant 1918 0.0
plant 1919 0.0
plant 1920 0.0
plant 1921 0.0
plant 1922 0.0
plant 1923 0.0
plant 1993 0.0
plant 2629 0.0
plant 2780 0.0
plant 2781 0.0
plant 2928 0.0
plant 3025 0.0
plant 3026 0.0
plant 3027 0.0
plant 3569 0.0
plant 4161 0.0
plant 4162 0.0
plant 4213 0.0
plant 4214 0.0
plant 4326 0.0
plant 4400 0.0
plant 4401 0.0
plant 4402 0.0
plant 4403 0.0
plant 4404 0.0
plant 4405 0.0
plant 4438 0.0
plant 4439 0.0
plant 4440 0.0
plant 4441 0.0
plant 4765 0.0
plant 4784 0.0
plant 4854 0.0
plant 4855 0.0
plant 5958 0.0
plant 5959 0.0
plant 5960 0.0
plant 6197 0.0
plant 6498 0.0
plant 7820 0.0
plant 7821 0.0
plant 8088 0.0
plant 8223 0.0
plant 8224 0.0
plant 9002 0.0
plant 9022 0.0
plant 9024 0.0
plant 9025 0.0
plant 9026 0.0
plant 9165 0.0
plant 9166 0.0
plant 9224 0.0
plant 9476 0.0
plant 9477 0.0
plant 9478 0.0
plant 9897 0.0
plant 9898 0.0
plant 9985 0.0
plant 9986 0.0
plant 10124 0.0
other
zone 14 1.100963449288731
zone 15 1.100963449288731
zone 21 1.0689425783810882
zone 22 1.0689425783810882
zone 23 1.0689425783810882
zone 24 1.1539584454285308
zone 37 1.2819228583263258
zone 38 1.281922858326326
zone 43 1.074354572083366
plant 13471 0.0
plant 13488 0.0
plant 13518 0.0
plant 13545 0.0
plant 13594 0.0
solar
zone 1 6.6
zone 3 1.8182644665666616
zone 4 1.6664005788964058
zone 5 5.136751298892265
zone 6 5.238095238095238
zone 7 4.116953762466002
zone 8 4.116953762466002
zone 9 1.3308226340840452
zone 10 1.4581548661030215
zone 11 1.4581548661030215
zone 12 1.2208188577551218
zone 13 1.654056517775752
zone 15 1.6402726796014682
zone 16 1.2687115375515192
zone 17 1.2687115375515192
zone 18 2.092496765847348
zone 19 1.0771962218592432
zone 20 1.0771962218592432
zone 21 1.150572306925926
zone 22 1.150572306925926
zone 23 1.150572306925926
zone 24 1.2769130998702984
zone 25 1.0405534351145038
zone 26 1.460987261146497
zone 27 2.63
zone 29 2.2295081967213117
zone 30 2.2295081967213117
zone 32 8.024
zone 33 1.5230670560471238
zone 34 1.1173020527859236
zone 35 1.1173020527859236
zone 36 12.451612903225806
zone 37 2.8197802197802204
zone 38 2.8197802197802204
zone 39 4.73076923076923
zone 40 2.194756554307116
zone 41 2.194756554307116
zone 42 1.1702127659574468
zone 46 1.0303030303030303
zone 47 12.2
zone 48 10.0
zone 49 3.079365079365079
wind
zone 1 1.0253671562082776
zone 2 1.1554236373448463
zone 3 1.2479338842975207
zone 4 1.1151452282157681
zone 5 1.4411764705882353
zone 7 1.0880964651347333
zone 8 1.0880964651347333
zone 10 1.065530799475754
zone 11 1.065530799475754
zone 29 1.3455652910084623
zone 30 1.3455652910084623
zone 31 1.2082761922559893
zone 32 1.2082761922559893
zone 33 1.1051140590813555
zone 34 1.0234310446586663
zone 35 1.0234310446586663
zone 36 1.1392941176470583
zone 37 1.0394342567786787
zone 38 1.0394342567786787
zone 39 1.0580403343030635
zone 44 1.0248192158483063
zone 45 1.0248192158483063
zone 46 1.0618257613197657
zone 47 1.0419111544501414
zone 49 1.0755694301422507
zone 50 1.0389142912734701
zone 51 1.1113760940246078

@danielolsen danielolsen force-pushed the mimic_grid branch 5 times, most recently from f8d428c to 90da136 Compare May 19, 2020 22:10
Comment thread powersimdata/design/clean_capacity_scaling.py Outdated
Copy link
Copy Markdown
Collaborator

@dmuldrew dmuldrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the change table is generated using this method, are you still going to use the validation built in the change table scale_plant_capacity function?

@danielolsen
Copy link
Copy Markdown
Contributor Author

@dmuldrew we would have to convert back from zone_id to zone_name to use scale_plant_capacity, or expand scale_plant_capacity to take zone_id. I'm not sure the validation is necessary, since we're generating this change table using a fresh copy of the grid, so we shouldn't be generating any invalid scaling factors. I think we can just assign this dict as ChangeTable.ct['plant'].

@danielolsen danielolsen merged commit 35cc7d0 into develop May 21, 2020
@danielolsen danielolsen deleted the mimic_grid branch May 21, 2020 17:46
@ahurli ahurli mentioned this pull request Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants