From 21eed29cec0b5fbcb3cdc0bde340a2d6915442a2 Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Fri, 21 Aug 2020 17:27:06 -0500 Subject: [PATCH] Docs: rename m^base to m^min --- docs/index.html | 4 +-- docs/model/index.html | 55 ++++++++++++++++++++++++++++++---- docs/search/search_index.json | 2 +- docs/sitemap.xml.gz | Bin 196 -> 196 bytes src/docs/model.md | 4 +-- 5 files changed, 55 insertions(+), 10 deletions(-) diff --git a/docs/index.html b/docs/index.html index dc5685b..7097df7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -136,7 +136,7 @@

RELOG: Reverse Logistics Optimization

-

RELOG is a supply chain optimization package focusing on reverse logistics and reverse manufacturing. The package uses Mixed-Integer Linear Programming to determine where to build recycling plants, what size should these plants have and which customers should be served by which plants. The package supports custom reverse logistics pipelines, with multiple types of plants, multiple types of product and multiple time periods.

+

RELOG is an open-source supply chain optimization package focusing on reverse logistics and reverse manufacturing. The package uses Mixed-Integer Linear Programming to determine where to build recycling plants, what size should these plants have and which customers should be served by which plants. The package supports custom reverse logistics pipelines, with multiple types of plants, multiple types of product and multiple time periods.

Table of Contents

@@ -142,7 +143,7 @@
  • $L$ - Set of locations holding the original material to be recycled
  • $M$ - Set of materials recovered during the reverse manufacturing process
  • $P$ - Set of potential plants to open
  • -
  • $T={1, \ldots, t^{max}}$ - Set of time periods
  • +
  • $T = { 1, \ldots, t^{max} } $ - Set of time periods
  • Constants

    Plants:

    @@ -160,7 +161,7 @@

    Products:

    Transportation:

    @@ -270,9 +271,53 @@ In the third line, we have the disposal costs.

    & \forall p \in P, t \in T \\ & y_{lpt} \geq 0 & \forall l \in L, p \in P, t \in T \\ - & m^\text{disp}_{pmt} \geq z_{mpt} \geq 0 - & \forall m \in M, p \in P, t \in T \\ + & m^\text{disp}_{mpt} \geq z_{mpt} \geq 0 + & \forall m \in M, p \in P, t \in T \end{align} +

    +

    Complete optimization model

    +

    +

    diff --git a/docs/search/search_index.json b/docs/search/search_index.json index c2ede95..f5ad5b9 100644 --- a/docs/search/search_index.json +++ b/docs/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"RELOG: Reverse Logistics Optimization RELOG is a supply chain optimization package focusing on reverse logistics and reverse manufacturing. The package uses Mixed-Integer Linear Programming to determine where to build recycling plants, what size should these plants have and which customers should be served by which plants. The package supports custom reverse logistics pipelines, with multiple types of plants, multiple types of product and multiple time periods. Table of Contents Usage Data Format Optimization model Source Code https://anl-ceeesa.github.io/RELOG/ Authors Alinson S. Xavier, Argonne National Laboratory < axavier@anl.gov > Nwike Iloeje, Argonne National Laboratory < ciloeje@anl.gov > License RELOG: Reverse Logistics Optimization Copyright \u00a9 2020, UChicago Argonne, LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"Home"},{"location":"#relog-reverse-logistics-optimization","text":"RELOG is a supply chain optimization package focusing on reverse logistics and reverse manufacturing. The package uses Mixed-Integer Linear Programming to determine where to build recycling plants, what size should these plants have and which customers should be served by which plants. The package supports custom reverse logistics pipelines, with multiple types of plants, multiple types of product and multiple time periods.","title":"RELOG: Reverse Logistics Optimization"},{"location":"#table-of-contents","text":"Usage Data Format Optimization model","title":"Table of Contents"},{"location":"#source-code","text":"https://anl-ceeesa.github.io/RELOG/","title":"Source Code"},{"location":"#authors","text":"Alinson S. Xavier, Argonne National Laboratory < axavier@anl.gov > Nwike Iloeje, Argonne National Laboratory < ciloeje@anl.gov >","title":"Authors"},{"location":"#license","text":"RELOG: Reverse Logistics Optimization Copyright \u00a9 2020, UChicago Argonne, LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"License"},{"location":"format/","text":"Input Data Format The first step when using RELOG is to describe the reverse logistics pipeline and the relevant data. RELOG accepts as input a JSON file with three sections: parameters , products and plants . Below, we describe each section in more detail. Parameters The parameters section describes details about the simulation itself. Key Description time horizon (years) Number of years in the simulation. building period (years) List of years in which we are allowed to open new plants. For example, if this parameter is set to [1,2,3] , we can only open plants during the first three years. By default, this equals [1] ; that is, plants can only be opened during the first year. Example { \"parameters\": { \"time horizon (years)\": 2, \"building period (years)\": [1] } } Products The products section describes all products and subproducts in the simulation. The field instance[\"Products\"] is a dictionary mapping the name of the product to a dictionary which describes its characteristics. Each product description contains the following keys: Key Description transportation cost ($/km/tonne) The cost to transport this product. Must be a timeseries. transportation energy (J/km/tonne) The energy required to transport this product. Must be a timeseries. Optional. transportation emissions (tonne/km/tonne) A dictionary mapping the name of each greenhouse gas, produced to transport one tonne of this product along one kilometer, to the amount of gas produced (in tonnes). Must be a timeseries. Optional. initial amounts A dictionary mapping the name of each location to its description (see below). If this product is not initially available, this key may be omitted. Must be a timeseries. Each product may have some amount available at the beginning of each time period. In this case, the key initial amounts maps to a dictionary with the following keys: Key Description latitude (deg) The latitude of the location. longitude (deg) The longitude of the location. amount (tonne) The amount of the product initially available at the location. Must be a timeseries. Example { \"products\": { \"P1\": { \"initial amounts\": { \"C1\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 7.0, \"amount (tonne)\": [934.56, 934.56] }, \"C2\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 19.0, \"amount (tonne)\": [198.95, 198.95] }, \"C3\": { \"latitude (deg)\": 84.0, \"longitude (deg)\": 76.0, \"amount (tonne)\": [212.97, 212.97] } }, \"transportation cost ($/km/tonne)\": [0.015, 0.015], \"transportation energy (J/km/tonne)\": [0.12, 0.11], \"transportation emissions (tonne/km/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] } }, \"P2\": { \"transportation cost ($/km/tonne)\": [0.022, 0.020] }, \"P3\": { \"transportation cost ($/km/tonne)\": [0.0125, 0.0125] }, \"P4\": { \"transportation cost ($/km/tonne)\": [0.0175, 0.0175] } } } Processing Plants The plants section describes the available types of reverse manufacturing plants, their potential locations and associated costs, as well as their inputs and outputs. The field instance[\"Plants\"] is a dictionary mapping the name of the plant to a dictionary with the following keys: Key Description input The name of the product that this plant takes as input. Only one input is accepted per plant. outputs (tonne/tonne) A dictionary specifying how many tonnes of each product is produced for each tonnes of input. For example, if the plant outputs 0.5 tonnes of P2 and 0.25 tonnes of P3 for each tonnes of P1 provided, then this entry should be {\"P2\": 0.5, \"P3\": 0.25} . If the plant does not output anything, this key may be omitted. energy (GJ/tonne) The energy required to process 1 tonne of the input. Must be a timeseries. Optional. emissions (tonne/tonne) A dictionary mapping the name of each greenhouse gas, produced to process each tonne of input, to the amount of gas produced (in tonne). Must be a timeseries. Optional. locations A dictionary mapping the name of the location to a dictionary which describes the site characteristics (see below). Each type of plant is associated with a set of potential locations where it can be built. Each location is represented by a dictionary with the following keys: Key Description latitude (deg) The latitude of the location, in degrees. longitude (deg) The longitude of the location, in degrees. disposal A dictionary describing what products can be disposed locally at the plant. capacities (tonne) A dictionary describing what plant sizes are allowed, and their characteristics. The keys in the disposal dictionary should be the names of the products. The values are dictionaries with the following keys: Key Description cost ($/tonne) The cost to dispose of the product. Must be a timeseries. limit (tonne) The maximum amount that can be disposed of. If an unlimited amount can be disposed, this key may be omitted. Must be a timeseries. The keys in the capacities (tonne) dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys: Key Description opening cost ($) The cost to open a plant of this size. fixed operating cost ($) The cost to keep the plant open, even if the plant doesn't process anything. Must be a timeseries. variable operating cost ($/tonne) The cost that the plant incurs to process each tonne of input. Must be a timeseries. Example { \"plants\": { \"F1\": { \"input\": \"P1\", \"outputs (tonne/tonne)\": { \"P2\": 0.2, \"P3\": 0.5 }, \"energy (GJ/tonne)\": [0.12, 0.11], \"emissions (tonne/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] }, \"locations\": { \"L1\": { \"latitude (deg)\": 0.0, \"longitude (deg)\": 0.0, \"disposal\": { \"P2\": { \"cost ($/tonne)\": [-10.0, -12.0], \"limit (tonne)\": [1.0, 1.0] } }, \"capacities (tonne)\": { \"100\": { \"opening cost ($)\": [500, 530], \"fixed operating cost ($)\": [300.0, 310.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] }, \"500\": { \"opening cost ($)\": [750, 760], \"fixed operating cost ($)\": [400.0, 450.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] } } } } } } } Current limitations Each plant can only be opened exactly once. After open, the plant remains open until the end of the simulation. Plants can be expanded at any time, even long after they are open. All material available at the beginning of a time period must be entirely processed by the end of that time period. It is not possible to store unprocessed materials from one time period to the next. Up to two plant sizes are currently supported. Variable operating costs must be the same for all plant sizes.","title":"Data Format"},{"location":"format/#input-data-format","text":"The first step when using RELOG is to describe the reverse logistics pipeline and the relevant data. RELOG accepts as input a JSON file with three sections: parameters , products and plants . Below, we describe each section in more detail.","title":"Input Data Format"},{"location":"format/#parameters","text":"The parameters section describes details about the simulation itself. Key Description time horizon (years) Number of years in the simulation. building period (years) List of years in which we are allowed to open new plants. For example, if this parameter is set to [1,2,3] , we can only open plants during the first three years. By default, this equals [1] ; that is, plants can only be opened during the first year.","title":"Parameters"},{"location":"format/#example","text":"{ \"parameters\": { \"time horizon (years)\": 2, \"building period (years)\": [1] } }","title":"Example"},{"location":"format/#products","text":"The products section describes all products and subproducts in the simulation. The field instance[\"Products\"] is a dictionary mapping the name of the product to a dictionary which describes its characteristics. Each product description contains the following keys: Key Description transportation cost ($/km/tonne) The cost to transport this product. Must be a timeseries. transportation energy (J/km/tonne) The energy required to transport this product. Must be a timeseries. Optional. transportation emissions (tonne/km/tonne) A dictionary mapping the name of each greenhouse gas, produced to transport one tonne of this product along one kilometer, to the amount of gas produced (in tonnes). Must be a timeseries. Optional. initial amounts A dictionary mapping the name of each location to its description (see below). If this product is not initially available, this key may be omitted. Must be a timeseries. Each product may have some amount available at the beginning of each time period. In this case, the key initial amounts maps to a dictionary with the following keys: Key Description latitude (deg) The latitude of the location. longitude (deg) The longitude of the location. amount (tonne) The amount of the product initially available at the location. Must be a timeseries.","title":"Products"},{"location":"format/#example_1","text":"{ \"products\": { \"P1\": { \"initial amounts\": { \"C1\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 7.0, \"amount (tonne)\": [934.56, 934.56] }, \"C2\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 19.0, \"amount (tonne)\": [198.95, 198.95] }, \"C3\": { \"latitude (deg)\": 84.0, \"longitude (deg)\": 76.0, \"amount (tonne)\": [212.97, 212.97] } }, \"transportation cost ($/km/tonne)\": [0.015, 0.015], \"transportation energy (J/km/tonne)\": [0.12, 0.11], \"transportation emissions (tonne/km/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] } }, \"P2\": { \"transportation cost ($/km/tonne)\": [0.022, 0.020] }, \"P3\": { \"transportation cost ($/km/tonne)\": [0.0125, 0.0125] }, \"P4\": { \"transportation cost ($/km/tonne)\": [0.0175, 0.0175] } } }","title":"Example"},{"location":"format/#processing-plants","text":"The plants section describes the available types of reverse manufacturing plants, their potential locations and associated costs, as well as their inputs and outputs. The field instance[\"Plants\"] is a dictionary mapping the name of the plant to a dictionary with the following keys: Key Description input The name of the product that this plant takes as input. Only one input is accepted per plant. outputs (tonne/tonne) A dictionary specifying how many tonnes of each product is produced for each tonnes of input. For example, if the plant outputs 0.5 tonnes of P2 and 0.25 tonnes of P3 for each tonnes of P1 provided, then this entry should be {\"P2\": 0.5, \"P3\": 0.25} . If the plant does not output anything, this key may be omitted. energy (GJ/tonne) The energy required to process 1 tonne of the input. Must be a timeseries. Optional. emissions (tonne/tonne) A dictionary mapping the name of each greenhouse gas, produced to process each tonne of input, to the amount of gas produced (in tonne). Must be a timeseries. Optional. locations A dictionary mapping the name of the location to a dictionary which describes the site characteristics (see below). Each type of plant is associated with a set of potential locations where it can be built. Each location is represented by a dictionary with the following keys: Key Description latitude (deg) The latitude of the location, in degrees. longitude (deg) The longitude of the location, in degrees. disposal A dictionary describing what products can be disposed locally at the plant. capacities (tonne) A dictionary describing what plant sizes are allowed, and their characteristics. The keys in the disposal dictionary should be the names of the products. The values are dictionaries with the following keys: Key Description cost ($/tonne) The cost to dispose of the product. Must be a timeseries. limit (tonne) The maximum amount that can be disposed of. If an unlimited amount can be disposed, this key may be omitted. Must be a timeseries. The keys in the capacities (tonne) dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys: Key Description opening cost ($) The cost to open a plant of this size. fixed operating cost ($) The cost to keep the plant open, even if the plant doesn't process anything. Must be a timeseries. variable operating cost ($/tonne) The cost that the plant incurs to process each tonne of input. Must be a timeseries.","title":"Processing Plants"},{"location":"format/#example_2","text":"{ \"plants\": { \"F1\": { \"input\": \"P1\", \"outputs (tonne/tonne)\": { \"P2\": 0.2, \"P3\": 0.5 }, \"energy (GJ/tonne)\": [0.12, 0.11], \"emissions (tonne/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] }, \"locations\": { \"L1\": { \"latitude (deg)\": 0.0, \"longitude (deg)\": 0.0, \"disposal\": { \"P2\": { \"cost ($/tonne)\": [-10.0, -12.0], \"limit (tonne)\": [1.0, 1.0] } }, \"capacities (tonne)\": { \"100\": { \"opening cost ($)\": [500, 530], \"fixed operating cost ($)\": [300.0, 310.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] }, \"500\": { \"opening cost ($)\": [750, 760], \"fixed operating cost ($)\": [400.0, 450.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] } } } } } } }","title":"Example"},{"location":"format/#current-limitations","text":"Each plant can only be opened exactly once. After open, the plant remains open until the end of the simulation. Plants can be expanded at any time, even long after they are open. All material available at the beginning of a time period must be entirely processed by the end of that time period. It is not possible to store unprocessed materials from one time period to the next. Up to two plant sizes are currently supported. Variable operating costs must be the same for all plant sizes.","title":"Current limitations"},{"location":"model/","text":"Optimization Model In this page, we describe the precise mathematical optimization model used by RELOG to find the optimal logistics plan. This model is a variation of the classical Facility Location Problem, which has been widely studied in the operations research literature. To simplify the exposition, we present the simplified case where there is only one type of plant. Mathematical Description Sets $L$ - Set of locations holding the original material to be recycled $M$ - Set of materials recovered during the reverse manufacturing process $P$ - Set of potential plants to open $T={1, \\ldots, t^{max}}$ - Set of time periods Constants Plants: $c^\\text{disp}_{pmt}$ - Cost of disposing one tonne of material $m$ at plant $p$ during time $t$ ( $/tonne/km ) $c^\\text{exp}_{pt}$ - Cost of adding one tonne of capacity to plant $p$ at time $t$ ( $/tonne ) $c^\\text{open}_{pt}$ - Cost of opening plant $p$ at time $t$, at minimum capacity ( $ ) $c^\\text{f-base}_{pt}$ - Fixed cost of keeping plant $p$ open during time period $t$ ( $ ) $c^\\text{f-exp}_{pt}$ - Increase in fixed cost for each additional tonne of capacity ( $/tonne ) $c^\\text{var}_{pt}$ - Variable cost of processing one tonne of input at plant $p$ at time $t$ ( $/tonne ) $m^\\text{min}_p$ - Minimum capacity of plant $p$ ( tonne ) $m^\\text{max}_p$ - Maximum capacity of plant $p$ ( tonne ) $m^\\text{disp}_{pmt}$ - Maximum amount of material $m$ that plant $p$ can dispose of during time $t$ ( tonne ) Products: $\\alpha_{pm}$ - Amount of material $m$ recovered by plant $t$ for each tonne of original material ( tonne/tonne ) $m^\\text{initial}_{lt}$ - Amount of original material to be recycled at location $l$ during time $t$ (tonne) Transportation: $c^\\text{tr}_{t}$ - Transportation cost during time $t$ ( $/tonne/km ) $d_{lp}$ - Distance between plant $p$ and location $l$ ( km ) Decision variables $q_{mpt}$ - Amount of material $m$ recovered by plant $p$ during time $t$ ( tonne ) $u_{pt}$ - Binary variable that equals 1 if plant $p$ starts operating at time $t$ ( bool ) $w_{pt}$ - Extra capacity (amount above the minimum) added to plant $p$ during time $t$ ( tonne ) $x_{pt}$ - Binary variable that equals 1 if plant $p$ is operational at time $t$ ( bool ) $y_{lpt}$ - Amount of product sent from location $l$ to plant $p$ during time $t$ ( tonne ) $z_{mpt}$ - Amount of material $m$ disposed of by plant $p$ during time $t$ ( tonne ) Objective function RELOG minimizes the overall capital, production and transportation costs: \\begin{align*} \\text{minimize} \\;\\; & \\sum_{t \\in T} \\sum_{p \\in P} \\left[ c^\\text{open}_{pt} u_{pt} + c^\\text{f-base}_{pt} x_{pt} + \\sum_{i=1}^t c^\\text{f-exp}_{pt} w_{pi} + c^{\\text{exp}}_{pt} w_{pt} \\right] + \\\\ & \\sum_{t \\in T} \\sum_{l \\in L} \\sum_{p \\in P} \\left[ c^{\\text{tr}}_t d_{lp} + c^{\\text{var}}_{pt} \\right] y_{lpt} + \\\\ & \\sum_{t \\in T} \\sum_{p \\in P} \\sum_{m \\in M} c^{\\text{disp}}_{pmt} z_{pmt} \\end{align*} In the first line, we have (i) opening costs, if plant starts operating at time $t$, (ii) fixed operating costs, if plant is operational, (iii) additional fixed operating costs coming from expansion performed in all previous time periods up to the current one, and finally (iv) the expansion costs during the current time period. In the second line, we have the transportation costs and the variable operating costs. In the third line, we have the disposal costs. Constraints All original materials must be sent to a plant: \\begin{align} & \\sum_{p \\in P} y_{lpt} = m^\\text{initial}_{lt} & \\forall l \\in L, t \\in T \\end{align} Plants have a limited capacity: \\begin{align} & \\sum_{l \\in L} y_{lpt} \\leq m^\\text{base}_p x_p + \\sum_{i=1}^t w_p & \\forall p \\in P, t \\in T \\end{align} Plants can only be expanded up to their maximum capacity. Furthermore, if a plant is closed, it cannot be expanded: \\begin{align} & \\sum_{i=1}^t w_p \\leq m^\\text{max}_p x_p & \\forall p \\in P, t \\in T \\end{align} Amount of recovered material is proportional to the plant input: \\begin{align} & q_{mpt} = \\alpha_{pm} \\sum_{l \\in L} y_{lpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} Because we only consider a single type of plant, all recovered material must be immediately disposed of. In RELOG's full model, recovered materials may be sent to another plant for further processing. \\begin{align} & q_{mpt} = z_{mpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} A plant is operation at time $t$ if it was operational at time $t-1$ or it was built at time $t$. This constraint also prevents a plant from being built multiple times. \\begin{align} & x_{pt} = x_{p,t-1} + u_{pt} & \\forall p \\in P, t \\in T \\setminus \\{1\\} \\\\ & x_{p,1} = u_{p,1} & \\forall p \\in P \\end{align} Variable bounds: \\begin{align} & q_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ & u_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & w_{pt} \\geq 0 & \\forall p \\in P, t \\in T \\\\ & x_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & y_{lpt} \\geq 0 & \\forall l \\in L, p \\in P, t \\in T \\\\ & m^\\text{disp}_{pmt} \\geq z_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ \\end{align}","title":"Optimization Model"},{"location":"model/#optimization-model","text":"In this page, we describe the precise mathematical optimization model used by RELOG to find the optimal logistics plan. This model is a variation of the classical Facility Location Problem, which has been widely studied in the operations research literature. To simplify the exposition, we present the simplified case where there is only one type of plant.","title":"Optimization Model"},{"location":"model/#mathematical-description","text":"","title":"Mathematical Description"},{"location":"model/#sets","text":"$L$ - Set of locations holding the original material to be recycled $M$ - Set of materials recovered during the reverse manufacturing process $P$ - Set of potential plants to open $T={1, \\ldots, t^{max}}$ - Set of time periods","title":"Sets"},{"location":"model/#constants","text":"Plants: $c^\\text{disp}_{pmt}$ - Cost of disposing one tonne of material $m$ at plant $p$ during time $t$ ( $/tonne/km ) $c^\\text{exp}_{pt}$ - Cost of adding one tonne of capacity to plant $p$ at time $t$ ( $/tonne ) $c^\\text{open}_{pt}$ - Cost of opening plant $p$ at time $t$, at minimum capacity ( $ ) $c^\\text{f-base}_{pt}$ - Fixed cost of keeping plant $p$ open during time period $t$ ( $ ) $c^\\text{f-exp}_{pt}$ - Increase in fixed cost for each additional tonne of capacity ( $/tonne ) $c^\\text{var}_{pt}$ - Variable cost of processing one tonne of input at plant $p$ at time $t$ ( $/tonne ) $m^\\text{min}_p$ - Minimum capacity of plant $p$ ( tonne ) $m^\\text{max}_p$ - Maximum capacity of plant $p$ ( tonne ) $m^\\text{disp}_{pmt}$ - Maximum amount of material $m$ that plant $p$ can dispose of during time $t$ ( tonne ) Products: $\\alpha_{pm}$ - Amount of material $m$ recovered by plant $t$ for each tonne of original material ( tonne/tonne ) $m^\\text{initial}_{lt}$ - Amount of original material to be recycled at location $l$ during time $t$ (tonne) Transportation: $c^\\text{tr}_{t}$ - Transportation cost during time $t$ ( $/tonne/km ) $d_{lp}$ - Distance between plant $p$ and location $l$ ( km )","title":"Constants"},{"location":"model/#decision-variables","text":"$q_{mpt}$ - Amount of material $m$ recovered by plant $p$ during time $t$ ( tonne ) $u_{pt}$ - Binary variable that equals 1 if plant $p$ starts operating at time $t$ ( bool ) $w_{pt}$ - Extra capacity (amount above the minimum) added to plant $p$ during time $t$ ( tonne ) $x_{pt}$ - Binary variable that equals 1 if plant $p$ is operational at time $t$ ( bool ) $y_{lpt}$ - Amount of product sent from location $l$ to plant $p$ during time $t$ ( tonne ) $z_{mpt}$ - Amount of material $m$ disposed of by plant $p$ during time $t$ ( tonne )","title":"Decision variables"},{"location":"model/#objective-function","text":"RELOG minimizes the overall capital, production and transportation costs: \\begin{align*} \\text{minimize} \\;\\; & \\sum_{t \\in T} \\sum_{p \\in P} \\left[ c^\\text{open}_{pt} u_{pt} + c^\\text{f-base}_{pt} x_{pt} + \\sum_{i=1}^t c^\\text{f-exp}_{pt} w_{pi} + c^{\\text{exp}}_{pt} w_{pt} \\right] + \\\\ & \\sum_{t \\in T} \\sum_{l \\in L} \\sum_{p \\in P} \\left[ c^{\\text{tr}}_t d_{lp} + c^{\\text{var}}_{pt} \\right] y_{lpt} + \\\\ & \\sum_{t \\in T} \\sum_{p \\in P} \\sum_{m \\in M} c^{\\text{disp}}_{pmt} z_{pmt} \\end{align*} In the first line, we have (i) opening costs, if plant starts operating at time $t$, (ii) fixed operating costs, if plant is operational, (iii) additional fixed operating costs coming from expansion performed in all previous time periods up to the current one, and finally (iv) the expansion costs during the current time period. In the second line, we have the transportation costs and the variable operating costs. In the third line, we have the disposal costs.","title":"Objective function"},{"location":"model/#constraints","text":"All original materials must be sent to a plant: \\begin{align} & \\sum_{p \\in P} y_{lpt} = m^\\text{initial}_{lt} & \\forall l \\in L, t \\in T \\end{align} Plants have a limited capacity: \\begin{align} & \\sum_{l \\in L} y_{lpt} \\leq m^\\text{base}_p x_p + \\sum_{i=1}^t w_p & \\forall p \\in P, t \\in T \\end{align} Plants can only be expanded up to their maximum capacity. Furthermore, if a plant is closed, it cannot be expanded: \\begin{align} & \\sum_{i=1}^t w_p \\leq m^\\text{max}_p x_p & \\forall p \\in P, t \\in T \\end{align} Amount of recovered material is proportional to the plant input: \\begin{align} & q_{mpt} = \\alpha_{pm} \\sum_{l \\in L} y_{lpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} Because we only consider a single type of plant, all recovered material must be immediately disposed of. In RELOG's full model, recovered materials may be sent to another plant for further processing. \\begin{align} & q_{mpt} = z_{mpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} A plant is operation at time $t$ if it was operational at time $t-1$ or it was built at time $t$. This constraint also prevents a plant from being built multiple times. \\begin{align} & x_{pt} = x_{p,t-1} + u_{pt} & \\forall p \\in P, t \\in T \\setminus \\{1\\} \\\\ & x_{p,1} = u_{p,1} & \\forall p \\in P \\end{align} Variable bounds: \\begin{align} & q_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ & u_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & w_{pt} \\geq 0 & \\forall p \\in P, t \\in T \\\\ & x_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & y_{lpt} \\geq 0 & \\forall l \\in L, p \\in P, t \\in T \\\\ & m^\\text{disp}_{pmt} \\geq z_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ \\end{align}","title":"Constraints"},{"location":"usage/","text":"Usage 1. Installation To use RELOG, the first step is to install the Julia programming language 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 ] to switch to package manger mode, then run: (@v1.5) pkg> add https://github.com/ANL-CEEESA/RELOG.git 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: (@v1.5) pkg> test RELOG To update the package to a newer version, type ] to enter the package manager mode, then run: (@v1.5) pkg> update RELOG 2. Modeling the problem The two main model components in RELOG are products and plants . A product 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. 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. Transporting products from one location to another incurs a transportation cost ( $/km/tonne ), spends some amount of energy ( J/km/tonne ) and may generate multiple types of emissions ( tonne/tonne ). All these parameters are user-specified and may be product- and time-specific. A plant 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 disassembly plant , which converts batteries into cathode and anode . Another type of plant could be anode recycling plant , which converts anode into rare-earth elements and scrap metals . To process each tonne of input material, plants incur a variable operating cost ( $/tonne ), spend some amount of energy ( GJ/tonne ), and produce multiple types of emissions ( tonne/tonne ). Plants also incur a fixed operating cost ( $ ) regardless of the amount of material they process. All these parameters are user-specified and may be region- and time-specific. Plants can be built at user-specified potential locations. Opening a plant incurs a one-time opening cost ( $ ) which may be region- and time-specific. Plants also have a limited capacity (in tonne ), 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. 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 ( $/tonne ). To model environmental regulations, it is also possible to specify the maximum amount of each product that can be disposed of at each location. All user parameters specified above must be provided to RELOG as a JSON file, which is fully described in the data format page . 3. Running the optimization 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: using RELOG RELOG.solve(\"/home/user/instance.json\", output=\"/home/user/solution.json\") The optimal logistics plan will be stored in the output file specified. See data format page for a description of this output file. 4. Advanced options 4.1 Changing the solver By default, RELOG internally uses Cbc , an open-source and freely-available Mixed-Integer Linear Programming solver developed by the COIN-OR Project . 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: using RELOG, Gurobi, JuMP gurobi = optimizer_with_attributes(Gurobi.Optimizer, \"TimeLimit\" => 3600, \"MIPGap\" => 0.001) RELOG.solve(\"instance.json\", output=\"solution.json\", optimizer=gurobi)","title":"Usage"},{"location":"usage/#usage","text":"","title":"Usage"},{"location":"usage/#1-installation","text":"To use RELOG, the first step is to install the Julia programming language 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 ] to switch to package manger mode, then run: (@v1.5) pkg> add https://github.com/ANL-CEEESA/RELOG.git 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: (@v1.5) pkg> test RELOG To update the package to a newer version, type ] to enter the package manager mode, then run: (@v1.5) pkg> update RELOG","title":"1. Installation"},{"location":"usage/#2-modeling-the-problem","text":"The two main model components in RELOG are products and plants . A product 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. 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. Transporting products from one location to another incurs a transportation cost ( $/km/tonne ), spends some amount of energy ( J/km/tonne ) and may generate multiple types of emissions ( tonne/tonne ). All these parameters are user-specified and may be product- and time-specific. A plant 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 disassembly plant , which converts batteries into cathode and anode . Another type of plant could be anode recycling plant , which converts anode into rare-earth elements and scrap metals . To process each tonne of input material, plants incur a variable operating cost ( $/tonne ), spend some amount of energy ( GJ/tonne ), and produce multiple types of emissions ( tonne/tonne ). Plants also incur a fixed operating cost ( $ ) regardless of the amount of material they process. All these parameters are user-specified and may be region- and time-specific. Plants can be built at user-specified potential locations. Opening a plant incurs a one-time opening cost ( $ ) which may be region- and time-specific. Plants also have a limited capacity (in tonne ), 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. 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 ( $/tonne ). To model environmental regulations, it is also possible to specify the maximum amount of each product that can be disposed of at each location. All user parameters specified above must be provided to RELOG as a JSON file, which is fully described in the data format page .","title":"2. Modeling the problem"},{"location":"usage/#3-running-the-optimization","text":"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: using RELOG RELOG.solve(\"/home/user/instance.json\", output=\"/home/user/solution.json\") The optimal logistics plan will be stored in the output file specified. See data format page for a description of this output file.","title":"3. Running the optimization"},{"location":"usage/#4-advanced-options","text":"","title":"4. Advanced options"},{"location":"usage/#41-changing-the-solver","text":"By default, RELOG internally uses Cbc , an open-source and freely-available Mixed-Integer Linear Programming solver developed by the COIN-OR Project . 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: using RELOG, Gurobi, JuMP gurobi = optimizer_with_attributes(Gurobi.Optimizer, \"TimeLimit\" => 3600, \"MIPGap\" => 0.001) RELOG.solve(\"instance.json\", output=\"solution.json\", optimizer=gurobi)","title":"4.1 Changing the solver"}]} \ No newline at end of file +{"config":{"lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"RELOG: Reverse Logistics Optimization RELOG is an open-source supply chain optimization package focusing on reverse logistics and reverse manufacturing. The package uses Mixed-Integer Linear Programming to determine where to build recycling plants, what size should these plants have and which customers should be served by which plants. The package supports custom reverse logistics pipelines, with multiple types of plants, multiple types of product and multiple time periods. Table of Contents Usage Data Format Optimization model Source Code https://anl-ceeesa.github.io/RELOG/ Authors Alinson S. Xavier, Argonne National Laboratory < axavier@anl.gov > Nwike Iloeje, Argonne National Laboratory < ciloeje@anl.gov > License RELOG: Reverse Logistics Optimization Copyright \u00a9 2020, UChicago Argonne, LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"Home"},{"location":"#relog-reverse-logistics-optimization","text":"RELOG is an open-source supply chain optimization package focusing on reverse logistics and reverse manufacturing. The package uses Mixed-Integer Linear Programming to determine where to build recycling plants, what size should these plants have and which customers should be served by which plants. The package supports custom reverse logistics pipelines, with multiple types of plants, multiple types of product and multiple time periods.","title":"RELOG: Reverse Logistics Optimization"},{"location":"#table-of-contents","text":"Usage Data Format Optimization model","title":"Table of Contents"},{"location":"#source-code","text":"https://anl-ceeesa.github.io/RELOG/","title":"Source Code"},{"location":"#authors","text":"Alinson S. Xavier, Argonne National Laboratory < axavier@anl.gov > Nwike Iloeje, Argonne National Laboratory < ciloeje@anl.gov >","title":"Authors"},{"location":"#license","text":"RELOG: Reverse Logistics Optimization Copyright \u00a9 2020, UChicago Argonne, LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"License"},{"location":"format/","text":"Input Data Format The first step when using RELOG is to describe the reverse logistics pipeline and the relevant data. RELOG accepts as input a JSON file with three sections: parameters , products and plants . Below, we describe each section in more detail. Parameters The parameters section describes details about the simulation itself. Key Description time horizon (years) Number of years in the simulation. building period (years) List of years in which we are allowed to open new plants. For example, if this parameter is set to [1,2,3] , we can only open plants during the first three years. By default, this equals [1] ; that is, plants can only be opened during the first year. Example { \"parameters\": { \"time horizon (years)\": 2, \"building period (years)\": [1] } } Products The products section describes all products and subproducts in the simulation. The field instance[\"Products\"] is a dictionary mapping the name of the product to a dictionary which describes its characteristics. Each product description contains the following keys: Key Description transportation cost ($/km/tonne) The cost to transport this product. Must be a timeseries. transportation energy (J/km/tonne) The energy required to transport this product. Must be a timeseries. Optional. transportation emissions (tonne/km/tonne) A dictionary mapping the name of each greenhouse gas, produced to transport one tonne of this product along one kilometer, to the amount of gas produced (in tonnes). Must be a timeseries. Optional. initial amounts A dictionary mapping the name of each location to its description (see below). If this product is not initially available, this key may be omitted. Must be a timeseries. Each product may have some amount available at the beginning of each time period. In this case, the key initial amounts maps to a dictionary with the following keys: Key Description latitude (deg) The latitude of the location. longitude (deg) The longitude of the location. amount (tonne) The amount of the product initially available at the location. Must be a timeseries. Example { \"products\": { \"P1\": { \"initial amounts\": { \"C1\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 7.0, \"amount (tonne)\": [934.56, 934.56] }, \"C2\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 19.0, \"amount (tonne)\": [198.95, 198.95] }, \"C3\": { \"latitude (deg)\": 84.0, \"longitude (deg)\": 76.0, \"amount (tonne)\": [212.97, 212.97] } }, \"transportation cost ($/km/tonne)\": [0.015, 0.015], \"transportation energy (J/km/tonne)\": [0.12, 0.11], \"transportation emissions (tonne/km/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] } }, \"P2\": { \"transportation cost ($/km/tonne)\": [0.022, 0.020] }, \"P3\": { \"transportation cost ($/km/tonne)\": [0.0125, 0.0125] }, \"P4\": { \"transportation cost ($/km/tonne)\": [0.0175, 0.0175] } } } Processing Plants The plants section describes the available types of reverse manufacturing plants, their potential locations and associated costs, as well as their inputs and outputs. The field instance[\"Plants\"] is a dictionary mapping the name of the plant to a dictionary with the following keys: Key Description input The name of the product that this plant takes as input. Only one input is accepted per plant. outputs (tonne/tonne) A dictionary specifying how many tonnes of each product is produced for each tonnes of input. For example, if the plant outputs 0.5 tonnes of P2 and 0.25 tonnes of P3 for each tonnes of P1 provided, then this entry should be {\"P2\": 0.5, \"P3\": 0.25} . If the plant does not output anything, this key may be omitted. energy (GJ/tonne) The energy required to process 1 tonne of the input. Must be a timeseries. Optional. emissions (tonne/tonne) A dictionary mapping the name of each greenhouse gas, produced to process each tonne of input, to the amount of gas produced (in tonne). Must be a timeseries. Optional. locations A dictionary mapping the name of the location to a dictionary which describes the site characteristics (see below). Each type of plant is associated with a set of potential locations where it can be built. Each location is represented by a dictionary with the following keys: Key Description latitude (deg) The latitude of the location, in degrees. longitude (deg) The longitude of the location, in degrees. disposal A dictionary describing what products can be disposed locally at the plant. capacities (tonne) A dictionary describing what plant sizes are allowed, and their characteristics. The keys in the disposal dictionary should be the names of the products. The values are dictionaries with the following keys: Key Description cost ($/tonne) The cost to dispose of the product. Must be a timeseries. limit (tonne) The maximum amount that can be disposed of. If an unlimited amount can be disposed, this key may be omitted. Must be a timeseries. The keys in the capacities (tonne) dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys: Key Description opening cost ($) The cost to open a plant of this size. fixed operating cost ($) The cost to keep the plant open, even if the plant doesn't process anything. Must be a timeseries. variable operating cost ($/tonne) The cost that the plant incurs to process each tonne of input. Must be a timeseries. Example { \"plants\": { \"F1\": { \"input\": \"P1\", \"outputs (tonne/tonne)\": { \"P2\": 0.2, \"P3\": 0.5 }, \"energy (GJ/tonne)\": [0.12, 0.11], \"emissions (tonne/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] }, \"locations\": { \"L1\": { \"latitude (deg)\": 0.0, \"longitude (deg)\": 0.0, \"disposal\": { \"P2\": { \"cost ($/tonne)\": [-10.0, -12.0], \"limit (tonne)\": [1.0, 1.0] } }, \"capacities (tonne)\": { \"100\": { \"opening cost ($)\": [500, 530], \"fixed operating cost ($)\": [300.0, 310.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] }, \"500\": { \"opening cost ($)\": [750, 760], \"fixed operating cost ($)\": [400.0, 450.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] } } } } } } } Current limitations Each plant can only be opened exactly once. After open, the plant remains open until the end of the simulation. Plants can be expanded at any time, even long after they are open. All material available at the beginning of a time period must be entirely processed by the end of that time period. It is not possible to store unprocessed materials from one time period to the next. Up to two plant sizes are currently supported. Variable operating costs must be the same for all plant sizes.","title":"Data Format"},{"location":"format/#input-data-format","text":"The first step when using RELOG is to describe the reverse logistics pipeline and the relevant data. RELOG accepts as input a JSON file with three sections: parameters , products and plants . Below, we describe each section in more detail.","title":"Input Data Format"},{"location":"format/#parameters","text":"The parameters section describes details about the simulation itself. Key Description time horizon (years) Number of years in the simulation. building period (years) List of years in which we are allowed to open new plants. For example, if this parameter is set to [1,2,3] , we can only open plants during the first three years. By default, this equals [1] ; that is, plants can only be opened during the first year.","title":"Parameters"},{"location":"format/#example","text":"{ \"parameters\": { \"time horizon (years)\": 2, \"building period (years)\": [1] } }","title":"Example"},{"location":"format/#products","text":"The products section describes all products and subproducts in the simulation. The field instance[\"Products\"] is a dictionary mapping the name of the product to a dictionary which describes its characteristics. Each product description contains the following keys: Key Description transportation cost ($/km/tonne) The cost to transport this product. Must be a timeseries. transportation energy (J/km/tonne) The energy required to transport this product. Must be a timeseries. Optional. transportation emissions (tonne/km/tonne) A dictionary mapping the name of each greenhouse gas, produced to transport one tonne of this product along one kilometer, to the amount of gas produced (in tonnes). Must be a timeseries. Optional. initial amounts A dictionary mapping the name of each location to its description (see below). If this product is not initially available, this key may be omitted. Must be a timeseries. Each product may have some amount available at the beginning of each time period. In this case, the key initial amounts maps to a dictionary with the following keys: Key Description latitude (deg) The latitude of the location. longitude (deg) The longitude of the location. amount (tonne) The amount of the product initially available at the location. Must be a timeseries.","title":"Products"},{"location":"format/#example_1","text":"{ \"products\": { \"P1\": { \"initial amounts\": { \"C1\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 7.0, \"amount (tonne)\": [934.56, 934.56] }, \"C2\": { \"latitude (deg)\": 7.0, \"longitude (deg)\": 19.0, \"amount (tonne)\": [198.95, 198.95] }, \"C3\": { \"latitude (deg)\": 84.0, \"longitude (deg)\": 76.0, \"amount (tonne)\": [212.97, 212.97] } }, \"transportation cost ($/km/tonne)\": [0.015, 0.015], \"transportation energy (J/km/tonne)\": [0.12, 0.11], \"transportation emissions (tonne/km/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] } }, \"P2\": { \"transportation cost ($/km/tonne)\": [0.022, 0.020] }, \"P3\": { \"transportation cost ($/km/tonne)\": [0.0125, 0.0125] }, \"P4\": { \"transportation cost ($/km/tonne)\": [0.0175, 0.0175] } } }","title":"Example"},{"location":"format/#processing-plants","text":"The plants section describes the available types of reverse manufacturing plants, their potential locations and associated costs, as well as their inputs and outputs. The field instance[\"Plants\"] is a dictionary mapping the name of the plant to a dictionary with the following keys: Key Description input The name of the product that this plant takes as input. Only one input is accepted per plant. outputs (tonne/tonne) A dictionary specifying how many tonnes of each product is produced for each tonnes of input. For example, if the plant outputs 0.5 tonnes of P2 and 0.25 tonnes of P3 for each tonnes of P1 provided, then this entry should be {\"P2\": 0.5, \"P3\": 0.25} . If the plant does not output anything, this key may be omitted. energy (GJ/tonne) The energy required to process 1 tonne of the input. Must be a timeseries. Optional. emissions (tonne/tonne) A dictionary mapping the name of each greenhouse gas, produced to process each tonne of input, to the amount of gas produced (in tonne). Must be a timeseries. Optional. locations A dictionary mapping the name of the location to a dictionary which describes the site characteristics (see below). Each type of plant is associated with a set of potential locations where it can be built. Each location is represented by a dictionary with the following keys: Key Description latitude (deg) The latitude of the location, in degrees. longitude (deg) The longitude of the location, in degrees. disposal A dictionary describing what products can be disposed locally at the plant. capacities (tonne) A dictionary describing what plant sizes are allowed, and their characteristics. The keys in the disposal dictionary should be the names of the products. The values are dictionaries with the following keys: Key Description cost ($/tonne) The cost to dispose of the product. Must be a timeseries. limit (tonne) The maximum amount that can be disposed of. If an unlimited amount can be disposed, this key may be omitted. Must be a timeseries. The keys in the capacities (tonne) dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys: Key Description opening cost ($) The cost to open a plant of this size. fixed operating cost ($) The cost to keep the plant open, even if the plant doesn't process anything. Must be a timeseries. variable operating cost ($/tonne) The cost that the plant incurs to process each tonne of input. Must be a timeseries.","title":"Processing Plants"},{"location":"format/#example_2","text":"{ \"plants\": { \"F1\": { \"input\": \"P1\", \"outputs (tonne/tonne)\": { \"P2\": 0.2, \"P3\": 0.5 }, \"energy (GJ/tonne)\": [0.12, 0.11], \"emissions (tonne/tonne)\": { \"CO2\": [0.052, 0.050], \"CH4\": [0.003, 0.002] }, \"locations\": { \"L1\": { \"latitude (deg)\": 0.0, \"longitude (deg)\": 0.0, \"disposal\": { \"P2\": { \"cost ($/tonne)\": [-10.0, -12.0], \"limit (tonne)\": [1.0, 1.0] } }, \"capacities (tonne)\": { \"100\": { \"opening cost ($)\": [500, 530], \"fixed operating cost ($)\": [300.0, 310.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] }, \"500\": { \"opening cost ($)\": [750, 760], \"fixed operating cost ($)\": [400.0, 450.0], \"variable operating cost ($/tonne)\": [5.0, 5.2] } } } } } } }","title":"Example"},{"location":"format/#current-limitations","text":"Each plant can only be opened exactly once. After open, the plant remains open until the end of the simulation. Plants can be expanded at any time, even long after they are open. All material available at the beginning of a time period must be entirely processed by the end of that time period. It is not possible to store unprocessed materials from one time period to the next. Up to two plant sizes are currently supported. Variable operating costs must be the same for all plant sizes.","title":"Current limitations"},{"location":"model/","text":"Optimization Model In this page, we describe the precise mathematical optimization model used by RELOG to find the optimal logistics plan. This model is a variation of the classical Facility Location Problem, which has been widely studied in the operations research literature. To simplify the exposition, we present the simplified case where there is only one type of plant. Mathematical Description Sets $L$ - Set of locations holding the original material to be recycled $M$ - Set of materials recovered during the reverse manufacturing process $P$ - Set of potential plants to open $T = { 1, \\ldots, t^{max} } $ - Set of time periods Constants Plants: $c^\\text{disp}_{pmt}$ - Cost of disposing one tonne of material $m$ at plant $p$ during time $t$ ( $/tonne/km ) $c^\\text{exp}_{pt}$ - Cost of adding one tonne of capacity to plant $p$ at time $t$ ( $/tonne ) $c^\\text{open}_{pt}$ - Cost of opening plant $p$ at time $t$, at minimum capacity ( $ ) $c^\\text{f-base}_{pt}$ - Fixed cost of keeping plant $p$ open during time period $t$ ( $ ) $c^\\text{f-exp}_{pt}$ - Increase in fixed cost for each additional tonne of capacity ( $/tonne ) $c^\\text{var}_{pt}$ - Variable cost of processing one tonne of input at plant $p$ at time $t$ ( $/tonne ) $m^\\text{min}_p$ - Minimum capacity of plant $p$ ( tonne ) $m^\\text{max}_p$ - Maximum capacity of plant $p$ ( tonne ) $m^\\text{disp}_{pmt}$ - Maximum amount of material $m$ that plant $p$ can dispose of during time $t$ ( tonne ) Products: $\\alpha_{pm}$ - Amount of material $m$ recovered by plant $t$ for each tonne of original material ( tonne/tonne ) $m^\\text{initial}_{lt}$ - Amount of original material to be recycled at location $l$ during time $t$ ( tonne ) Transportation: $c^\\text{tr}_{t}$ - Transportation cost during time $t$ ( $/tonne/km ) $d_{lp}$ - Distance between plant $p$ and location $l$ ( km ) Decision variables $q_{mpt}$ - Amount of material $m$ recovered by plant $p$ during time $t$ ( tonne ) $u_{pt}$ - Binary variable that equals 1 if plant $p$ starts operating at time $t$ ( bool ) $w_{pt}$ - Extra capacity (amount above the minimum) added to plant $p$ during time $t$ ( tonne ) $x_{pt}$ - Binary variable that equals 1 if plant $p$ is operational at time $t$ ( bool ) $y_{lpt}$ - Amount of product sent from location $l$ to plant $p$ during time $t$ ( tonne ) $z_{mpt}$ - Amount of material $m$ disposed of by plant $p$ during time $t$ ( tonne ) Objective function RELOG minimizes the overall capital, production and transportation costs: \\begin{align*} \\text{minimize} \\;\\; & \\sum_{t \\in T} \\sum_{p \\in P} \\left[ c^\\text{open}_{pt} u_{pt} + c^\\text{f-base}_{pt} x_{pt} + \\sum_{i=1}^t c^\\text{f-exp}_{pt} w_{pi} + c^{\\text{exp}}_{pt} w_{pt} \\right] + \\\\ & \\sum_{t \\in T} \\sum_{l \\in L} \\sum_{p \\in P} \\left[ c^{\\text{tr}}_t d_{lp} + c^{\\text{var}}_{pt} \\right] y_{lpt} + \\\\ & \\sum_{t \\in T} \\sum_{p \\in P} \\sum_{m \\in M} c^{\\text{disp}}_{pmt} z_{pmt} \\end{align*} In the first line, we have (i) opening costs, if plant starts operating at time $t$, (ii) fixed operating costs, if plant is operational, (iii) additional fixed operating costs coming from expansion performed in all previous time periods up to the current one, and finally (iv) the expansion costs during the current time period. In the second line, we have the transportation costs and the variable operating costs. In the third line, we have the disposal costs. Constraints All original materials must be sent to a plant: \\begin{align} & \\sum_{p \\in P} y_{lpt} = m^\\text{initial}_{lt} & \\forall l \\in L, t \\in T \\end{align} Plants have a limited capacity: \\begin{align} & \\sum_{l \\in L} y_{lpt} \\leq m^\\text{min}_p x_p + \\sum_{i=1}^t w_p & \\forall p \\in P, t \\in T \\end{align} Plants can only be expanded up to their maximum capacity. Furthermore, if a plant is closed, it cannot be expanded: \\begin{align} & \\sum_{i=1}^t w_p \\leq m^\\text{max}_p x_p & \\forall p \\in P, t \\in T \\end{align} Amount of recovered material is proportional to the plant input: \\begin{align} & q_{mpt} = \\alpha_{pm} \\sum_{l \\in L} y_{lpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} Because we only consider a single type of plant, all recovered material must be immediately disposed of. In RELOG's full model, recovered materials may be sent to another plant for further processing. \\begin{align} & q_{mpt} = z_{mpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} A plant is operation at time $t$ if it was operational at time $t-1$ or it was built at time $t$. This constraint also prevents a plant from being built multiple times. \\begin{align} & x_{pt} = x_{p,t-1} + u_{pt} & \\forall p \\in P, t \\in T \\setminus \\{1\\} \\\\ & x_{p,1} = u_{p,1} & \\forall p \\in P \\end{align} Variable bounds: \\begin{align} & q_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ & u_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & w_{pt} \\geq 0 & \\forall p \\in P, t \\in T \\\\ & x_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & y_{lpt} \\geq 0 & \\forall l \\in L, p \\in P, t \\in T \\\\ & m^\\text{disp}_{mpt} \\geq z_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\end{align} Complete optimization model \\begin{align*} \\text{minimize} \\;\\; & \\sum_{t \\in T} \\sum_{p \\in P} \\left[ c^\\text{open}_{pt} u_{pt} + c^\\text{f-base}_{pt} x_{pt} + \\sum_{i=1}^t c^\\text{f-exp}_{pt} w_{pi} + c^{\\text{exp}}_{pt} w_{pt} \\right] + \\\\ & \\sum_{t \\in T} \\sum_{l \\in L} \\sum_{p \\in P} \\left[ c^{\\text{tr}}_t d_{lp} + c^{\\text{var}}_{pt} \\right] y_{lpt} + \\\\ & \\sum_{t \\in T} \\sum_{p \\in P} \\sum_{m \\in M} c^{\\text{disp}}_{pmt} z_{pmt} \\\\ \\text{subject to } & \\sum_{p \\in P} y_{lpt} = m^\\text{initial}_{lt} & \\forall l \\in L, t \\in T \\\\ & \\sum_{l \\in L} y_{lpt} \\leq m^\\text{min}_p x_p + \\sum_{i=1}^t w_p & \\forall p \\in P, t \\in T \\\\ & \\sum_{i=1}^t w_p \\leq m^\\text{max}_p x_p & \\forall p \\in P, t \\in T \\\\ & q_{mpt} = \\alpha_{pm} \\sum_{l \\in L} y_{lpt} & \\forall m \\in M, p \\in P, t \\in T \\\\ & q_{mpt} = z_{mpt} & \\forall m \\in M, p \\in P, t \\in T \\\\ & x_{pt} = x_{p,t-1} + u_{pt} & \\forall p \\in P, t \\in T \\setminus \\{1\\} \\\\ & x_{p,1} = u_{p,1} & \\forall p \\in P \\\\ & q_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ & u_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & w_{pt} \\geq 0 & \\forall p \\in P, t \\in T \\\\ & x_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & y_{lpt} \\geq 0 & \\forall l \\in L, p \\in P, t \\in T \\\\ & m^\\text{disp}_{mpt} \\geq z_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\end{align*}","title":"Optimization Model"},{"location":"model/#optimization-model","text":"In this page, we describe the precise mathematical optimization model used by RELOG to find the optimal logistics plan. This model is a variation of the classical Facility Location Problem, which has been widely studied in the operations research literature. To simplify the exposition, we present the simplified case where there is only one type of plant.","title":"Optimization Model"},{"location":"model/#mathematical-description","text":"","title":"Mathematical Description"},{"location":"model/#sets","text":"$L$ - Set of locations holding the original material to be recycled $M$ - Set of materials recovered during the reverse manufacturing process $P$ - Set of potential plants to open $T = { 1, \\ldots, t^{max} } $ - Set of time periods","title":"Sets"},{"location":"model/#constants","text":"Plants: $c^\\text{disp}_{pmt}$ - Cost of disposing one tonne of material $m$ at plant $p$ during time $t$ ( $/tonne/km ) $c^\\text{exp}_{pt}$ - Cost of adding one tonne of capacity to plant $p$ at time $t$ ( $/tonne ) $c^\\text{open}_{pt}$ - Cost of opening plant $p$ at time $t$, at minimum capacity ( $ ) $c^\\text{f-base}_{pt}$ - Fixed cost of keeping plant $p$ open during time period $t$ ( $ ) $c^\\text{f-exp}_{pt}$ - Increase in fixed cost for each additional tonne of capacity ( $/tonne ) $c^\\text{var}_{pt}$ - Variable cost of processing one tonne of input at plant $p$ at time $t$ ( $/tonne ) $m^\\text{min}_p$ - Minimum capacity of plant $p$ ( tonne ) $m^\\text{max}_p$ - Maximum capacity of plant $p$ ( tonne ) $m^\\text{disp}_{pmt}$ - Maximum amount of material $m$ that plant $p$ can dispose of during time $t$ ( tonne ) Products: $\\alpha_{pm}$ - Amount of material $m$ recovered by plant $t$ for each tonne of original material ( tonne/tonne ) $m^\\text{initial}_{lt}$ - Amount of original material to be recycled at location $l$ during time $t$ ( tonne ) Transportation: $c^\\text{tr}_{t}$ - Transportation cost during time $t$ ( $/tonne/km ) $d_{lp}$ - Distance between plant $p$ and location $l$ ( km )","title":"Constants"},{"location":"model/#decision-variables","text":"$q_{mpt}$ - Amount of material $m$ recovered by plant $p$ during time $t$ ( tonne ) $u_{pt}$ - Binary variable that equals 1 if plant $p$ starts operating at time $t$ ( bool ) $w_{pt}$ - Extra capacity (amount above the minimum) added to plant $p$ during time $t$ ( tonne ) $x_{pt}$ - Binary variable that equals 1 if plant $p$ is operational at time $t$ ( bool ) $y_{lpt}$ - Amount of product sent from location $l$ to plant $p$ during time $t$ ( tonne ) $z_{mpt}$ - Amount of material $m$ disposed of by plant $p$ during time $t$ ( tonne )","title":"Decision variables"},{"location":"model/#objective-function","text":"RELOG minimizes the overall capital, production and transportation costs: \\begin{align*} \\text{minimize} \\;\\; & \\sum_{t \\in T} \\sum_{p \\in P} \\left[ c^\\text{open}_{pt} u_{pt} + c^\\text{f-base}_{pt} x_{pt} + \\sum_{i=1}^t c^\\text{f-exp}_{pt} w_{pi} + c^{\\text{exp}}_{pt} w_{pt} \\right] + \\\\ & \\sum_{t \\in T} \\sum_{l \\in L} \\sum_{p \\in P} \\left[ c^{\\text{tr}}_t d_{lp} + c^{\\text{var}}_{pt} \\right] y_{lpt} + \\\\ & \\sum_{t \\in T} \\sum_{p \\in P} \\sum_{m \\in M} c^{\\text{disp}}_{pmt} z_{pmt} \\end{align*} In the first line, we have (i) opening costs, if plant starts operating at time $t$, (ii) fixed operating costs, if plant is operational, (iii) additional fixed operating costs coming from expansion performed in all previous time periods up to the current one, and finally (iv) the expansion costs during the current time period. In the second line, we have the transportation costs and the variable operating costs. In the third line, we have the disposal costs.","title":"Objective function"},{"location":"model/#constraints","text":"All original materials must be sent to a plant: \\begin{align} & \\sum_{p \\in P} y_{lpt} = m^\\text{initial}_{lt} & \\forall l \\in L, t \\in T \\end{align} Plants have a limited capacity: \\begin{align} & \\sum_{l \\in L} y_{lpt} \\leq m^\\text{min}_p x_p + \\sum_{i=1}^t w_p & \\forall p \\in P, t \\in T \\end{align} Plants can only be expanded up to their maximum capacity. Furthermore, if a plant is closed, it cannot be expanded: \\begin{align} & \\sum_{i=1}^t w_p \\leq m^\\text{max}_p x_p & \\forall p \\in P, t \\in T \\end{align} Amount of recovered material is proportional to the plant input: \\begin{align} & q_{mpt} = \\alpha_{pm} \\sum_{l \\in L} y_{lpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} Because we only consider a single type of plant, all recovered material must be immediately disposed of. In RELOG's full model, recovered materials may be sent to another plant for further processing. \\begin{align} & q_{mpt} = z_{mpt} & \\forall m \\in M, p \\in P, t \\in T \\end{align} A plant is operation at time $t$ if it was operational at time $t-1$ or it was built at time $t$. This constraint also prevents a plant from being built multiple times. \\begin{align} & x_{pt} = x_{p,t-1} + u_{pt} & \\forall p \\in P, t \\in T \\setminus \\{1\\} \\\\ & x_{p,1} = u_{p,1} & \\forall p \\in P \\end{align} Variable bounds: \\begin{align} & q_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ & u_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & w_{pt} \\geq 0 & \\forall p \\in P, t \\in T \\\\ & x_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & y_{lpt} \\geq 0 & \\forall l \\in L, p \\in P, t \\in T \\\\ & m^\\text{disp}_{mpt} \\geq z_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\end{align}","title":"Constraints"},{"location":"model/#complete-optimization-model","text":"\\begin{align*} \\text{minimize} \\;\\; & \\sum_{t \\in T} \\sum_{p \\in P} \\left[ c^\\text{open}_{pt} u_{pt} + c^\\text{f-base}_{pt} x_{pt} + \\sum_{i=1}^t c^\\text{f-exp}_{pt} w_{pi} + c^{\\text{exp}}_{pt} w_{pt} \\right] + \\\\ & \\sum_{t \\in T} \\sum_{l \\in L} \\sum_{p \\in P} \\left[ c^{\\text{tr}}_t d_{lp} + c^{\\text{var}}_{pt} \\right] y_{lpt} + \\\\ & \\sum_{t \\in T} \\sum_{p \\in P} \\sum_{m \\in M} c^{\\text{disp}}_{pmt} z_{pmt} \\\\ \\text{subject to } & \\sum_{p \\in P} y_{lpt} = m^\\text{initial}_{lt} & \\forall l \\in L, t \\in T \\\\ & \\sum_{l \\in L} y_{lpt} \\leq m^\\text{min}_p x_p + \\sum_{i=1}^t w_p & \\forall p \\in P, t \\in T \\\\ & \\sum_{i=1}^t w_p \\leq m^\\text{max}_p x_p & \\forall p \\in P, t \\in T \\\\ & q_{mpt} = \\alpha_{pm} \\sum_{l \\in L} y_{lpt} & \\forall m \\in M, p \\in P, t \\in T \\\\ & q_{mpt} = z_{mpt} & \\forall m \\in M, p \\in P, t \\in T \\\\ & x_{pt} = x_{p,t-1} + u_{pt} & \\forall p \\in P, t \\in T \\setminus \\{1\\} \\\\ & x_{p,1} = u_{p,1} & \\forall p \\in P \\\\ & q_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\\\ & u_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & w_{pt} \\geq 0 & \\forall p \\in P, t \\in T \\\\ & x_{pt} \\in \\{0,1\\} & \\forall p \\in P, t \\in T \\\\ & y_{lpt} \\geq 0 & \\forall l \\in L, p \\in P, t \\in T \\\\ & m^\\text{disp}_{mpt} \\geq z_{mpt} \\geq 0 & \\forall m \\in M, p \\in P, t \\in T \\end{align*}","title":"Complete optimization model"},{"location":"usage/","text":"Usage 1. Installation To use RELOG, the first step is to install the Julia programming language 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 ] to switch to package manger mode, then run: (@v1.5) pkg> add https://github.com/ANL-CEEESA/RELOG.git 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: (@v1.5) pkg> test RELOG To update the package to a newer version, type ] to enter the package manager mode, then run: (@v1.5) pkg> update RELOG 2. Modeling the problem The two main model components in RELOG are products and plants . A product 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. 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. Transporting products from one location to another incurs a transportation cost ( $/km/tonne ), spends some amount of energy ( J/km/tonne ) and may generate multiple types of emissions ( tonne/tonne ). All these parameters are user-specified and may be product- and time-specific. A plant 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 disassembly plant , which converts batteries into cathode and anode . Another type of plant could be anode recycling plant , which converts anode into rare-earth elements and scrap metals . To process each tonne of input material, plants incur a variable operating cost ( $/tonne ), spend some amount of energy ( GJ/tonne ), and produce multiple types of emissions ( tonne/tonne ). Plants also incur a fixed operating cost ( $ ) regardless of the amount of material they process. All these parameters are user-specified and may be region- and time-specific. Plants can be built at user-specified potential locations. Opening a plant incurs a one-time opening cost ( $ ) which may be region- and time-specific. Plants also have a limited capacity (in tonne ), 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. 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 ( $/tonne ). To model environmental regulations, it is also possible to specify the maximum amount of each product that can be disposed of at each location. All user parameters specified above must be provided to RELOG as a JSON file, which is fully described in the data format page . 3. Running the optimization 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: using RELOG RELOG.solve(\"/home/user/instance.json\", output=\"/home/user/solution.json\") The optimal logistics plan will be stored in the output file specified. See data format page for a description of this output file. 4. Advanced options 4.1 Changing the solver By default, RELOG internally uses Cbc , an open-source and freely-available Mixed-Integer Linear Programming solver developed by the COIN-OR Project . 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: using RELOG, Gurobi, JuMP gurobi = optimizer_with_attributes(Gurobi.Optimizer, \"TimeLimit\" => 3600, \"MIPGap\" => 0.001) RELOG.solve(\"instance.json\", output=\"solution.json\", optimizer=gurobi)","title":"Usage"},{"location":"usage/#usage","text":"","title":"Usage"},{"location":"usage/#1-installation","text":"To use RELOG, the first step is to install the Julia programming language 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 ] to switch to package manger mode, then run: (@v1.5) pkg> add https://github.com/ANL-CEEESA/RELOG.git 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: (@v1.5) pkg> test RELOG To update the package to a newer version, type ] to enter the package manager mode, then run: (@v1.5) pkg> update RELOG","title":"1. Installation"},{"location":"usage/#2-modeling-the-problem","text":"The two main model components in RELOG are products and plants . A product 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. 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. Transporting products from one location to another incurs a transportation cost ( $/km/tonne ), spends some amount of energy ( J/km/tonne ) and may generate multiple types of emissions ( tonne/tonne ). All these parameters are user-specified and may be product- and time-specific. A plant 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 disassembly plant , which converts batteries into cathode and anode . Another type of plant could be anode recycling plant , which converts anode into rare-earth elements and scrap metals . To process each tonne of input material, plants incur a variable operating cost ( $/tonne ), spend some amount of energy ( GJ/tonne ), and produce multiple types of emissions ( tonne/tonne ). Plants also incur a fixed operating cost ( $ ) regardless of the amount of material they process. All these parameters are user-specified and may be region- and time-specific. Plants can be built at user-specified potential locations. Opening a plant incurs a one-time opening cost ( $ ) which may be region- and time-specific. Plants also have a limited capacity (in tonne ), 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. 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 ( $/tonne ). To model environmental regulations, it is also possible to specify the maximum amount of each product that can be disposed of at each location. All user parameters specified above must be provided to RELOG as a JSON file, which is fully described in the data format page .","title":"2. Modeling the problem"},{"location":"usage/#3-running-the-optimization","text":"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: using RELOG RELOG.solve(\"/home/user/instance.json\", output=\"/home/user/solution.json\") The optimal logistics plan will be stored in the output file specified. See data format page for a description of this output file.","title":"3. Running the optimization"},{"location":"usage/#4-advanced-options","text":"","title":"4. Advanced options"},{"location":"usage/#41-changing-the-solver","text":"By default, RELOG internally uses Cbc , an open-source and freely-available Mixed-Integer Linear Programming solver developed by the COIN-OR Project . 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: using RELOG, Gurobi, JuMP gurobi = optimizer_with_attributes(Gurobi.Optimizer, \"TimeLimit\" => 3600, \"MIPGap\" => 0.001) RELOG.solve(\"instance.json\", output=\"solution.json\", optimizer=gurobi)","title":"4.1 Changing the solver"}]} \ No newline at end of file diff --git a/docs/sitemap.xml.gz b/docs/sitemap.xml.gz index 094fbd16a30429e2680e46f9691ee1b4ce3dfee3..13f05f2481b03ede60593b7b122b2216de002d5f 100644 GIT binary patch delta 14 VcmX@Yc!ZHnzMF%?)N3N!J^&ui1RnqZ delta 14 VcmX@Yc!ZHnzMF&NkjX^0eE=ai1eO2* diff --git a/src/docs/model.md b/src/docs/model.md index e54782b..1a884f8 100644 --- a/src/docs/model.md +++ b/src/docs/model.md @@ -81,7 +81,7 @@ In the third line, we have the disposal costs. * Plants have a limited capacity: \begin{align} - & \sum_{l \in L} y_{lpt} \leq m^\text{base}_p x_p + \sum_{i=1}^t w_p + & \sum_{l \in L} y_{lpt} \leq m^\text{min}_p x_p + \sum_{i=1}^t w_p & \forall p \in P, t \in T \end{align} @@ -151,7 +151,7 @@ In the third line, we have the disposal costs. \sum_{t \in T} \sum_{p \in P} \sum_{m \in M} c^{\text{disp}}_{pmt} z_{pmt} \\ \text{subject to } & \sum_{p \in P} y_{lpt} = m^\text{initial}_{lt} & \forall l \in L, t \in T \\ - & \sum_{l \in L} y_{lpt} \leq m^\text{base}_p x_p + \sum_{i=1}^t w_p + & \sum_{l \in L} y_{lpt} \leq m^\text{min}_p x_p + \sum_{i=1}^t w_p & \forall p \in P, t \in T \\ & \sum_{i=1}^t w_p \leq m^\text{max}_p x_p & \forall p \in P, t \in T \\