Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
d614b6b
Create Readme.txt
Xinhe-Chen Apr 5, 2022
8294b5b
Merge branch 'main' into dynamic_surrogates
Xinhe-Chen Apr 5, 2022
393b018
Extract data from 64K simulations.
Xinhe-Chen Apr 6, 2022
eede70f
first test result of tslearn package
Xinhe-Chen Apr 20, 2022
ea1d1d7
updated noteboook for visualization
Xinhe-Chen Apr 26, 2022
78f0377
Added only do clustering on dispatch and filter the extreme points cases
Xinhe-Chen May 6, 2022
3b47b78
Add box plots to the jupyter note book
Xinhe-Chen May 17, 2022
eafd275
Modify the notebook to make it more clear
Xinhe-Chen May 17, 2022
9235eb9
Add the mean, median, standard dev for the cluster with most points
Xinhe-Chen May 17, 2022
d42e35c
draft codes for dynamic conceptual design problem
Xinhe-Chen May 31, 2022
ad6cac5
Add fix random state for clustering and improve the notebook for box …
Xinhe-Chen May 31, 2022
3fc5181
delete unnecessary previous files and add TSA-NN surrogate based on s…
Xinhe-Chen Jun 26, 2022
841ef1f
add big csv by git lfs
Xinhe-Chen Jun 26, 2022
24b6904
do not upload the csv files
Xinhe-Chen Jun 27, 2022
a6f5b81
upload large csv file
Xinhe-Chen Jun 27, 2022
a9e9de2
Merge branch 'main' into dynamic_surrogates
Xinhe-Chen Jun 27, 2022
3dcb821
exclude small csv files from lfs
Xinhe-Chen Jun 27, 2022
dd16988
Merge branch 'dynamic_surrogates' of https://github.com/Xinhe-Chen/di…
Xinhe-Chen Jun 27, 2022
c98ca0c
First version of dynamic conceptual design RE case without testing
Xinhe-Chen Jul 14, 2022
14e89d7
fix the package import bugs
Xinhe-Chen Jul 14, 2022
bde9e8e
add keras NN surrogate
Xinhe-Chen Jul 15, 2022
f8eff91
use keras and omlt v1.0
Xinhe-Chen Jul 21, 2022
d396ddd
Merge branch 'main' into dynamic_surrogates
Xinhe-Chen Jul 21, 2022
04248a6
first runnable version but need to change the parameters as scaled
Xinhe-Chen Jul 21, 2022
01ba7ff
add sigmoid activations NN models
Xinhe-Chen Jul 21, 2022
000b0ad
solved infeasibility problem for only rev and fixed ws
Xinhe-Chen Jul 22, 2022
33ac11d
Update on the dynamic conceptual surrogates, detailed log is in the r…
Xinhe-Chen Jul 25, 2022
d613f9f
build model with all surrogates
Xinhe-Chen Aug 26, 2022
a3e7c38
Merge branch 'main' of https://github.com/gmlc-dispatches/dispatches …
Xinhe-Chen Aug 26, 2022
08d2664
updates on surrogates
Xinhe-Chen Aug 30, 2022
f10209e
fix clustering codes error: errors in counting the number of full cap…
Xinhe-Chen Aug 30, 2022
b649250
solve errors in clustering and rerun optimization
Xinhe-Chen Aug 31, 2022
16fc78e
add placeholder for saved Keras models
Xinhe-Chen Aug 31, 2022
ea2da76
updates
Xinhe-Chen Aug 31, 2022
14b8327
more updates
Xinhe-Chen Sep 1, 2022
4216833
analysis of wind pv dispatch data
Xinhe-Chen Sep 3, 2022
99025ed
add notebook for analyze clustering results
Xinhe-Chen Sep 12, 2022
e2f0ec4
reorganize repo, update readme
Xinhe-Chen Sep 13, 2022
78a0fd1
lfs track LMP.csv
Xinhe-Chen Sep 13, 2022
9ee5236
remove lmp.csv
Xinhe-Chen Sep 13, 2022
1e95d24
try to add lmp.csv as large file
Xinhe-Chen Sep 13, 2022
5b676a7
3 try add lmp.csv using lfs
Xinhe-Chen Sep 13, 2022
b3be37a
try to build automation workflow
Xinhe-Chen Sep 15, 2022
9f028a6
progress on automation
Xinhe-Chen Sep 22, 2022
71ec2b0
update automation workflow, successfully in TrainNN.
Xinhe-Chen Sep 28, 2022
5d18f41
Automation workflow prototype
Xinhe-Chen Sep 29, 2022
3f87592
update the automation workflow using composition and fix indent problem
Xinhe-Chen Sep 30, 2022
64db797
update comments and docstings
Xinhe-Chen Sep 30, 2022
79f8ed1
update main function to test on CRC
Xinhe-Chen Sep 30, 2022
5cd443e
fix bugs
Xinhe-Chen Sep 30, 2022
349a895
fix file path issue
Xinhe-Chen Oct 2, 2022
3563631
fix num_clusters bugs in TimeSeriesClustering
Xinhe-Chen Oct 2, 2022
687f26b
fix saving clustering model path errors
Xinhe-Chen Oct 2, 2022
db21ed8
fix an issue from .gitignore that ignores the clustering result path
Xinhe-Chen Oct 2, 2022
3d7555d
fix num_sims bug
Xinhe-Chen Oct 2, 2022
0dadc95
automation workflow
Xinhe-Chen Oct 3, 2022
d69db46
add re surrogate
dguittet Nov 11, 2022
876ccc5
Merge branch 'main' into re_surrogate
dguittet Nov 11, 2022
fc9be7a
update
dguittet Nov 14, 2022
e6b7ad8
RE surrogate running
dguittet Nov 14, 2022
bd81567
RE_surrogate_optimization working
dguittet Nov 14, 2022
a7d3241
fix wind size for opt
dguittet Nov 14, 2022
1210763
Merge remote-tracking branch 'upstream/main' into re_surrogate
dguittet Nov 15, 2022
0bb2874
add wind_PEM_double_loop
dguittet Nov 15, 2022
b96d25c
remove LFS
dguittet Nov 15, 2022
4f51d9a
Revert "remove LFS"
dguittet Nov 15, 2022
a6e1618
fix pem bid
dguittet Nov 16, 2022
3d4106c
update RE_surrogate_optimization
dguittet Nov 17, 2022
22a79a2
update
dguittet Nov 17, 2022
c66c9d5
Merge remote-tracking branch 'upstream/main' into re_surrogate
dguittet Dec 14, 2022
86d2201
update DL runner
dguittet Dec 14, 2022
c390544
update surrogate model
dguittet Dec 14, 2022
933ee0b
Merge branch 're_surrogate' of https://github.com/dguittet/dispatches…
dguittet Dec 14, 2022
8c24da7
update run_double_loop_PEM
dguittet Dec 15, 2022
25d3387
add SurrogateValidation.ipynb
dguittet Dec 15, 2022
b7b4d80
update double loop
dguittet Dec 16, 2022
2aea508
update surrogate_validation
dguittet Dec 19, 2022
6e9ec19
update results comparison
dguittet Dec 19, 2022
d51a2ee
update run_double_loop_PEM
dguittet Jan 10, 2023
67b6d96
Merge branch 're_surrogate' of https://github.com/dguittet/dispatches…
dguittet Jan 10, 2023
3229d4c
Merge remote-tracking branch 'upstream/main' into re_surrogate
dguittet Jan 10, 2023
be4ae0e
Merge branch 're_surrogate' of https://github.com/dguittet/dispatches…
dguittet Jan 10, 2023
247f73a
add comments
dguittet Jan 10, 2023
f271e50
fix tests
dguittet Jan 10, 2023
8908f02
fix notebook check
dguittet Jan 10, 2023
a232f47
test
dguittet Jan 10, 2023
3f5be92
update lfs in CI
dguittet Jan 10, 2023
7f0a420
update .gitattributes
dguittet Jan 10, 2023
65f283c
no lfs for Wind_Thermal_Dispatch.csv
dguittet Jan 10, 2023
0c3b168
update generator params
dguittet Jan 11, 2023
668807a
fix headers
dguittet Jan 11, 2023
ea53550
update setup.py to use temp idaes-pse
dguittet Jan 11, 2023
1181f4a
undo weird stuff
dguittet Jan 12, 2023
21831de
delete
dguittet Jan 12, 2023
0fc7310
delete
dguittet Jan 12, 2023
6d05d38
fix
dguittet Jan 12, 2023
a06e233
lfs
dguittet Jan 12, 2023
b041701
del
dguittet Jan 12, 2023
164274f
update notebooks
dguittet Jan 26, 2023
20001b7
update notebooks
dguittet Jan 26, 2023
e0a0bb8
subscenario
dguittet Feb 2, 2023
00d7ef6
modify load_parameters
dguittet Feb 15, 2023
345f512
add steadystate optimization
dguittet Mar 28, 2023
03c919a
Merge branch 're_surrogate_opt'
dguittet Apr 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Dispatch_shuffled_data_0.csv filter=lfs diff=lfs merge=lfs -text
LMP_shuffled_data_0.csv filter=lfs diff=lfs merge=lfs -text

*.csv filter=lfs diff=lfs merge=lfs -text

Wind_Thermal_Dispatch.csv filter= diff= merge= text
4 changes: 4 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
cov-report: true
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
wind_mw,batt_mw,pem_mw,tank_kgH2,turb_mw,annual_rev_h2,annual_rev_E,NPV,h2_price,ts,total_run_time,ipopt_its,ipopt_time
200.0,418.55049856327975,2.453109617056948e-05,0.003228349658681,4.7671678628332326e-05,-56.93330430442413,54454708.39939764,337142802.80170757,2.0,168.0,170.26051440655,825.0,118.40299999999999
200.0,361.19145492018225,13.48132343971299,0.0032289621704803336,4.724060081940249e-05,4631154.926623091,46886642.882782556,338728346.11500645,2.5,168.0,330.1094942523371,864.3333333333334,128.316
200.0,164.90605583013854,82.44383439370556,0.0029288779900865005,4.710715122103761e-05,28341388.348529153,18143148.917589255,384275604.1199885,3.0,168.0,363.3768920520031,1154.0,172.748
200.0,321.0346115356017,8.664398396682618e-05,0.006165807657409,5.055681203736526e-05,-39.916104648839585,44154327.31057402,295384477.9357557,2.0,365.0,439.01025544366667,981.0,334.545
200.0,208.76219338530842,38.944274525803976,0.006169195325287,4.951394820507631e-05,12694084.46487706,27430110.149416827,304509581.50052625,2.5,365.0,899.8411130800378,916.0,321.452
200.0,120.75795984442475,83.96875010676447,0.006166749900308001,4.915220413730238e-05,28645323.568246476,13148080.043751694,362455165.029901,3.0,365.0,1013.0490448530763,881.0,323.145
200.0,143.1552877092944,0.0005955570896626668,0.012080883728672333,5.650571344174596e-05,99.39527189349951,22956743.947841525,182086048.88491046,2.0,730.0,613.7085285423333,675.3333333333334,423.30300000000005
200.0,92.43463710876708,58.1648107605309,0.012073570605257001,5.4033102549598265e-05,17070196.952769265,9481560.991259497,203557782.23581663,2.5,730.0,1898.6466496909852,764.0,633.397
200.0,22.20712419178993,110.90564724285841,0.012028300498436001,5.300936790950896e-05,33684777.750834756,-2737996.9920016364,269611304.5710242,3.0,730.0,2599.142369018984,1094.0,1021.364
200.0,498.67121606483556,0.00019897521009900002,0.036630761472648335,0.00012922929647666667,-39.74454714509891,69031470.78202595,465694595.8213479,2.0,2190.0,3189.651579901667,1238.6666666666667,2594.2239999999997
200.0,498.66930360772693,0.000603047786887,0.036650516099881,8.444518671390059e-05,89.60649147772652,69031222.66486628,465694446.14941394,2.5,2190.0,7486.272926742036,1404.0,4321.006
200.0,463.9208907227657,13.48124041390044,0.036619672464520005,7.151373528647054e-05,4463194.782620118,63514022.613378815,469170532.7567904,3.0,2190.0,9802.36950073298,1783.0,5854.147
200.0,330.58559725752554,0.0033960858283070003,0.073680027248996,0.000135800064769,985.208072409368,50942612.73691359,388573106.7358585,2.5,4380.0,14110.997642497008,1533.0,7494.941000000001
200.0,118.4388,37.9098,0.1515,0.0001835,12095933.0,17860958.0,257857205.0,3.0,8736.0,78347.0,2607.0,68485.542
version https://git-lfs.github.com/spec/v1
oid sha256:cc015753af478334b21145f8f8b029079d1c17384aaa39a788f3bd84128b69a6
size 2712
8,740 changes: 3 additions & 8,737 deletions dispatches/case_studies/renewables_case/data/309_WIND_1-SimulationOutputs.csv

Large diffs are not rendered by default.

28 changes: 12 additions & 16 deletions dispatches/case_studies/renewables_case/load_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,23 @@

df = df[df.index.isin(ix)]

bus = "309"
market = "DA"
prices = df[f"{bus}_{market}LMP"].values
bus = "303"
market = "Both"
if market == "Both":
prices = np.max((df[f"{bus}_DALMP"].values, df[f"{bus}_RTLMP"].values), axis=0)
else:
prices = df[f"{bus}_{market}LMP"].values
prices_used = copy.copy(prices)
prices_used[prices_used > 200] = 200
# prices_used[prices_used > 200] = 200
weekly_prices = prices_used.reshape(52, 168)
# n_time_points = 7 * 24

n_timesteps = len(prices)

wind_cfs = df[f"{bus}_WIND_1-{market}CF"].values
if market == "Both":
wind_cfs = df[f"{bus}_WIND_1-RTCF"].values
else:
wind_cfs = df[f"{bus}_WIND_1-{market}CF"].values

wind_capacity_factors = {t:
{'wind_resource_config': {
Expand All @@ -98,16 +104,6 @@
N = 30 # years
PA = ((1+i)**N - 1)/(i*(1+i)**N) # present value / annuity = 1 / CRF

# wind resource data from example Wind Toolkit file
wind_data = SRW_to_wind_data(re_case_dir / 'data' / '44.21_-101.94_windtoolkit_2012_60min_80m.srw')
wind_speeds = [wind_data['data'][i][2] for i in range(8760)]

wind_resource = {t:
{'wind_resource_config': {
'resource_speed': [wind_speeds[t]]
}
} for t in range(8760)}

default_input_params = {
"wind_mw": fixed_wind_mw,
"wind_mw_ub": wind_mw_ub,
Expand All @@ -119,7 +115,7 @@
"tank_type": "simple",
"turb_mw": turb_p_mw,

"wind_resource": wind_resource,
"wind_resource": wind_capacity_factors,
"h2_price_per_kg": h2_price_per_kg,
"DA_LMPs": prices_used,

Expand Down
3 changes: 3 additions & 0 deletions dispatches/case_studies/renewables_case/surrogate_results.csv
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def wind_battery_pem_optimize(time_points, input_params=default_input_params, ve
for blk in blks:
if not input_params['extant_wind']:
blk.fs.windpower.system_capacity.unfix()
else:
m.wind_system_capacity.fix(input_params['wind_mw'] * 1e3)
blk.fs.battery.nameplate_power.unfix()
else:
m.pem_system_capacity.fix(input_params['pem_mw'] * 1e3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import pandas as pd
from collections import deque
from functools import partial
from dispatches.case_studies.renewables_case.load_parameters import wind_speeds


def create_multiperiod_wind_battery_model(n_time_points, wind_cfs, input_params):
Expand Down
Loading