Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - we3lab/flex-limits: A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads. · GitHub
Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - we3lab/flex-limits: A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads. · GitHub
Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - we3lab/flex-limits: A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads. · GitHub
Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - we3lab/flex-limits: A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads. · GitHub
Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - we3lab/flex-limits: A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads. · GitHub
Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - we3lab/flex-limits: A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads. · GitHub
Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - we3lab/flex-limits: A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads. · GitHub
Skip to content

Latest commit

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

flex-limits

This repository contains analysis to estimate the upper bound of benefits from energy flexibility with a particular focus on industrial loads.

Installation instructions

Navigate to your desired directory and run the following from the command line interface:

  1. Clone the repository
git clone https://github.com/we3lab/flex-limits.git
  1. Install packages
python setup.py install

Cite this work

To cite this work, use the "Cite this repository" feature available on the right side of this repository page. Please reference the appropriate references from the list below:

For work related to calculating the upper bounds of benefits from flexible operation:

Rao, A. K., Chapin, F.T., Musabandesu, E., Sakthivelu, A., Tucker, C.I., Wettermark, D., Mauter, M.S. How much can we save? Upper bound cost and emissions benefits from commercial and industrial load flexibility. Under Review. https://arxiv.org/abs/2511.14928

For work related to characterizing energy flexibility performance:

Rao, A. K., Bolorinos, J., Musabandesu, E., Chapin, F. T., & Mauter, M. S. (2024). Valuing energy flexibility from water systems. Nature Water, 2(10), 1028-1037.

For work that uses the parameterization of tariffs:

Chapin, F. T., Bolorinos, J., & Mauter, M. S. (2024). Electricity and natural gas tariffs at United States wastewater treatment plants. Scientific Data, 11(1), 113.

Overview of this repository

flex_limits
|- analysis
|- data
|- models
|- paper_figures

analysis: Contains functions and classes that are used to run different analysis using the flexloadMILP model.

  • acc_curve.py: Computes the pareto curve between cost and emissions optimal objectives.
  • emissionscost.py: Calculates the shadow cost of emissions abatement.
  • energy_capacity.py: Evaluates the effect energy capacity as a function of uptime, power capacity, and RTE.
  • maxsavings.py: Computes the maximum savings given energy flexibility characteristics and a region/month.
  • overlay_costs.py: Calculates effective renewable energy credit prices + overlays that with the SCC on plots.
  • pricesignal.py: Loads and reformats timeseries data from the data folder. Also generates synthetic time-varying baseload profiles via synthetic_baseload.
  • rte_analysis.py: Calculates the effect of RTE<1 on the savings.
  • shadowcost.py: Similar to emissionscost, an alternative method of calculating the shadow cost of emissions abatement.
  • tariff_features.py: Extracts the rate structure of a tariff — how many demand and energy charges it has, whether its demand charges are coincident, how much price variation it offers — and itemizes the bill an inflexible load would pay under it. Pure cost evaluation via eeco, no optimization.

data: Contains cleaned data on electricity prices and emissions.

  • aef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • dam/: folder not available. Day ahead market prices are excluded from the public repository but can be found via GridStatus.
  • mef/: contains data on average emissions factors, sorted by region in month-hour-average format.
  • offsets/: contains information on estimates of renewable energy credit pricing and projections for the social cost of carbon.
  • tariff/: contains data on retail electricity tariffs (rate structures). An example is chosen for each region that is suitable for a 1MW load. A full list of tariffs is contained in the subfolder bundled/. A maintained list of industrial tariffs can be found in this dataset.
  • tariff_wwtp/: a subset of the tariff/bundled/ folder that was used in an initial study of electricity rates in the water sector.

models: Contains a model file that represents the flexible load and is used for analysis.

  • flexload_milp.py: contains the flexloadMILP class which builds a pyomo optimization model constrained based on the flexibility characteristics.

paper_figures: Contains all code, figures, and data associated with figures in the published manuscript.

  • code/:
    • acc_curve_wholesale_vs_tariff.py: used to plot the pareto optimal curve between cost and emissions objectives. Manuscript figure 4.
    • colorscheme.json: Colors to be used across all plots.
    • designspace_plot.py: Used to map the uptime-power capacity space and plot example systems. Manuscript figure 1.
    • energy_capacity_analysis.py: Visualizes the effect energy capacity as a function of uptime, power capacity, and RTE.
    • marginal_abatement_cost.py: diagnostic that reads the same pareto curves as acc_curve_wholesale_vs_tariff.py and reports the cost of abatement at each point. It writes no figures — manuscript figures 4 c,d are the lower row of the 2x2 panel produced by acc_curve_wholesale_vs_tariff.py.
    • maxsavings_boxplot.py: plots the box plot associated with the range of savings from optimal flexibility. Manuscript figure 3.
    • maxsavings_contour.py: plots the maximum savings as a function of uptime and power capacity. Manuscript figure 2.
    • rte_analysis.py: plots the effects of RTE<1 on the maximum savings.
    • shadowcosttariff_violinplot.py: plots the cost of abatement associated with flexibility when considering tariff electricity pricing. Manuscript figure 5b.
    • tariff_cluster_analysis.py: clusters the bundled tariffs by rate structure and compares how much value a flexible load extracts from each archetype. Supporting information. Runs no optimization — it reuses the cost_optimal_cost_usd already solved in processed_data/shadowcost_tariff_mef/ and pairs it with an inflexible reference bill obtained by evaluating each tariff against a flat 1 MW load.
    • timevarying_baseload_example.py: plots an example of optimally flexible operation of a time-varying baseload against the day-ahead market price signal, alongside the power capacity band.
    • shadowcostwholesale_boxplot.py: plots the cost of abatement associated with flexibility when considering day-ahead market electricity pricing. Manuscript figure 5a.
  • figures/: contains subfolders for 3 supported image file types: pdf, svg, and png. The top level of each holds only the manuscript figures; supporting-information figures go to figures/SI/{pdf,svg,png}/, and retired or superseded renders go to figures/ARCHIVE/. Scripts pick their destination through code/figpaths.py::figure_dir, so a figure moves between the two by flipping one si= argument rather than by being copied around. Where a supporting figure needs more explanation than its axes can carry, the caption text sits beside the renders as figures/SI/<figure_name>_caption.md — see figures/SI/tariff_cluster_analysis_caption.md.
  • processed_data/: Contains data associated with each of the figures/. processed_data/ARCHIVE/README.md records which generated datasets are current, which are retired and why, and the cheap regression tests used to tell them apart — read it before rebuilding a figure from anything in here.

Funding Acknowledgements

This work is being conducted as part of the National Alliance for Water Innovation (NAWI) with support through the U.S. Department of Energy’s Advanced Manufacturing Office.

About

A repository used to calculate the upper bound of savings from energy flexibility with a particular focus on industrial loads.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages