[Diff since v0.5.1](https://github.com/ANL-CEEESA/RELOG/compare/v0.5.1...v0.5.2)relog-web
@ -1,32 +1,22 @@
|
||||
JULIA := julia --color=yes --project=@.
|
||||
SRC_FILES := $(wildcard src/*.jl test/*.jl)
|
||||
VERSION := 0.5
|
||||
|
||||
all: docs test
|
||||
|
||||
build/sysimage.so: src/sysimage.jl Project.toml Manifest.toml
|
||||
mkdir -p build
|
||||
$(JULIA) src/sysimage.jl
|
||||
|
||||
build/test.log: $(SRC_FILES) build/sysimage.so
|
||||
cd test; $(JULIA) --sysimage ../build/sysimage.so runtests.jl
|
||||
|
||||
clean:
|
||||
rm -rf build/*
|
||||
rm -rfv build Manifest.toml test/Manifest.toml deps/formatter/build deps/formatter/Manifest.toml
|
||||
|
||||
docs:
|
||||
mkdocs build -d ../docs/$(VERSION)/
|
||||
|
||||
cd docs; julia --project=. make.jl; cd ..
|
||||
rsync -avP --delete-after docs/build/ ../docs/$(VERSION)/
|
||||
|
||||
docker-build:
|
||||
docker build --tag relog:0.6 .
|
||||
docker build --tag relog-web:$(VERSION) .
|
||||
|
||||
format:
|
||||
julia -e 'using JuliaFormatter; format(["src", "test"], verbose=true);'
|
||||
|
||||
test: build/test.log
|
||||
cd deps/formatter; ../../juliaw format.jl
|
||||
|
||||
test-watch:
|
||||
bash -c "while true; do make test --quiet; sleep 1; done"
|
||||
test: test/Manifest.toml
|
||||
./juliaw test/runtests.jl
|
||||
|
||||
.PHONY: docs test
|
||||
test/Manifest.toml: test/Project.toml
|
||||
julia --project=test -e "using Pkg; Pkg.instantiate()"
|
||||
|
||||
.PHONY: docs test format
|
||||
|
@ -0,0 +1,5 @@
|
||||
[deps]
|
||||
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
|
||||
|
||||
[compat]
|
||||
JuliaFormatter = "0.14.4"
|
@ -0,0 +1,8 @@
|
||||
using JuliaFormatter
|
||||
format(
|
||||
[
|
||||
"../../src",
|
||||
"../../test",
|
||||
],
|
||||
verbose=true,
|
||||
)
|
@ -0,0 +1,4 @@
|
||||
[deps]
|
||||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
|
||||
RELOG = "a2afcdf7-cf04-4913-85f9-c0d81ddf2008"
|
||||
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
|
@ -0,0 +1,19 @@
|
||||
using Documenter, RELOG
|
||||
|
||||
function make()
|
||||
makedocs(
|
||||
sitename="RELOG",
|
||||
pages=[
|
||||
"Home" => "index.md",
|
||||
"usage.md",
|
||||
"format.md",
|
||||
"reports.md",
|
||||
"model.md",
|
||||
],
|
||||
format = Documenter.HTML(
|
||||
assets=["assets/custom.css"],
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
make()
|
@ -0,0 +1,36 @@
|
||||
@media screen and (min-width: 1056px) {
|
||||
#documenter .docs-main {
|
||||
max-width: 65rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tbody, thead, pre {
|
||||
border: 1px solid rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
table td, th {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
table p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
table td code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table tr,
|
||||
table th {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
table tr:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: transparent;
|
||||
color: rgb(232, 62, 140);
|
||||
}
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 586 KiB After Width: | Height: | Size: 586 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@ -1,25 +1,29 @@
|
||||
# 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.
|
||||
|
||||
<img src="images/ex_transportation.png" width="1000px"/>
|
||||
```@raw html
|
||||
<center>
|
||||
<img src="assets/ex_transportation.png" width="1000px"/>
|
||||
</center>
|
||||
```
|
||||
|
||||
|
||||
### Table of Contents
|
||||
|
||||
* [Usage](usage.md)
|
||||
* [Input and Output Data Formats](format.md)
|
||||
* [Simplified Solution Reports](reports.md)
|
||||
* [Optimization Model](model.md)
|
||||
```@contents
|
||||
Pages = ["usage.md", "format.md", "reports.md", "model.md"]
|
||||
Depth = 3
|
||||
```
|
||||
|
||||
|
||||
### Source Code
|
||||
|
||||
* [https://github.com/ANL-CEEESA/RELOG](https://github.com/ANL-CEEESA/RELOG)
|
||||
|
||||
### Authors
|
||||
* **Alinson S. Xavier,** Argonne National Laboratory <<axavier@anl.gov>>
|
||||
* **Nwike Iloeje,** Argonne National Laboratory <<ciloeje@anl.gov>>
|
||||
* **Alinson S. Xavier,** Argonne National Laboratory <axavier@anl.gov>
|
||||
* **Nwike Iloeje,** Argonne National Laboratory <ciloeje@anl.gov>
|
||||
|
||||
### License
|
||||
|
@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
|
||||
# Copyright (C) 2020-2021, UChicago Argonne, LLC. All rights reserved.
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
if [ ! -e Project.toml ]; then
|
||||
echo "juliaw: Project.toml not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e Manifest.toml ]; then
|
||||
julia --project=. -e 'using Pkg; Pkg.instantiate()' || exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e build/sysimage.so -o Project.toml -nt build/sysimage.so ]; then
|
||||
echo "juliaw: rebuilding system image..."
|
||||
|
||||
# Generate temporary project folder
|
||||
rm -rf $HOME/.juliaw
|
||||
mkdir -p $HOME/.juliaw/src
|
||||
cp Project.toml Manifest.toml $HOME/.juliaw
|
||||
NAME=$(julia -e 'using TOML; toml = TOML.parsefile("Project.toml"); "name" in keys(toml) && print(toml["name"])')
|
||||
if [ ! -z $NAME ]; then
|
||||
cat > $HOME/.juliaw/src/$NAME.jl << EOF
|
||||
module $NAME
|
||||
end
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Add PackageCompiler dependencies to temporary project
|
||||
julia --project=$HOME/.juliaw -e 'using Pkg; Pkg.add(["PackageCompiler", "TOML", "Logging"])'
|
||||
|
||||
# Generate system image scripts
|
||||
cat > $HOME/.juliaw/sysimage.jl << EOF
|
||||
using PackageCompiler
|
||||
using TOML
|
||||
using Logging
|
||||
|
||||
Logging.disable_logging(Logging.Info)
|
||||
mkpath("$PWD/build")
|
||||
|
||||
println("juliaw: generating precompilation statements...")
|
||||
run(\`julia --project="$PWD" --trace-compile="$PWD"/build/precompile.jl \$(ARGS)\`)
|
||||
|
||||
println("juliaw: finding dependencies...")
|
||||
project = TOML.parsefile("Project.toml")
|
||||
manifest = TOML.parsefile("Manifest.toml")
|
||||
deps = Symbol[]
|
||||
for dep in keys(project["deps"])
|
||||
if dep in keys(manifest)
|
||||
# Up to Julia 1.6
|
||||
dep_entry = manifest[dep][1]
|
||||
else
|
||||
# Julia 1.7+
|
||||
dep_entry = manifest["deps"][dep][1]
|
||||
end
|
||||
if "path" in keys(dep_entry)
|
||||
println(" - \$(dep) [skip]")
|
||||
else
|
||||
println(" - \$(dep)")
|
||||
push!(deps, Symbol(dep))
|
||||
end
|
||||
end
|
||||
|
||||
println("juliaw: building system image...")
|
||||
create_sysimage(
|
||||
deps,
|
||||
precompile_statements_file = "$PWD/build/precompile.jl",
|
||||
sysimage_path = "$PWD/build/sysimage.so",
|
||||
)
|
||||
EOF
|
||||
julia --project=$HOME/.juliaw $HOME/.juliaw/sysimage.jl $*
|
||||
else
|
||||
julia --project=. --sysimage build/sysimage.so $*
|
||||
fi
|
@ -1,28 +0,0 @@
|
||||
.navbar-default {
|
||||
border-bottom: 0px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
a, .navbar-default a {
|
||||
color: #06a !important;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.disabled > a {
|
||||
color: #999 !important;
|
||||
}
|
||||
|
||||
.navbar-default a:hover,
|
||||
.navbar-default .active,
|
||||
.active > a {
|
||||
background-color: #f0f0f0 !important;
|
||||
}
|
||||
|
||||
.icon-bar {
|
||||
background-color: #666 !important;
|
||||
}
|
||||
|
||||
.navbar-collapse {
|
||||
border-color: #fff !important;
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
MathJax.Hub.Config({
|
||||
"tex2jax": { inlineMath: [ [ '$', '$' ] ] }
|
||||
});
|
||||
MathJax.Hub.Config({
|
||||
config: ["MMLorHTML.js"],
|
||||
jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"],
|
||||
extensions: ["MathMenu.js", "MathZoom.js"]
|
||||
});
|