<p>Instead of specifying locations using latitudes and longitudes, it is also possible to specify them using unique identifiers, such as the name of a US state, or the county FIPS code. This works anywhere <code>latitude (deg)</code> and <code>longitude (deg)</code> are expected. For example, instead of:</p>
<pre><codeclass="language-json">{
"initial amounts": {
"C1": {
"latitude (deg)": 37.27182,
"longitude (deg)": -119.2704,
"amount (tonne)": [934.56, 934.56]
},
}
}
</code></pre>
<p>is is possible to write:</p>
<pre><codeclass="language-json">{
"initial amounts": {
"C1": {
"location": "us-state:CA",
"amount (tonne)": [934.56, 934.56]
},
}
}
</code></pre>
<p>Location names follow the format <code>db:id</code>, where <code>db</code> is the name of the database and <code>id</code> is the identifier for a specific location. RELOG currently includes the following databases:</p>
<table>
<thead>
<tr>
<th>Database</th>
<th>Description</th>
<th>Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>us-state</code></td>
<td>List of states of the United States.</td>
<td><code>us-state:IL</code> (State of Illinois)</td>
</tr>
<tr>
<td><code>2018-us-county</code></td>
<td>List of United States counties, as of 2018. IDs are 5-digit FIPS codes.</td>
<td><code>2018-us-county:17043</code> (DuPage county in Illinois)</td>
<p>In addition to the full output format described in <ahref="../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 addition to the full output format described in <ahref="../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>
<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>
<h2id="plants-report">Plants report</h2>
<h2id="plants-report">Plants report</h2>
<p>Report showing plant costs, capacities, energy expenditure and utilization factors.</p>
<p>Report showing plant costs, capacities, energy expenditure and utilization factors. Generated by <code>RELOG.write_plants_report(solution, filename)</code>.</p>
<p>Generated by <code>RELOG.write_plants_report(solution, filename)</code>. For a concrete example, see <ahref="https://github.com/ANL-CEEESA/RELOG/blob/master/test/fixtures/nimh_plants.csv">nimh_plants.csv</a>.</p>
<table>
<table>
<thead>
<thead>
<tr>
<tr>
@ -174,7 +175,7 @@
</tr>
</tr>
<tr>
<tr>
<tdalign="left"><code>year</code></td>
<tdalign="left"><code>year</code></td>
<td>What year this row corresponds to. This reports includes one row for each year in the simulation.</td>
<td>What year this row corresponds to. This reports includes one row for each year.</td>
<p>Report showing amount of products produced, sent and disposed of by each plant, as well as disposal costs.</p>
<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>
<p>Generated by <code>RELOG.write_plant_outputs_report(solution, filename)</code>. For a concrete example, see <ahref="https://github.com/ANL-CEEESA/RELOG/blob/master/test/fixtures/nimh_plant_outputs.csv">nimh_plant_outputs.csv</a>.</p>
<p>Report showing amount of emissions produced by each plant.</p>
<p>Report showing amount of emissions produced by each plant. Generated by <code>RELOG.write_plant_emissions_report(solution, filename)</code>.</p>
<p>Generated by <code>RELOG.write_plant_emissions_report(solution, filename)</code>. For a concrete example, see <ahref="https://github.com/ANL-CEEESA/RELOG/blob/master/test/fixtures/nimh_plant_emissions.csv">nimh_plant_emissions.csv</a>.</p>
<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.</p>
<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>
<p>Generated by <code>RELOG.write_transportation_report(solution, filename)</code>. For a concrete example, see <ahref="https://github.com/ANL-CEEESA/RELOG/blob/master/test/fixtures/nimh_transportation.csv">nimh_transportation.csv</a>.</p>
<p>Report showing emissions for each trip between initial locations and plants, and between pairs of plants.</p>
<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>
<p>Generated by <code>RELOG.write_transportation_emissions_report(solution, filename)</code>. For a concrete example, see <ahref="https://github.com/ANL-CEEESA/RELOG/blob/master/test/fixtures/nimh_transportation_emissions.csv">nimh_transportation_emissions.csv</a>.</p>
<p>For a complete description of the file formats above, and for a complete list of available reports, see the <ahref="../format/">data format page</a>.</p>
<p>For a complete description of the file formats above, and for a complete list of available reports, see the <ahref="../format/">data format page</a>.</p>
<h3id="41-changing-the-solver">4.1 Changing the solver</h3>
<p>Fundamentally, RELOG decides when and where to build plants based on a deterministic optimization problem that minimizes costs for a particular input file provided by the user. In practical situations, it may not be possible to perfectly estimate some (or most) entries in this input file in advance, such as costs, demands and emissions. In this situation, it may be interesting to evaluate how well does the facility location plan produced by RELOG work if costs, demands and emissions turn out to be different.</p>
<p>To simplify this what-if analysis, RELOG provides the <code>resolve</code> method, which updates a previous solution based on a new scenario, but keeps some of the previous decisions fixed. More precisely, given an optimal solution produced by RELOG and a new input file describing the new scenario, the <code>resolve</code> method reoptimizes the supply chain and produces a new solution which still builds the same set of plants as before, in exactly the same locations and with the same capacities, but that may now utilize the plants differently, based on the new data. For example, in the new solution, plants that were previously used at full capacity may now be utilized at half-capacity instead. As another example, regions that were previously served by a certain plant may now be served by a different one.</p>
<p>The following snippet shows how to use the method:</p>
<p>To use the <code>resolve</code> method, the new input file should be very similar to the original one. Only the following entries are allowed to change:</p>
<ul>
<li><strong>Products:</strong> Transportation costs, energy, emissions and initial amounts (latitude, longitude and amount).</li>
<li><strong>Plants:</strong> Energy and emissions.</li>
<li><strong>Plant's location:</strong> Latitude and longitude.</li>
<h3id="51-changing-the-solver">5.1 Changing the solver</h3>
<p>By default, RELOG internally uses <ahref="https://github.com/coin-or/Cbc">Cbc</a>, an open-source and freely-available Mixed-Integer Linear Programming solver developed by the <ahref="https://www.coin-or.org/">COIN-OR Project</a>. For larger-scale test cases, a commercial solver such as Gurobi, CPLEX or XPRESS is recommended. The following snippet shows how to switch from Cbc to Gurobi, for example:</p>
<p>By default, RELOG internally uses <ahref="https://github.com/coin-or/Cbc">Cbc</a>, an open-source and freely-available Mixed-Integer Linear Programming solver developed by the <ahref="https://www.coin-or.org/">COIN-OR Project</a>. For larger-scale test cases, a commercial solver such as Gurobi, CPLEX or XPRESS is recommended. The following snippet shows how to switch from Cbc to Gurobi, for example:</p>
<p>For large-scale instances, it may be too time-consuming to find an exact optimal solution to the multi-period version of the problem. For these situations, RELOG includes a heuristic solution method, which proceeds as follows:</p>
<p>For large-scale instances, it may be too time-consuming to find an exact optimal solution to the multi-period version of the problem. For these situations, RELOG includes a heuristic solution method, which proceeds as follows:</p>