Skip to content

Conversation

@dguittet
Copy link
Collaborator

@dguittet dguittet commented Mar 9, 2022

No description provided.

barker59 and others added 30 commits January 8, 2021 07:55
dguittet and others added 26 commits May 3, 2022 10:32
* updating custom_wind_module for floris_v3

* Update requirements.txt

Co-authored-by: Darice L Guittet <darice.guittet@nrel.gov>
* fix some battery inputs for pysam v2.2.4

* fix om_expense outputs

* More clustering updates: Limiting price outliers, updating collection of csp results in arrays

* fix warning with log_name

* remove construction financing and add depreciation and debt

* fix test results

* Changing default inputs for storage incentive and time weighting factor

* Adding initial charge state heursitics to clustering

* Adding separate wind resource data streams for solar/wind technologies in clustering

* Integrating clustering into hybrid simulations

* Updating CSP performance models to use price from site

* Cleaning up unused functions in clustering

* Updating default battery initial state in clustering

* Reverting back to single performance/financial simulation for pv/wind

* Reverting back to single performance/financial simulation for grid

* added cbc solver

Linux and OSx need to conda-forge coincbc.
Windows need the executable for CBC (can be found on AMPL website).

* updated annual energy to kwh

Updated test values for troughs

* update to get_cp_htf

added is_tes for trough system with different TES and field fluids

* Updating 'daylight' hours in clustering to use a clearsky DNI cutoff instead of sunrise/sunset

* Removing clustering file output for debugging

* update csp dispatch cost parameters

* csv cache

added code to write cache file to csv files

* clean up result files

* clean up more result files

* Updated hybrid_outputs function to include save to file option

* Fixing minor bug in price profile used for csp

* Adding optional user-defined timeout limit for cbc solver

* Fixing bug in user-defined clustering weights

* set up ssc to run once at the beginning of simulation to get cycle efficiency tables and forecast thermal energy generation

- moved set_weather() call to csp_source class init to remove it being call for both tower and trough
- increased cbc time limit from 10 to 20 seconds to be consistent with GLPK
- updated test expected values
       - csp dispatch objectives change due to previous commit changing default objective cost parameters
       - trough outputs change due to updated ssc model's predictions on thermal energy generation for dispatch

* added back hybrid_outputs and rename updated function to hybrid_simulation_outputs

This was done due to hybrid_outputs is being used by test_run_hopp_calc.py and it would require a bit of work to use the updated function.

* added a solver_options input to dispatch options

* fixed poor default value for solver operations which causes test to fail

* update .gitignore

* fix battery financials for new version

* add battery replacement output

* fixing test_tower_with_dispatch_model test

- test was failing due to field optimization returning slightly different results on Linux compared to Windows
- removed unnecessary initialize_params tower specific method

* remove taxes from grid_dispatch.py

* fix test results

* fix test results

* adding fix to allow simulate to be called multiple times

* adding cbc solver for windows systems

* adding is_dispatch_targets boolean to trough defaults

* Update ci.yml

* fix test results

* Remove tower outputs from optimization problem output

* fix test results

* fix test results

* Updating csp initial states for simulations using clustering

* Adding initial charge state for battery with clustering

* modify solar PTC, add location from paper

* weight hybrid financials by production or cost ratio or evenly; add tax incentives output

* update tests

* fix tests

* add pv_charging_only to dispatch options for ITC qualification

* fix battery financial simulation to not run if 0 battery

* fix test results

* use power_sources for system_capacity_kw property

* rename solar files in Docs to pv

* add battery.rst

* updated dispatch models to not pass cost of generation through ports

This is done by directly calling specific model parameters in the building of the hybrid objective.

* Update ci.yml

* Update alt_dev docs

* Initialize new branch with basic running simulation

* Updating default weights for clustering for CSP, CSP-PV and CSP-PV-Battery cases

* Scaling heliostat size and startup/tracking power to capacity

* Adding optional tube size scaling with capacity in csp tower model

* Add capacity credit calculations for each submodel

* Add capacity payment calculation for entire hybrid system

* update caching and output

* adding tes tank heater and tank height scale

-heater power is scaled linearly based on defaults
-tank height is scale to maintain constant aspect ratio (h/d) of the active tank space which does not include min tank level

* updated capacity credit to work for both trough and tower

- hacked PV system_capacity_kw to represent AC power and not DC power

* fixed tests

* added sim option to calculate capacity credit with and without available storage

* added capacity hour array to site info class

* updates to CSP PV case study

set up capacity payments
set up variables to sample across

* update driver exception handling

* Remove cache_file references

* Add gurobi option for dispatch solver

* jupyter stubs

* Update run_alt.py

* updates to capacity payment script

- update to 'hybrid_simulation_outputs()' for capacity credit
- moved simulate() and calc_capacity_credit_precent() up in power_source

* fixed capacity credit calculation

- warning caused by dividing a length of zero

* Update simple_CSP_PV_simulate.py

* fixing boolean for using storage in capacity credit calculation

* Add opt_problem options

* bug fixes

* capacity credit based on gross power

-fixed system_pre_curtailment_kwac in power source that ended up being 8760*project_life*project_life

* updated bool for capacity credit

* Update simple_CSP_PV_simulate.py

* fixed hybrid simulation output function to include hybrid outputs

-fixed grid capacity_factoer_curtailment_ac property

* server changes to case study sript

* Add candidate to cache entry

* Added BCR breakdown printout

* updated grid capacity credit to use interconnect limit for capacity payments

* Minor updates to capacity credit calculations

* added tower receiver cost scale based on thermal rating

* added tes_capacity property

* fixed bug with calculation of capacity-based O&M

- caused by setting grid system_capcity_kw to interconnect limit
- updated hybrid capacity credit to be compatible with hybrid capacity and not interconnect limit. updates after simulate for reporting

* added 2030 SETO targets

* More capacity payment updates to fix CSP vs hybrid inconsistencies

* Fixing bugs in battery financials created by last commit

* updated simulate script, capacity payment amount, and SETO targets for tower and receiver ref. cost.

* updated tests

* updated financial parameters and SETO targets

* fixing battery replacement cost inputs

-required to set batt_computed_bank_capacity within simulate_financials() for the battery

* setting battery power based on cycle power

* reformulation of grid dispatch model

- Reformulated grid dispatch model to allow for both generation and load transmission limits
- Removed constraints used to calculate terms in the objective (now calculating directly in the objective)
- Updated sales and purchases property calls to do the calculation when getting values

* added desired schedule option to dispatch model

System can only dispatch during a desired schedule provided by the user within SiteInfo

* fixed battery dispatch maximum power

-updated battery lifecycle cost based on SAM values
-updated capacity_price property
-updated dispatch tests based on new battery lifecycle cost

* post analysis updates

* updating dispatch default solver to cbc

* adding a dispatch test for setting a desired schedule for the system

-added a check on the schedule has to be less than the transmission limit

* updating grid dispatch model

- this updated formulation enables faster solution times  with the open-source solvers compared to the replaced formulation

* adding csp, pv, battery dispatch plotting tool

this should be integrated more closely with hybrid simulation class

* adding tower and trough to RTD

* fixed tests

* Update parallel optimize convention

* updated csp dispatch model

-added constraint on TES for periods when the cycle is operating and the receiver is starting up to ensure SSC doesn't 'trip' due to insufficient TES inventory
-added constraint to cycle thermal during periods of cycle start-up to derate cycle power during periods of start-up. This is to disincentivize cycle starting up during periods of high value.

* started xpress solver for HOPP

- waiting on license for testing

* fixing tests

* Update locations.py

* updates to battery dispatch

-added lifecycle cost to objective function
-reduced default round-trip efficiency in dispatch model
-reduced default lifecycle cost based on SAM output

* Xpress solver is working with HOPP

-Requires Xpress install based on: https://github.nrel.gov/dkrishna/fico-xpress
-Requires Xpress Python bindings:
pip install "xpress<8.13"

* fixed CSP-only and hybrid model to align

-set constuction financing costs to zero (consistent with other technologies
-set hybrid capacity based on CSP cycle net

* Update hybrid_dispatch_builder_solver.py

* added Xpress persistent solver interface

This interface provides a small improve compared to the 'xpress' interface.

* fixed CSP curtailment issue

* minor changes to CSP-PV example script

* removed tower receiver cost per kWt

This does not work type of cost scaling does not work with SolarPILOT's optimization.

* updated write_cache to allow partial functions

for problem setup, simulation setup, and evaluate objective.

* updated solar resource to allow for relative humidity

* Commented out dispatchable power constraint

Future work: generalize a method to pass in constraints and call them during optimization iterations

* added minimize operating cost objective

used for with a desired schedule is provided

* added some outputs for desired schedule analysis

* fixing LCOE reporting units

* added desired schedule to result of optimization problem

* adding a method to set CSP dispatch objective costs

* fixed missed load calculation

added npv_annual_costs to result outputs

* added missed load and schedule curtailment to outputs

* fixed annual costs outputs

* update desired schedule dispatch

incentivized battery charging and TES charging to always charge if possible to meet schedule

* making lifecycle cost mutable

This value can now be changed between hybrid simulation initialization and simulation.

* updated dispatch plotting to test desired schedule

* Patching trough model dispatch

SSC trough model will sometimes hang when setting pc thermal max to the target value

* updated daotk ssc library

- this fixes the trough case where SSC will hang
- Need to update libraries for other OS

* Reporting missed load and schedule curtailed as percentage

* Updated code documentation

- Removed unnecessary tower and trough default files
- Trough model now calculates installed cost based on SSC inputs, rather than default file
- Added a default dispatch factors files in grid resource files

* updated tests

* Delete mindtpy_test.py

Test was not useful and not needed

* fixed path for default electricity prices file

* Updated electricity test prices path for tests

* Update test_hybrid.py

* update release notes

* update to plotting tool and CSP-PV example

* Update version.py

* added CBC solver to package data

* Fixing calculations with clustering to work with recent commits, and to fill in annual data arrays needed for capacity credit calculations

* Update csp_pv_battery_plot.py

* update requirements-dev.txt

* update requirements-dev.txt

* dlib comment out from requirements.txt

* update requirements-dev.txt

* update requirements-dev.txt

* fix indenting

* fixing documentation warnings

* adding launch.json to gitignore list

* added site info documentation

* added site info attributes to docstring

* updated calc_capacity_credit_percent to use class attrs

* updated hybrid_simulation

-annual_energy_kw to kwh
-moved tower and battery initialization

* added no_solar to site to skip solar resource download

similar to no_wind

* added nominalized grid pricing files

* updated default grid prices to singleowner default

* updated hybrid simulation

cleaned up code due to merge
removed repeated financial model code

* updated battery dispatch costs

these should be accessible and mutable.
previously, these were linked to variable cost which the default value changed in pySAM 3.0.0

* updated dispatch tests

-PV generation changed slightly due to pySAM 3
-Battery dispatch results changed due to operating cost change
-Removed 'grid' as input to HybridSimulation
-ppa_price added to some test because default prices are now relative (normalized)

* clean up of dispatch builder and solver

-removed most of duplicate code

* Update test_csp.py

- update due to default grid prices in HOPP changing to the default singleowner normalized schedule.

* cleaning up system model set up

-moved tech specific setup to an overload function called "setup_performance_model" within power_source this is required for the CSP and battery models .
-removed zero testing when technology is not within the hybrid system

* cleaned up hybrid simulation

- added methods documentation
- created a function for grid simulation
- moved dispatch if statement into simulate_power of the dispatch builder solver class
- removed duplicated code in simulate functions

* Merge changes from merge_H2

* Add clustering tests and fix small clustering bug

* Update test_hybrid.py

removed 'grid' in technologies dictionary

* updating CSP tests to used fixed weather file

updated weather files used by H2 tests to include pressure and dew point to be CSP compatible

* updated hybrid tests

csp, om, and tax tests. test_wind_pv_with_storage_dispatch is still failing and requires a deeper dive

* removed duplicate simulate function in power source

* Update test_hybrid.py

Test values changed because of the following:
- PySAM update (pv and wind generation)
- Battery / Grid dispatch updates (battery generation)
- Default TOD factors changed (NPV, Rev)

* Fix wind resource parameter test

* renamed daggett_ca weather file

-removed daggett_ca from weather file to be consistent with API and enable resource_loader_files.py not to fail
-removed Rice data files to ensure resource_loader_files.py doesn't fail

* Update solar_resource.py

Changed pressure to an optional input. However, pressure is required for CSP models

* Updated H2 tests

Test values updated for the following reasons:
- PV model produces slightly different results when weather file contains pressure and dew point temperature
- Default TOD are different causing system revenue and NPV to change

* Fix wind file reader

* Add more clustering weights and divisions tests

* Fix equivalency warning

* Make test_annual_array_from_cluster_exemplars more robust

* Add clustering tests that compare to true values

* Add pysam-stubs to requirements file

* Merge branch merge_H2

* fix test_run_hopp_calc for modified solar resource file

* moved hopp_for_h2_test_results.csv

- test_all_hybrid_calcs was deleting result folder and expected results for test_hopp_for_h2
- set flicker_mismatch run_parallel to skip for now

* Adding back flicker mismatch tests

* Revert "Adding back flicker mismatch tests"

This reverts commit 4a7243a.

* adding data file for clustering tests

* Revert "fix test_run_hopp_calc for modified solar resource file"

This reverts commit f20930e.

* Update test_clustering.py

day_of_year attr not supported on python 3.6

* turn on test_single_turbine

* turn on test_single_turbine_multiple_angles

* test_flicker_mismatch

* skip flicker tests if win

* add reason to skipif

* update test_flicker_mismatch

Co-authored-by: jannamartinek <janna.martinek@nrel.gov>
Co-authored-by: WHamilt2 <william.hamilton@nrel.gov>
Co-authored-by: jlcox119 <50842233+jlcox119@users.noreply.github.com>
Co-authored-by: Matthew Boyd <mr.matthew.boyd@gmail.com>
Co-authored-by: William Hamilton <34353104+qualand@users.noreply.github.com>
Co-authored-by: Hamilton <WHamilt2@nrel.gov>
@dguittet dguittet merged commit 3fdd4f1 into master May 21, 2022
@dguittet dguittet deleted the merge_H2 branch May 21, 2022 03:14
@dguittet dguittet restored the merge_H2 branch May 21, 2022 16:08
dguittet pushed a commit that referenced this pull request Sep 1, 2023
update test_wave.py for recent changes in dev/refactor
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.

6 participants