Пример #1
0
# data definitions for alternative scenarios
alt_args = [
    # base scenario
    dict(),

    # more detailed sampling
    dict(time_sample='PSIP_2016_12_23', inputs_dir='inputs_12x24'),

    # 2045-only (for experiments)
    dict(time_sample='2045_15', inputs_dir='inputs_2045'),

    # lower-cost hydrogen
    dict(
        inputs_dir='inputs_future_hydrogen',
        **future_hydrogen_args
    ),

    # only 2 days, useful for testing and debugging
    dict(inputs_dir='inputs_tiny', time_sample='tiny'),

    # different rates of EV adoption
    dict(inputs_dir='inputs_ev_slow', ev_scenario='Business as Usual'),
    dict(inputs_dir='inputs_ev_full', ev_scenario='Full Adoption'),
]


for a in alt_args:
    # clone the arguments dictionary and update it with settings from the alt_args entry, if any
    active_args = dict(args.items() + a.items())
    scenario_data.write_tables(**active_args)
Пример #2
0
    2040: 0.70,
    2045: 1.00
})

# data definitions for alternative scenarios
alt_args = [
    # base scenario
    dict(),

    # more detailed sampling
    dict(time_sample='PSIP_2016_12_23', inputs_dir='inputs_12x24'),

    # 2045-only (for experiments)
    dict(time_sample='2045_15', inputs_dir='inputs_2045'),

    # lower-cost hydrogen
    dict(inputs_dir='inputs_future_hydrogen', **future_hydrogen_args),

    # only 2 days, useful for testing and debugging
    dict(inputs_dir='inputs_tiny', time_sample='tiny'),

    # different rates of EV adoption
    dict(inputs_dir='inputs_ev_slow', ev_scenario='Business as Usual'),
    dict(inputs_dir='inputs_ev_full', ev_scenario='Full Adoption'),
]

for a in alt_args:
    # clone the arguments dictionary and update it with settings from the alt_args entry, if any
    active_args = dict(args.items() + a.items())
    scenario_data.write_tables(**active_args)
Пример #3
0
# We assume each data tag is unique, even across data types, so we can use the
# tag as a unique ID for any adjustment to the data. It would be possible to
# have different tag "name spaces" for each type of data (load, ev, prices, rps
# fraction) by making alt_args into a dict, with keys for each data type, but
# then we would need to maintain a list of data types somewhere and iterate
# through that. (That may eventually be a good idea, if it allows collapsing
# all the code into simpler loops.)
alt_args = []
alt_args.extend(
    dict(tag=load_name, load_scen_id=load_scen_id)
    for load_name, load_scen_id in load_scenarios
)
alt_args.extend(
    dict(tag=ev_name, ev_scenario=ev_scenario)
    for ev_name, ev_scenario in ev_scenarios
)
alt_args.extend(
    dict(tag=price_name, **all_price_scenarios[price_name])
    for price_name in price_scenarios
)
# note: the 100% target ends up using the base rps_targets file since it is identical
alt_args.extend(
    dict(
        tag=t,
        rps_targets={k: f * v for k, v in args['rps_targets'].items()}
    )
    for t, f in rps_fractions
)

scenario_data.write_tables(args, alt_args, scenario_list)
Пример #4
0
def write_inputs(args, **alt_args):
    all_args = args.copy()
    all_args.update(alt_args)
    scenario_data.write_tables(all_args)