Hybrid Simulation
Base class for simulating a hybrid power plant.
- class hopp.simulation.hybrid_simulation.HybridSimulation(site: SiteInfo, tech_config: TechnologiesConfig, dispatch_options: dict, cost_info: dict, simulation_options: dict | None = None)
Bases:
BaseClassBase class for simulating a hybrid power plant.
Can be derived to add other sizing methods, financial analyses, methods for pre- or post-processing, etc.
- Parameters:
site – Hybrid plant site information which includes layout, location and resource data
tech_config – Technology configuration
dispatch_options – (optional) dictionary of dispatch options. For details see
hopp.simulation.technologies.dispatch.hybrid_dispatch_options.HybridDispatchOptionscost_info – (optional) dictionary of cost information. For details see
tools.analysis.bos.cost_calculator.CostCalculatorsimulation_options – nested
dict, i.e.,{'pv': {'skip_financial': bool}}(optional) nested dictionary of simulation options. First level key is technology consistent withtechnologies
- tech_config: TechnologiesConfig
- dispatch_options: dict
- cost_info: dict
- simulation_options: dict
- pv: PVPlant | DetailedPVPlant | None
- wave: MHKWavePlant | None
- tower: TowerPlant | None
- trough: TroughPlant | None
- battery: Battery | BatteryStateless | None
- technologies: Dict[str, PVPlant | DetailedPVPlant | WindPlant | MHKWavePlant | TowerPlant | TroughPlant | Battery | BatteryStateless | Grid]
- dispatch_builder: HybridDispatchBuilderSolver
- _fileout: Path
- check_consistent_financial_models()
- set_om_costs(pv_om_per_kw=None, wind_om_per_kw=None, tower_om_per_kw=None, trough_om_per_kw=None, wave_om_per_kw=None, battery_om_per_kw=None, hybrid_om_per_kw=None, pv_om_per_mwh=None, wind_om_per_mwh=None, tower_om_per_mwh=None, trough_om_per_mwh=None, wave_om_per_mwh=None, battery_om_per_mwh=None, hybrid_om_per_mwh=None)
Sets Capacity-based O&M amount for each technology [$/kWcap]. Sets Production-based O&M amount for each technology [$/MWh].
- calculate_installed_cost()
Calculates total hybrid installed cost
- calculate_financials()
Prepare financial parameters from individual power plants for hybrid system financial metrics.
This methods using weighted averages to approximate the hybrid system financial model inputs based on the values provided by the individual sub-systems.
The following table specifies the method used to calculate the hybrid parameter value based on individual sub-system values:
PySAM Parameter
Hybrid parameter method
om_capacityWeighted average by capacities
om_fixedSum of values
om_variableWeighted average by production of non-negative generators
om_productionWeighted average by production of non-negative generators
degradationWeighted average by production of non-negative generators
ptc_fed_amountWeighted average by production (assumes 0 for negative generators)
ptc_fed_escalWeighted average by production (assumes 0 for negative generators)
itc_fed_amountWeighted average by installed cost
itc_fed_percentWeighted average by installed cost
depr_alloc_macrs_5_percentWeighted average by installed cost
depr_alloc_macrs_15_percentWeighted average by installed cost
depr_alloc_sl_5_percentWeighted average by installed cost
depr_alloc_sl_15_percentWeighted average by installed cost
depr_alloc_sl_20_percentWeighted average by installed cost
depr_alloc_sl_39_percentWeighted average by installed cost
depr_alloc_custom_percentWeighted average by installed cost
depr_bonus_fed_macrs_5Binary
Orstatementdepr_bonus_sta_macrs_5Binary
Orstatementdepr_itc_fed_macrs_5Binary
Orstatementdepr_itc_sta_macrs_5Binary
Orstatementdepr_bonus_fed_macrs_15Binary
Orstatementdepr_bonus_sta_macrs_15Binary
Orstatementdepr_itc_fed_macrs_15Binary
Orstatementdepr_itc_sta_macrs_15Binary
Orstatementdepr_bonus_fed_sl_5Binary
Orstatementdepr_bonus_sta_sl_5Binary
Orstatementdepr_itc_fed_sl_5Binary
Orstatementdepr_itc_sta_sl_5Binary
Orstatementdepr_bonus_fed_sl_15Binary
Orstatementdepr_bonus_sta_sl_15Binary
Orstatementdepr_itc_fed_sl_15Binary
Orstatementdepr_itc_sta_sl_15Binary
Orstatementdepr_bonus_fed_sl_20Binary
Orstatementdepr_bonus_sta_sl_20Binary
Orstatementdepr_itc_fed_sl_20Binary
Orstatementdepr_itc_sta_sl_20Binary
Orstatementdepr_bonus_fed_sl_39Binary
Orstatementdepr_bonus_sta_sl_39Binary
Orstatementdepr_itc_fed_sl_39Binary
Orstatementdepr_itc_sta_sl_39Binary
Orstatementdepr_bonus_fed_customBinary
Orstatementdepr_bonus_sta_customBinary
Orstatementdepr_itc_fed_customBinary
Orstatementdepr_itc_sta_customBinary
Orstatement
- setup_performance_models()
Runs the setup requirements for individual system models.
- simulate_power(project_life: int = 25, lifetime_sim=False)
Runs the individual system models for power generation and storage, while calculating the hybrid power variables.
Updates the grid model to consolidate all the inputs from the power generation and storage.
- Parameters:
project_life –
int, Number of year in the analysis period (execepted project lifetime) [years]lifetime_sim –
bool, For simulation modules which support simulating each year of the project_life, whether or not to do so; otherwise the first year data is repeated
- Returns:
- simulate_financials(project_life)
Runs the finanical models for individual sub-systems and the hybrid system as a whole
- Parameters:
project_life –
int, Number of year in the analysis period (execepted project lifetime) [years]- Returns:
- simulate(project_life: int = 25, lifetime_sim=False)
Runs the individual system models then combines the financials
- Parameters:
lifetime_sim –
bool, For simulation modules which support simulating each year of the project_life, whether or not to do so; otherwise the first year data is repeated- Returns:
- property interconnect_kw: float
Interconnection limit [kW]
- property ppa_price: tuple
Power Purchased Agreement Price [$/kWh]
- property capacity_price: float
Capacity payment amount [$/MW-yr]
- property dispatch_factors: Sequence
Time of delivery factors [-]
- property discount_rate: float
Real discount rate [%]
- property system_capacity_kw: HybridSimulationOutput
Hybrid system capacities by technology [kW]
- property annual_energies: HybridSimulationOutput
Hybrid annual energy production by technology [kWh]
- property generation_profile: HybridSimulationOutput
Hybrid generation profiles by technology [kWh]
- property capacity_factors: HybridSimulationOutput
Hybrid capacity factors by technology [%]
- _aggregate_financial_output(name, start_index=None, end_index=None) HybridSimulationOutput
Helper function for aggregating hybrid financial outputs
- property system_nameplate_mw: HybridSimulationOutput
System nameplate capacity [MW]
- property capacity_credit_percent: HybridSimulationOutput
Capacity credit (eligible portion of nameplate) by technology [%]
- property cost_installed: HybridSimulationOutput
The total_installed_cost plus any financing costs [$]
- property total_revenues: HybridSimulationOutput
Revenue in cashflow [$/year]
- property capacity_payments: HybridSimulationOutput
Payments received for capacity [$/year]
- property energy_purchases: HybridSimulationOutput
Value of energy purchased [$/year]
- property energy_sales: HybridSimulationOutput
Value of energy sold [$/year]
- property energy_values: HybridSimulationOutput
Value of energy sold [$/year]
- property federal_depreciation_totals: HybridSimulationOutput
Value of all federal depreciation allocations [$/year]
- property federal_taxes: HybridSimulationOutput
Federal taxes paid [$/year]
- property tax_incentives: HybridSimulationOutput
Federal and state Production Tax Credits and Investment Tax Credits [$/year]
- property debt_payment: HybridSimulationOutput
Payment to debt interest and principal [$/year]
- property insurance_expenses: HybridSimulationOutput
Payments for insurance [$/year]
- property om_capacity_expenses
Capacity-based O&M, $/kW-year
- property om_fixed_expenses
Fixed O&M, $/year
- property om_production
Production-based O&M amount, $/MWh
- property om_variable_expenses
Variable O&M, $/kW
- property om_total_expenses
Total O&M expenses including fixed, variable, and capacity-based, $/year
- property net_present_values: HybridSimulationOutput
After-tax cumulative NPV [$]
- property internal_rate_of_returns: HybridSimulationOutput
Internal rate of return (after-tax) [%]
- property lcoe_real: HybridSimulationOutput
Levelized cost (real) [cents/kWh]
- property lcoe_nom: HybridSimulationOutput
Levelized cost (nominal) [cents/kWh]
- property benefit_cost_ratios: HybridSimulationOutput
Benefit cost ratio [-] = Benefits / Costs
Benefits include (using present values):
PPA, capacity payment, and curtailment revenues
Federal, state, utility, and other production-based incentive income
Salvage value
Costs: uses the present value of annual costs
- __init__(site: SiteInfo, tech_config: TechnologiesConfig, dispatch_options: dict, cost_info: dict, simulation_options: dict | None = None) None
Method generated by attrs for class HybridSimulation.
- _get_model_dict() dict
Convenience method that wraps the attrs.asdict method. Returns the object’s parameters as a dictionary.
- Returns:
The provided or default, if no input provided, model settings as a dictionary.
- Return type:
dict
- as_dict() dict
Creates a JSON and YAML friendly dictionary that can be save for future reloading. This dictionary will contain only Python types that can later be converted to their proper Turbine formats.
- Returns:
All key, vaue pais required for class recreation.
- Return type:
dict
- classmethod from_dict(data: dict)
Maps a data dictionary to an attr-defined class.
TODO: Add an error to ensure that either none or all the parameters are passed in
- Parameters:
data – dict The data dictionary to be mapped.
- Returns:
- cls
The attr-defined class.
- classmethod get_model_defaults() Dict[str, Any]
Produces a dictionary of the keyword arguments and their defaults.
- Returns:
Dictionary of keyword argument: default.
- Return type:
Dict[str, Any]
- hybrid_simulation_outputs(filename: str = '') dict
Creates a dictionary of hybrid simulation outputs
- Parameters:
filename – (optional) if provided dictionary will be saved as a CSV file
- Returns:
Dictionary of hybrid simulation outputs
- property logger
- assign(input_dict: dict)
Assign values from a nested dictionary of values which can be for all technologies in the hybrid plant or for a specific technology:
- Parameters:
input_dict – dict or nested dict If not nested, the keys are the parameter names and the values are the parameter values. All components with the parameters will have their parameter values changed to these new provided values. If a nested dict, the key for the outer dictionary is the name of the component (i.e. “pv”) and the dict value provides all the parameter name-value pairs to assign to the component.
- export()
- Returns:
dictionary of inputs and results for each technology
- class hopp.simulation.hybrid_simulation.TechnologiesConfig(pv: PVConfig | DetailedPVConfig | None = None, wind: WindConfig | None = None, wave: MHKConfig | None = None, tower: TowerConfig | None = None, trough: TroughConfig | None = None, battery: BatteryConfig | BatteryStatelessConfig | None = None, grid: GridConfig | None = None)
Bases:
BaseClassConfiguration class for HybridSimulation.
- Parameters:
pv – PV config. If use_pvwatts is False, uses DetailedPVConfig. Otherwise, defaults to PVConfig
wind – Wind config
wave – Wave config
tower – CSP tower config
trough – CSP trough config
battery – Battery config. If tracking is False, uses BatteryStatelessConfig. Otherwise, defaults to BatteryConfig.
grid – Grid config
- pv: PVConfig | DetailedPVConfig | None
- wind: WindConfig | None
- tower: TowerConfig | None
- trough: TroughConfig | None
- battery: BatteryConfig | BatteryStatelessConfig | None
- grid: GridConfig | None
- classmethod from_dict(data: dict)
Instantiate based on nested input dict.
Overrides parent from_dict to set up child configurations for each technology, before calling parent.
- __init__(pv: PVConfig | DetailedPVConfig | None = None, wind: WindConfig | None = None, wave: MHKConfig | None = None, tower: TowerConfig | None = None, trough: TroughConfig | None = None, battery: BatteryConfig | BatteryStatelessConfig | None = None, grid: GridConfig | None = None) None
Method generated by attrs for class TechnologiesConfig.
- _get_model_dict() dict
Convenience method that wraps the attrs.asdict method. Returns the object’s parameters as a dictionary.
- Returns:
The provided or default, if no input provided, model settings as a dictionary.
- Return type:
dict
- as_dict() dict
Creates a JSON and YAML friendly dictionary that can be save for future reloading. This dictionary will contain only Python types that can later be converted to their proper Turbine formats.
- Returns:
All key, vaue pais required for class recreation.
- Return type:
dict
- classmethod get_model_defaults() Dict[str, Any]
Produces a dictionary of the keyword arguments and their defaults.
- Returns:
Dictionary of keyword argument: default.
- Return type:
Dict[str, Any]
- property logger
- class hopp.simulation.hybrid_simulation.HybridSimulationOutput(power_sources)
Bases:
objectClass for creating
HybridSimulationoutput structure- _keys = ('pv', 'wind', 'wave', 'battery', 'tower', 'trough', 'hybrid')
- __init__(power_sources)
Output structure where attributes are the technology keys used in
HybridSimulationNote
Hybrid results are saved under the
hybridattribute and come from thegridmodel withinHybridSimulation
- create()
Creates an instance using
power_sources- Returns:
new instance of class
- values()
- keys()
- items()