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:
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:
Bar plot showing total amount produced for each product, grouped by year (in Python):
-
import pandas as pd
+
import pandas as pd
import seaborn as sns; sns.set()
data = pd.read_csv("plant_outputs_report.csv")
@@ -329,7 +329,6 @@ sns.barplot(x="amount produced (tonne)",
.sum()
.reset_index());
-
Plant emissions report
Report showing amount of emissions produced by each plant.
@@ -368,7 +367,7 @@ sns.barplot(x="amount produced (tonne)",
Bar plot showing total emission by plant type, grouped type of emissions (in Python):
-
import pandas as pd
+
import pandas as pd
import seaborn as sns; sns.set()
data = pd.read_csv("plant_emissions_report.csv")
@@ -379,7 +378,6 @@ sns.barplot(x="plant type",
.sum()
.reset_index());
-
Transportation report
Report showing amount of product sent from initial locations to plants, and from one plant to another. Includes the distance between each pair of locations, amount-distance shipped, transportation costs and energy expenditure.
@@ -458,7 +456,7 @@ sns.barplot(x="plant type",
Bar plot showing total amount-distance for each product type, grouped by year (in Python):
-
import pandas as pd
+
import pandas as pd
import seaborn as sns; sns.set()
data = pd.read_csv("transportation_report.csv")
@@ -469,12 +467,11 @@ sns.barplot(x="product",
.sum()
.reset_index());
-
Map of transportation lines (in Python):
-
import pandas as pd
+
import pandas as pd
import geopandas as gp
from shapely.geometry import Point, LineString
import matplotlib.pyplot as plt
@@ -511,7 +508,6 @@ gp.GeoDataFrame(data, geometry=points).plot(ax=ax,
color="red",
markersize=50);
-
Transportation emissions report
Report showing emissions for each trip between initial locations and plants, and between pairs of plants.
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:
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
+
(@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
+
(@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.
@@ -189,7 +188,7 @@
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:
-
# Import package
+
# Import package
using RELOG
# Solve optimization problem
@@ -202,12 +201,11 @@ RELOG.write(solution, "solution.json")
RELOG.write_plants_report(solution, "plants.csv")
RELOG.write_transportation_report(solution, "transportation.csv")
-
For a complete description of the file formats above, and for a complete list of available reports, see the data format page.
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:
For large-scale instances, it may be too time-consuming to find an exact optimal solution to the multi-period version of the problem. For these situations, RELOG includes a heuristic solution method, which proceeds as follows:
@@ -229,7 +226,7 @@ RELOG.solve("instance.json",
To solve an instance using this heuristic, use the option heuristic=true, as shown below.