mirror of https://github.com/ANL-CEEESA/RELOG.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
26 KiB
96 lines
26 KiB
<!DOCTYPE html>
|
|
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Simplified Solution Reports · RELOG</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">RELOG</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../usage/">Usage</a></li><li><a class="tocitem" href="../format/">Input and Output Data Formats</a></li><li class="is-active"><a class="tocitem" href>Simplified Solution Reports</a><ul class="internal"><li><a class="tocitem" href="#Plants-report"><span>Plants report</span></a></li><li><a class="tocitem" href="#Plant-outputs-report"><span>Plant outputs report</span></a></li><li><a class="tocitem" href="#Plant-emissions-report"><span>Plant emissions report</span></a></li><li><a class="tocitem" href="#Products-report"><span>Products report</span></a></li><li><a class="tocitem" href="#Transportation-report"><span>Transportation report</span></a></li><li><a class="tocitem" href="#Transportation-emissions-report"><span>Transportation emissions report</span></a></li></ul></li><li><a class="tocitem" href="../model/">Optimization Model</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Simplified Solution Reports</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Simplified Solution Reports</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/ANL-CEEESA/RELOG/blob/master/docs/src/reports.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Simplified-Solution-Reports"><a class="docs-heading-anchor" href="#Simplified-Solution-Reports">Simplified Solution Reports</a><a id="Simplified-Solution-Reports-1"></a><a class="docs-heading-anchor-permalink" href="#Simplified-Solution-Reports" title="Permalink"></a></h1><p>In addition to the full output format described in <a href="../format/">data formats</a>, RELOG can also generate a number of simplified reports in tabular data format (CSV), which can be more easily processed by spreadsheet software (such as Microsoft Excel), by data analysis libraries (such as Pandas) or by relational databases (such as SQLite).</p><p>In this page, we also illustrate what types of charts and visualizations can be produced from these tabular data files. The sample charts have been produced using Python, matplotlib, seaborn and geopandas.</p><h2 id="Plants-report"><a class="docs-heading-anchor" href="#Plants-report">Plants report</a><a id="Plants-report-1"></a><a class="docs-heading-anchor-permalink" href="#Plants-report" title="Permalink"></a></h2><p>Report showing plant costs, capacities, energy expenditure and utilization factors. Generated by <code>RELOG.write_plants_report(solution, filename)</code>.</p><table><tr><th style="text-align: left">Column</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>plant type</code></td><td style="text-align: left">Plant type.</td></tr><tr><td style="text-align: left"><code>location name</code></td><td style="text-align: left">Location name.</td></tr><tr><td style="text-align: left"><code>year</code></td><td style="text-align: left">What year this row corresponds to. This reports includes one row for each year.</td></tr><tr><td style="text-align: left"><code>latitude (deg)</code></td><td style="text-align: left">Latitude of the plant.</td></tr><tr><td style="text-align: left"><code>longitude (deg)</code></td><td style="text-align: left">Longitude of the plant.</td></tr><tr><td style="text-align: left"><code>capacity (tonne)</code></td><td style="text-align: left">Capacity of the plant at this point in time.</td></tr><tr><td style="text-align: left"><code>amount received (tonne)</code></td><td style="text-align: left">Amount of input material received by the plant this year.</td></tr><tr><td style="text-align: left"><code>amount processed (tonne)</code></td><td style="text-align: left">Amount of input material processed by the plant this year.</td></tr><tr><td style="text-align: left"><code>amount in storage (tonne)</code></td><td style="text-align: left">Amount of input material in storage at the end of the year.</td></tr><tr><td style="text-align: left"><code>utilization factor (%)</code></td><td style="text-align: left">Amount processed by the plant this year divided by current plant capacity.</td></tr><tr><td style="text-align: left"><code>energy (GJ)</code></td><td style="text-align: left">Amount of energy expended by the plant this year.</td></tr><tr><td style="text-align: left"><code>opening cost ($)</code></td><td style="text-align: left">Amount spent opening the plant. This value is only positive if the plant became operational this year.</td></tr><tr><td style="text-align: left"><code>expansion cost ($)</code></td><td style="text-align: left">Amount spent this year expanding the plant capacity.</td></tr><tr><td style="text-align: left"><code>fixed operating cost ($)</code></td><td style="text-align: left">Amount spent for keeping the plant operational this year.</td></tr><tr><td style="text-align: left"><code>variable operating cost ($)</code></td><td style="text-align: left">Amount spent this year to process the input material.</td></tr><tr><td style="text-align: left"><code>storage cost ($)</code></td><td style="text-align: left">Amount spent this year on storage.</td></tr><tr><td style="text-align: left"><code>total cost ($)</code></td><td style="text-align: left">Sum of all previous plant costs.</td></tr></table><h3 id="Sample-charts"><a class="docs-heading-anchor" href="#Sample-charts">Sample charts</a><a id="Sample-charts-1"></a><a class="docs-heading-anchor-permalink" href="#Sample-charts" title="Permalink"></a></h3><ul><li>Bar plot with total plant costs per year, grouped by plant type (in Python):</li></ul><pre><code class="language-python hljs">import pandas as pd
|
|
import seaborn as sns; sns.set()
|
|
|
|
data = pd.read_csv("plants_report.csv")
|
|
sns.barplot(x="year",
|
|
y="total cost ($)",
|
|
hue="plant type",
|
|
data=data.groupby(["plant type", "year"])
|
|
.sum()
|
|
.reset_index());</code></pre><img src="../assets/ex_plant_cost_per_year.png" width="500px"/><ul><li>Map showing plant locations (in Python):</li></ul><pre><code class="language-python hljs">import pandas as pd
|
|
import geopandas as gp
|
|
|
|
# Plot base map
|
|
world = gp.read_file(gp.datasets.get_path('naturalearth_lowres'))
|
|
ax = world.plot(color='white', edgecolor='50', figsize=(13,6))
|
|
ax.set_ylim([23, 50])
|
|
ax.set_xlim([-128, -65])
|
|
|
|
# Plot plant locations
|
|
data = pd.read_csv("nimh_plants.csv")
|
|
points = gp.points_from_xy(data["longitude (deg)"],
|
|
data["latitude (deg)"])
|
|
gp.GeoDataFrame(data, geometry=points).plot(ax=ax);</code></pre><img src="../assets/ex_plant_locations.png" width="1000px"/><h2 id="Plant-outputs-report"><a class="docs-heading-anchor" href="#Plant-outputs-report">Plant outputs report</a><a id="Plant-outputs-report-1"></a><a class="docs-heading-anchor-permalink" href="#Plant-outputs-report" title="Permalink"></a></h2><p>Report showing amount of products produced, sent and disposed of by each plant, as well as disposal costs. Generated by <code>RELOG.write_plant_outputs_report(solution, filename)</code>.</p><table><tr><th style="text-align: left">Column</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>plant type</code></td><td style="text-align: left">Plant type.</td></tr><tr><td style="text-align: left"><code>location name</code></td><td style="text-align: left">Location name.</td></tr><tr><td style="text-align: left"><code>year</code></td><td style="text-align: left">What year this row corresponds to. This reports includes one row for each year.</td></tr><tr><td style="text-align: left"><code>product name</code></td><td style="text-align: left">Product being produced.</td></tr><tr><td style="text-align: left"><code>amount produced (tonne)</code></td><td style="text-align: left">Amount of product produced this year.</td></tr><tr><td style="text-align: left"><code>amount sent (tonne)</code></td><td style="text-align: left">Amount of product produced by this plant and sent to another plant for further processing this year.</td></tr><tr><td style="text-align: left"><code>amount disposed (tonne)</code></td><td style="text-align: left">Amount produced produced by this plant and immediately disposed of locally this year.</td></tr><tr><td style="text-align: left"><code>disposal cost ($)</code></td><td style="text-align: left">Disposal cost for this year.</td></tr></table><h3 id="Sample-charts-2"><a class="docs-heading-anchor" href="#Sample-charts-2">Sample charts</a><a class="docs-heading-anchor-permalink" href="#Sample-charts-2" title="Permalink"></a></h3><ul><li>Bar plot showing total amount produced for each product, grouped by year (in Python):</li></ul><pre><code class="language-python hljs">import pandas as pd
|
|
import seaborn as sns; sns.set()
|
|
|
|
data = pd.read_csv("plant_outputs_report.csv")
|
|
sns.barplot(x="amount produced (tonne)",
|
|
y="product name",
|
|
hue="year",
|
|
data=data.groupby(["product name", "year"])
|
|
.sum()
|
|
.reset_index());</code></pre><img src="../assets/ex_amount_produced.png" width="500px"/><h2 id="Plant-emissions-report"><a class="docs-heading-anchor" href="#Plant-emissions-report">Plant emissions report</a><a id="Plant-emissions-report-1"></a><a class="docs-heading-anchor-permalink" href="#Plant-emissions-report" title="Permalink"></a></h2><p>Report showing amount of emissions produced by each plant. Generated by <code>RELOG.write_plant_emissions_report(solution, filename)</code>.</p><table><tr><th style="text-align: left">Column</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>plant type</code></td><td style="text-align: left">Plant type.</td></tr><tr><td style="text-align: left"><code>location name</code></td><td style="text-align: left">Location name.</td></tr><tr><td style="text-align: left"><code>year</code></td><td style="text-align: left">Year.</td></tr><tr><td style="text-align: left"><code>emission type</code></td><td style="text-align: left">Type of emission.</td></tr><tr><td style="text-align: left"><code>amount (tonne)</code></td><td style="text-align: left">Amount of emission produced by the plant this year.</td></tr></table><h3 id="Sample-charts-3"><a class="docs-heading-anchor" href="#Sample-charts-3">Sample charts</a><a class="docs-heading-anchor-permalink" href="#Sample-charts-3" title="Permalink"></a></h3><ul><li>Bar plot showing total emission by plant type, grouped type of emissions (in Python):</li></ul><pre><code class="language-python hljs">import pandas as pd
|
|
import seaborn as sns; sns.set()
|
|
|
|
data = pd.read_csv("plant_emissions_report.csv")
|
|
sns.barplot(x="plant type",
|
|
y="emission amount (tonne)",
|
|
hue="emission type",
|
|
data=data.groupby(["plant type", "emission type"])
|
|
.sum()
|
|
.reset_index());</code></pre><img src="../assets/ex_emissions.png" width="500px"/><h2 id="Products-report"><a class="docs-heading-anchor" href="#Products-report">Products report</a><a id="Products-report-1"></a><a class="docs-heading-anchor-permalink" href="#Products-report" title="Permalink"></a></h2><p>Report showing primary product amounts, locations and marginal costs. Generated by <code>RELOG.write_products_report(solution, filename)</code>.</p><table><tr><th style="text-align: left">Column</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>product name</code></td><td style="text-align: left">Product name.</td></tr><tr><td style="text-align: left"><code>location name</code></td><td style="text-align: left">Name of the collection center.</td></tr><tr><td style="text-align: left"><code>latitude (deg)</code></td><td style="text-align: left">Latitude of the collection center.</td></tr><tr><td style="text-align: left"><code>longitude (deg)</code></td><td style="text-align: left">Longitude of the collection center.</td></tr><tr><td style="text-align: left"><code>year</code></td><td style="text-align: left">What year this row corresponds to. This reports includes one row for each year.</td></tr><tr><td style="text-align: left"><code>amount (tonne)</code></td><td style="text-align: left">Amount of product available at this collection center.</td></tr><tr><td style="text-align: left"><code>marginal cost ($/tonne)</code></td><td style="text-align: left">Cost to process one additional tonne of this product coming from this collection center.</td></tr></table><h2 id="Transportation-report"><a class="docs-heading-anchor" href="#Transportation-report">Transportation report</a><a id="Transportation-report-1"></a><a class="docs-heading-anchor-permalink" href="#Transportation-report" title="Permalink"></a></h2><p>Report showing amount of product sent from initial locations to plants, and from one plant to another. Includes the distance between each pair of locations, amount-distance shipped, transportation costs and energy expenditure. Generated by <code>RELOG.write_transportation_report(solution, filename)</code>.</p><table><tr><th style="text-align: left">Column</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>source type</code></td><td style="text-align: left">If product is being shipped from an initial location, equals <code>Origin</code>. If product is being shipped from a plant, equals plant type.</td></tr><tr><td style="text-align: left"><code>source location name</code></td><td style="text-align: left">Name of the location where the product is being shipped from.</td></tr><tr><td style="text-align: left"><code>source latitude (deg)</code></td><td style="text-align: left">Latitude of the source location.</td></tr><tr><td style="text-align: left"><code>source longitude (deg)</code></td><td style="text-align: left">Longitude of the source location.</td></tr><tr><td style="text-align: left"><code>destination type</code></td><td style="text-align: left">Type of plant the product is being shipped to.</td></tr><tr><td style="text-align: left"><code>destination location name</code></td><td style="text-align: left">Name of the location where the product is being shipped to.</td></tr><tr><td style="text-align: left"><code>destination latitude (deg)</code></td><td style="text-align: left">Latitude of the destination location.</td></tr><tr><td style="text-align: left"><code>destination longitude (deg)</code></td><td style="text-align: left">Longitude of the destination location.</td></tr><tr><td style="text-align: left"><code>product</code></td><td style="text-align: left">Product being shipped.</td></tr><tr><td style="text-align: left"><code>year</code></td><td style="text-align: left">Year.</td></tr><tr><td style="text-align: left"><code>distance (km)</code></td><td style="text-align: left">Distance between source and destination.</td></tr><tr><td style="text-align: left"><code>amount (tonne)</code></td><td style="text-align: left">Total amount of product being shipped between the two locations this year.</td></tr><tr><td style="text-align: left"><code>amount-distance (tonne-km)</code></td><td style="text-align: left">Total amount being shipped this year times distance.</td></tr><tr><td style="text-align: left"><code>transportation cost ($)</code></td><td style="text-align: left">Cost to transport this amount of product between the two locations for this year.</td></tr><tr><td style="text-align: left"><code>transportation energy (GJ)</code></td><td style="text-align: left">Energy expended transporting this amount of product between the two locations.</td></tr></table><h3 id="Sample-charts-4"><a class="docs-heading-anchor" href="#Sample-charts-4">Sample charts</a><a class="docs-heading-anchor-permalink" href="#Sample-charts-4" title="Permalink"></a></h3><ul><li>Bar plot showing total amount-distance for each product type, grouped by year (in Python):</li></ul><pre><code class="language-python hljs">import pandas as pd
|
|
import seaborn as sns; sns.set()
|
|
|
|
data = pd.read_csv("transportation_report.csv")
|
|
sns.barplot(x="product",
|
|
y="amount-distance (tonne-km)",
|
|
hue="year",
|
|
data=data.groupby(["product", "year"])
|
|
.sum()
|
|
.reset_index());</code></pre><img src="../assets/ex_transportation_amount_distance.png" width="500px"/><ul><li>Map of transportation lines (in Python):</li></ul><pre><code class="language-python hljs">import pandas as pd
|
|
import geopandas as gp
|
|
from shapely.geometry import Point, LineString
|
|
import matplotlib.pyplot as plt
|
|
from matplotlib import collections
|
|
|
|
# Plot base map
|
|
world = gp.read_file(gp.datasets.get_path('naturalearth_lowres'))
|
|
ax = world.plot(color='white', edgecolor='50', figsize=(14,7))
|
|
ax.set_ylim([23, 50])
|
|
ax.set_xlim([-128, -65])
|
|
|
|
# Draw transportation lines
|
|
data = pd.read_csv("transportation_report.csv")
|
|
lines = [[(row["source longitude (deg)"], row["source latitude (deg)"]),
|
|
(row["destination longitude (deg)"], row["destination latitude (deg)"])
|
|
] for (index, row) in data.iterrows()]
|
|
ax.add_collection(collections.LineCollection(lines,
|
|
linewidths=0.25,
|
|
zorder=1,
|
|
alpha=0.5,
|
|
color="50"))
|
|
|
|
# Draw source points
|
|
points = gp.points_from_xy(data["source longitude (deg)"],
|
|
data["source latitude (deg)"])
|
|
gp.GeoDataFrame(data, geometry=points).plot(ax=ax,
|
|
color="0.5",
|
|
markersize=1);
|
|
|
|
# Draw destination points
|
|
points = gp.points_from_xy(data["destination longitude (deg)"],
|
|
data["destination latitude (deg)"])
|
|
gp.GeoDataFrame(data, geometry=points).plot(ax=ax,
|
|
color="red",
|
|
markersize=50);</code></pre><img src="../assets/ex_transportation.png" width="1000px"/><h2 id="Transportation-emissions-report"><a class="docs-heading-anchor" href="#Transportation-emissions-report">Transportation emissions report</a><a id="Transportation-emissions-report-1"></a><a class="docs-heading-anchor-permalink" href="#Transportation-emissions-report" title="Permalink"></a></h2><p>Report showing emissions for each trip between initial locations and plants, and between pairs of plants. Generated by <code>RELOG.write_transportation_emissions_report(solution, filename)</code>.</p><table><tr><th style="text-align: left">Column</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>source type</code></td><td style="text-align: left">If product is being shipped from an initial location, equals <code>Origin</code>. If product is being shipped from a plant, equals plant type.</td></tr><tr><td style="text-align: left"><code>source location name</code></td><td style="text-align: left">Name of the location where the product is being shipped from.</td></tr><tr><td style="text-align: left"><code>source latitude (deg)</code></td><td style="text-align: left">Latitude of the source location.</td></tr><tr><td style="text-align: left"><code>source longitude (deg)</code></td><td style="text-align: left">Longitude of the source location.</td></tr><tr><td style="text-align: left"><code>destination type</code></td><td style="text-align: left">Type of plant the product is being shipped to.</td></tr><tr><td style="text-align: left"><code>destination location name</code></td><td style="text-align: left">Name of the location where the product is being shipped to.</td></tr><tr><td style="text-align: left"><code>destination latitude (deg)</code></td><td style="text-align: left">Latitude of the destination location.</td></tr><tr><td style="text-align: left"><code>destination longitude (deg)</code></td><td style="text-align: left">Longitude of the destination location.</td></tr><tr><td style="text-align: left"><code>product</code></td><td style="text-align: left">Product being shipped.</td></tr><tr><td style="text-align: left"><code>year</code></td><td style="text-align: left">Year.</td></tr><tr><td style="text-align: left"><code>distance (km)</code></td><td style="text-align: left">Distance between source and destination.</td></tr><tr><td style="text-align: left"><code>shipped amount (tonne)</code></td><td style="text-align: left">Total amount of product being shipped between the two locations this year.</td></tr><tr><td style="text-align: left"><code>shipped amount-distance (tonne-km)</code></td><td style="text-align: left">Total amount being shipped this year times distance.</td></tr><tr><td style="text-align: left"><code>emission type</code></td><td style="text-align: left">Type of emission.</td></tr><tr><td style="text-align: left"><code>emission amount (tonne)</code></td><td style="text-align: left">Amount of emission produced by transportation segment this year.</td></tr></table><h3 id="Sample-charts-5"><a class="docs-heading-anchor" href="#Sample-charts-5">Sample charts</a><a class="docs-heading-anchor-permalink" href="#Sample-charts-5" title="Permalink"></a></h3><ul><li>Bar plot showing total emission amount by emission type, grouped by type of product being transported (in Python):</li></ul><pre><code class="language-python hljs">import pandas as pd
|
|
import seaborn as sns; sns.set()
|
|
|
|
data = pd.read_csv("transportation_emissions_report.csv")
|
|
sns.barplot(x="emission type",
|
|
y="emission amount (tonne)",
|
|
hue="product",
|
|
data=data.groupby(["product", "emission type"])
|
|
.sum()
|
|
.reset_index());</code></pre><img src="../assets/ex_transportation_emissions.png" width="500px"/></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../format/">« Input and Output Data Formats</a><a class="docs-footer-nextpage" href="../model/">Optimization Model »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.21 on <span class="colophon-date" title="Friday 26 August 2022 13:01">Friday 26 August 2022</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
|