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.
299 lines
14 KiB
299 lines
14 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="../img/favicon.ico">
|
|
|
|
|
|
<title>Usage - RELOG</title>
|
|
|
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/v4-shims.css">
|
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hack-font@3.3.0/build/web/hack.min.css">
|
|
<link href='//rsms.me/inter/inter.css' rel='stylesheet' type='text/css'>
|
|
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,600,700&subset=latin-ext,latin' rel='stylesheet' type='text/css'>
|
|
<link href="../css/bootstrap-custom.min.css" rel="stylesheet">
|
|
<link href="../css/base.min.css" rel="stylesheet">
|
|
<link href="../css/cinder.min.css" rel="stylesheet">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/styles/github.min.css">
|
|
|
|
|
|
<link href="../css/custom.css" rel="stylesheet">
|
|
|
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
|
|
<![endif]-->
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
|
<div class="container">
|
|
|
|
<!-- Collapsed navigation -->
|
|
<div class="navbar-header">
|
|
<!-- Expander button -->
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
|
|
|
|
<!-- Main title -->
|
|
|
|
<a class="navbar-brand" href="..">RELOG</a>
|
|
</div>
|
|
|
|
<!-- Expanded navigation -->
|
|
<div class="navbar-collapse collapse">
|
|
<!-- Main navigation -->
|
|
<ul class="nav navbar-nav">
|
|
|
|
|
|
<li >
|
|
<a href="..">Home</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li class="active">
|
|
<a href="./">Usage</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li >
|
|
<a href="../format/">Data Format</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li >
|
|
<a href="../model/">Optimization Model</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li>
|
|
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
|
|
<i class="fas fa-search"></i> Search
|
|
</a>
|
|
</li>
|
|
<li >
|
|
<a rel="prev" href="..">
|
|
<i class="fas fa-arrow-left"></i> Previous
|
|
</a>
|
|
</li>
|
|
<li >
|
|
<a rel="next" href="../format/">
|
|
Next <i class="fas fa-arrow-right"></i>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/ANL-CEEESA/RELOG/edit/master/src/docs/usage.md"><i class="fab fa-github"></i> Edit on GitHub</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
|
|
|
|
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
|
|
<ul class="nav bs-sidenav">
|
|
<li class="first-level active"><a href="#usage">Usage</a></li>
|
|
<li class="second-level"><a href="#1-installation">1. Installation</a></li>
|
|
|
|
<li class="second-level"><a href="#2-modeling-the-problem">2. Modeling the problem</a></li>
|
|
|
|
<li class="second-level"><a href="#3-running-the-optimization">3. Running the optimization</a></li>
|
|
|
|
<li class="second-level"><a href="#4-advanced-options">4. Advanced options</a></li>
|
|
|
|
<li class="third-level"><a href="#41-changing-the-solver">4.1 Changing the solver</a></li>
|
|
</ul>
|
|
</div></div>
|
|
<div class="col-md-9" role="main">
|
|
|
|
<h1 id="usage">Usage</h1>
|
|
<h2 id="1-installation">1. Installation</h2>
|
|
<p>To use RELOG, the first step is to install the <a href="https://julialang.org/">Julia programming language</a> on your machine. Note that RELOG was developed and tested with Julia 1.5 and may not be compatible with newer versions. After Julia is installed, launch the Julia console, type <code>]</code> to switch to package manger mode, then run:</p>
|
|
<pre><code class="text">(@v1.5) pkg> add https://github.com/ANL-CEEESA/RELOG.git
|
|
</code></pre>
|
|
|
|
<p>After the package and all its dependencies have been installed, please run the RELOG test suite, as shown below, to make sure that the package has been correctly installed:</p>
|
|
<pre><code class="text">(@v1.5) pkg> test RELOG
|
|
</code></pre>
|
|
|
|
<p>To update the package to a newer version, type <code>]</code> to enter the package manager mode, then run:</p>
|
|
<pre><code class="text">(@v1.5) pkg> update RELOG
|
|
</code></pre>
|
|
|
|
<h2 id="2-modeling-the-problem">2. Modeling the problem</h2>
|
|
<p>The two main model components in RELOG are <strong>products</strong> and <strong>plants</strong>.</p>
|
|
<p>A <strong>product</strong> is any material that needs to be recycled, any intermediary product produced during the recycling process, or any product recovered at the end of the process. For example, in a NiMH battery recycling study case, products could include (i) the original batteries to be recycled; (ii) the cathode and anode parts of the battery; (iii) rare-earth elements and (iv) scrap metals.</p>
|
|
<ul>
|
|
<li>
|
|
<p>The model assumes that some products are initially available at user-specified locations (described by their latitude, longitude and the amount available), while other products only become available during the recycling process.</p>
|
|
</li>
|
|
<li>
|
|
<p>Transporting products from one location to another incurs a transportation cost (<code>$/km/tonne</code>), spends some amount of energy (<code>J/km/tonne</code>) and may generate multiple types of emissions (<code>tonne/tonne</code>). All these parameters are user-specified and may be product- and time-specific.</p>
|
|
</li>
|
|
</ul>
|
|
<p>A <strong>plant</strong> is a facility that converts one type of product to another. RELOG assumes that each plant receives a single type of product as input and converts this input into multiple types of products. Multiple types of plants, with different inputs, outputs and performance characteristics, may be specified. In the NiMH battery recycling study case, for example, one type of plant could be a <em>disassembly plant</em>, which converts <em>batteries</em> into <em>cathode</em> and <em>anode</em>. Another type of plant could be <em>anode recycling plant</em>, which converts <em>anode</em> into <em>rare-earth elements</em> and <em>scrap metals</em>.</p>
|
|
<ul>
|
|
<li>
|
|
<p>To process each tonne of input material, plants incur a variable operating cost (<code>$/tonne</code>), spend some amount of energy (<code>GJ/tonne</code>), and produce multiple types of emissions (<code>tonne/tonne</code>). Plants also incur a fixed operating cost (<code>$</code>) regardless of the amount of material they process. All these parameters are user-specified and may be region- and time-specific.</p>
|
|
</li>
|
|
<li>
|
|
<p>Plants can be built at user-specified potential locations. Opening a plant incurs a one-time opening cost (<code>$</code>) which may be region- and time-specific. Plants also have a limited capacity (in <code>tonne</code>), which indicates the maximum amount of input material they are able to process per year. When specifying potential locations for each type of plant, it is also possible to specify the minimum and maximum capacity of the plants that can be built at that particular location. Different plants sizes may have different opening costs and fixed operating costs. After a plant is built, it can be further expanded in the following years, up to its maximum capacity.</p>
|
|
</li>
|
|
<li>
|
|
<p>All products that are initially available must be sent to a plant for processing. All products that are generated by a plant can either be sent to another plant for further processing, or disposed of locally for either a profit or a loss (<code>$/tonne</code>). To model environmental regulations, it is also possible to specify the maximum amount of each product that can be disposed of at each location.</p>
|
|
</li>
|
|
</ul>
|
|
<p>All user parameters specified above must be provided to RELOG as a JSON file, which is fully described in the <a href="../format/">data format page</a>.</p>
|
|
<h2 id="3-running-the-optimization">3. Running the optimization</h2>
|
|
<p>After creating a JSON file describing the reverse manufacturing process and the input data, the following example illustrates how to use the package to find the optimal set of decisions:</p>
|
|
<pre><code class="julia">using RELOG
|
|
RELOG.solve("/home/user/instance.json",
|
|
output="/home/user/solution.json")
|
|
</code></pre>
|
|
|
|
<p>The optimal logistics plan will be stored in the output file specified. See <a href="../format/">data format page</a> for a description of this output file.</p>
|
|
<h2 id="4-advanced-options">4. Advanced options</h2>
|
|
<h3 id="41-changing-the-solver">4.1 Changing the solver</h3>
|
|
<p>By default, RELOG internally uses <a href="https://github.com/coin-or/Cbc">Cbc</a>, an open-source and freely-available Mixed-Integer Linear Programming solver developed by the <a href="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>
|
|
<pre><code class="julia">using RELOG, Gurobi, JuMP
|
|
|
|
gurobi = optimizer_with_attributes(Gurobi.Optimizer,
|
|
"TimeLimit" => 3600,
|
|
"MIPGap" => 0.001)
|
|
|
|
RELOG.solve("instance.json",
|
|
output="solution.json",
|
|
optimizer=gurobi)
|
|
</code></pre></div>
|
|
|
|
|
|
</div>
|
|
|
|
<footer class="col-md-12 text-center">
|
|
|
|
<hr>
|
|
<p>
|
|
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
|
|
|
|
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
|
|
</p>
|
|
|
|
|
|
|
|
</footer>
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
|
<script src="../js/bootstrap-3.0.3.min.js"></script>
|
|
|
|
|
|
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/highlight.min.js"></script>
|
|
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
|
|
|
|
<script>var base_url = ".."</script>
|
|
|
|
<script src="../js/base.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
<script src="../js/mathjax.js"></script>
|
|
<script src="../search/main.js"></script>
|
|
|
|
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">
|
|
<span aria-hidden="true">×</span>
|
|
<span class="sr-only">Close</span>
|
|
</button>
|
|
<h4 class="modal-title" id="searchModalLabel">Search</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>
|
|
From here you can search these documents. Enter
|
|
your search terms below.
|
|
</p>
|
|
<form>
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
|
|
</div>
|
|
</form>
|
|
<div id="mkdocs-search-results"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 20%;">Keys</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="help shortcut"><kbd>?</kbd></td>
|
|
<td>Open this help</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="next shortcut"><kbd>n</kbd></td>
|
|
<td>Next page</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="prev shortcut"><kbd>p</kbd></td>
|
|
<td>Previous page</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="search shortcut"><kbd>s</kbd></td>
|
|
<td>Search</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|