python.agent_mutation package

Submodules

python.agent_mutation.elec module

python.agent_mutation.elec.apply_batt_prices(dataframe, batt_price_traj, batt_tech_traj, year)[source]
Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • batt_price_traj ('pd.DataFrame') – Dataframe of battery price trajectories over time. See the ‘input_batt_prices_user_defined’ table in the database.

  • batt_tech_traj ('pd.DataFrame') – Dataframe of battery tech trajectories over time. See the ‘input_batt_tech_performance_user_defined’ table in the database.

Returns

dataframe – Agent DataFrame with battery price and tech parameters merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_batt_tech_performance(dataframe, batt_tech_traj)[source]
Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • batt_tech_traj ('pd.DataFrame') – Dataframe of battery tech trajectories over time. See the ‘input_batt_tech_performance_user_defined’ table in the database.

Returns

dataframe – Agent DataFrame with battery tech parameters merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_carbon_intensities(dataframe, carbon_intensities)[source]
python.agent_mutation.elec.apply_depreciation_schedule(dataframe, deprec_sch)[source]
python.agent_mutation.elec.apply_elec_price_multiplier_and_escalator(dataframe, year, elec_price_change_traj)[source]

Obtain a single scalar multiplier for each agent, that is the cost of electricity relative to 2016 (when the tariffs were curated). Also calculate the compound annual growth rate (CAGR) for the price of electricity from present year to 2050, which will be the escalator that agents use to project electricity changes in their bill calculations.

elec_price_multiplier = change in present-year elec cost to 2016 elec_price_escalator = agent’s assumption about future price changes Note that many customers will not differentiate between real and nominal, and therefore many would overestimate the real escalation of electriicty prices.

Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • year ('int') – The year for which you want multiplier values for

  • elec_price_change_traj ('pd.DataFrame') – Dataframe of electricity prices’ trajectories over time. See the ‘input_elec_prices_user_defined’ table in the database.

Returns

dataframe – Agent DataFrame with elec_price_multiplier and elec_price_escalator data merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_export_tariff_params(dataframe, net_metering_state_df, net_metering_utility_df)[source]
python.agent_mutation.elec.apply_financial_params(dataframe, financing_terms, itc_options, inflation_rate)[source]

Applies financial parameters specified in input sheet to agent dataframe.

Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • financing_terms ('pd.DataFrame') – Dataframe of financing terms.

  • itc_options ('pd.DataFrame') – Dataframe of different ITC (investment tax credit) parameters, namely ‘itc_fraction_of_capex’ that is merged to the agent dataframe on year, technology, and sector.

  • inflation_rate ('float') – rate of inflation specified in the input sheet as a percentage (e.g. 2.5%).

Returns

dataframe – Agent DataFrame with financial parameters merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_load_growth(dataframe, load_growth_df)[source]
python.agent_mutation.elec.apply_market_last_year(dataframe, market_last_year_df)[source]
python.agent_mutation.elec.apply_pv_plus_batt_prices(dataframe, pv_plus_batt_price_traj, batt_tech_traj, year)[source]
Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • pv_plus_batt_price_traj ('pd.DataFrame') – Dataframe of battery price trajectories over time. See the ‘input_pv_plus_batt_prices_user_defined’ table in the database.

  • batt_tech_traj ('pd.DataFrame') – Dataframe of battery tech trajectories over time. See the ‘input_batt_tech_performance_user_defined’ table in the database.

Returns

dataframe – Agent DataFrame with pv plus battery price parameters and battery tech parameters merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_pv_prices(dataframe, pv_price_traj)[source]
Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • pv_price_traj ('pd.DataFrame') – Dataframe of PV price trajectories over time. See the ‘input_pv_prices_user_defined’ table in the database.

Returns

dataframe – Agent DataFrame with pv price parameters merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_pv_tech_performance(dataframe, pv_tech_traj)[source]
Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • pv_tech_traj ('pd.DataFrame') – Dataframe of PV tech performance over time. See the ‘input_pv_tech_performance_user_defined’ table in the database.

Returns

dataframe – Agent DataFrame with pv tech performance parameters merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_rate_switch(rate_switch_table, agent, system_size_kw, tech='solar')[source]
python.agent_mutation.elec.apply_state_incentives(dataframe, state_incentives, year, start_year, state_capacity_by_year, end_date=datetime.date(2029, 1, 1))[source]
python.agent_mutation.elec.apply_value_of_resiliency(dataframe, value_of_resiliency)[source]

Note, value of resiliency (VOR) is not currently used in the open source version of the model.

Parameters
  • dataframe ('pd.DataFrame') – Agent dataframe

  • vaule_of_resiliency ('pd.DataFrame') – Dataframe of financials pertaining to the value of resiliency. See the ‘input_value_of_resiliency_user_defined’ table in the database.

Returns

dataframe – Agent DataFrame with value of resiliency parameters merged in.

Return type

‘pd.DataFrame’

python.agent_mutation.elec.apply_wholesale_elec_prices(dataframe, wholesale_elec_prices)[source]
python.agent_mutation.elec.calc_state_capacity_by_year(con, schema, load_growth, peak_demand_mw, is_first_year, year, solar_agents, last_year_installed_capacity)[source]
python.agent_mutation.elec.calculate_developable_customers_and_load(dataframe)[source]
python.agent_mutation.elec.estimate_initial_market_shares(dataframe, state_starting_capacities_df)[source]
python.agent_mutation.elec.estimate_total_generation(dataframe)[source]
python.agent_mutation.elec.filter_nem_year(df, year)[source]
python.agent_mutation.elec.get_and_apply_agent_load_profiles(con, agent)[source]
python.agent_mutation.elec.get_and_apply_normalized_hourly_resource_solar(con, agent)[source]
python.agent_mutation.elec.get_electric_rates_json(con, unique_rate_ids)[source]
python.agent_mutation.elec.get_nem_settings(state_limits, state_by_sector, utility_by_sector, selected_scenario, year, state_capacity_by_year, cf_during_peak_demand)[source]
python.agent_mutation.elec.get_rate_switch_table(con)[source]
python.agent_mutation.elec.get_state_starting_capacities(con, schema)[source]
python.agent_mutation.elec.interpolate_array(row, array_1_col, array_2_col, interp_factor_col, out_col)[source]
python.agent_mutation.elec.reassign_agent_tariffs(dataframe, con)[source]
python.agent_mutation.elec.scale_array_precision(row, array_col, prec_offset_col)[source]
python.agent_mutation.elec.scale_array_sum(row, array_col, scale_col)[source]

Module contents