mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-06 07:48:50 -06:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f988dd3f9 | |||
| 046ee52d9d | |||
| 583208aa53 | |||
| ae9388be2a | |||
| f26055a0fe | |||
| 12ae6aec45 | |||
| ab64fc4346 | |||
| 4a9266a1bf | |||
| 8b3f3206eb | |||
| 15f3120131 | |||
| 042c7cf601 | |||
| bc156c84d3 | |||
| 26c5cd1ca1 | |||
| 0fc64085a8 | |||
| b8cf6537a0 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,7 +1,10 @@
|
|||||||
.ipynb*
|
.ipynb*
|
||||||
*.ipynb
|
*.ipynb
|
||||||
|
instances/Manifest.toml
|
||||||
|
instances/Project.toml
|
||||||
instances/Makefile
|
instances/Makefile
|
||||||
instances/run.jl
|
instances/*.jl
|
||||||
|
instances/*.py
|
||||||
notebooks
|
notebooks
|
||||||
.idea
|
.idea
|
||||||
*.lp
|
*.lp
|
||||||
|
|||||||
6
CHANGELOG.md
Normal file
6
CHANGELOG.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Version 0.3 (June 25, 2020)
|
||||||
|
|
||||||
|
- Track emissions and energy (transportation and plants)
|
||||||
|
- Minor changes to input file format:
|
||||||
|
- Make all dictionary keys lowercase
|
||||||
|
- Rename "outputs (tonne)" to "output (tonne/tonne)"
|
||||||
8
Makefile
8
Makefile
@@ -1,11 +1,15 @@
|
|||||||
|
VERSION := 0.3
|
||||||
JULIA := julia --color=yes --project=.
|
JULIA := julia --color=yes --project=.
|
||||||
|
|
||||||
all: docs
|
all: docs
|
||||||
|
|
||||||
|
test:
|
||||||
|
$(JULIA) -e 'using Pkg; Pkg.test("RELOG")'
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
mkdocs build
|
mkdocs build
|
||||||
|
|
||||||
docs-push:
|
docs-push:
|
||||||
rsync -avP docs/ andromeda:/www/axavier.org/projects/RELOG/
|
rsync -avP docs/ isoron@axavier.org:/www/axavier.org/projects/RELOG/$(VERSION)/
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs test
|
||||||
|
|||||||
128
Manifest.toml
128
Manifest.toml
@@ -10,16 +10,10 @@ uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
|
|||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
|
|
||||||
[[BinaryProvider]]
|
[[BinaryProvider]]
|
||||||
deps = ["Libdl", "Logging", "SHA"]
|
deps = ["Libdl", "SHA"]
|
||||||
git-tree-sha1 = "428e9106b1ff27593cbd979afac9b45b82372b8c"
|
git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c"
|
||||||
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
|
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
|
||||||
version = "0.5.9"
|
version = "0.5.8"
|
||||||
|
|
||||||
[[Bzip2_jll]]
|
|
||||||
deps = ["Libdl", "Pkg"]
|
|
||||||
git-tree-sha1 = "3663bfffede2ef41358b6fc2e1d8a6d50b3c3904"
|
|
||||||
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
|
|
||||||
version = "1.0.6+2"
|
|
||||||
|
|
||||||
[[Calculus]]
|
[[Calculus]]
|
||||||
deps = ["LinearAlgebra"]
|
deps = ["LinearAlgebra"]
|
||||||
@@ -29,27 +23,33 @@ version = "0.5.1"
|
|||||||
|
|
||||||
[[Cbc]]
|
[[Cbc]]
|
||||||
deps = ["BinaryProvider", "Libdl", "MathOptInterface", "MathProgBase", "SparseArrays", "Test"]
|
deps = ["BinaryProvider", "Libdl", "MathOptInterface", "MathProgBase", "SparseArrays", "Test"]
|
||||||
git-tree-sha1 = "62d80f448b5d77b3f0a59cecf6197aad2a3aa280"
|
git-tree-sha1 = "0d51c2d66fc22e5e3fc64b6092ba0f0b3839c8c1"
|
||||||
uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
|
uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
|
||||||
version = "0.6.7"
|
version = "0.6.6"
|
||||||
|
|
||||||
|
[[Clp]]
|
||||||
|
deps = ["BinaryProvider", "Libdl", "LinearAlgebra", "MathOptInterface", "MathProgBase", "SparseArrays"]
|
||||||
|
git-tree-sha1 = "0872354eaeb05a86e400f45abaac1dc93da7bf76"
|
||||||
|
uuid = "e2554f3b-3117-50c0-817c-e040a3ddf72d"
|
||||||
|
version = "0.7.1"
|
||||||
|
|
||||||
[[CodeTracking]]
|
[[CodeTracking]]
|
||||||
deps = ["InteractiveUtils", "UUIDs"]
|
deps = ["InteractiveUtils", "UUIDs"]
|
||||||
git-tree-sha1 = "cab4da992adc0a64f63fa30d2db2fd8bec40cab4"
|
git-tree-sha1 = "0becdab7e6fbbcb7b88d8de5b72e5bb2f28239f3"
|
||||||
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
|
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
|
||||||
version = "0.5.11"
|
version = "0.5.8"
|
||||||
|
|
||||||
[[CodecBzip2]]
|
[[CodecBzip2]]
|
||||||
deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"]
|
deps = ["BinaryProvider", "Libdl", "TranscodingStreams"]
|
||||||
git-tree-sha1 = "2fee975d68f9a8b22187ae86e33c0829b30cf231"
|
git-tree-sha1 = "5db086e510c11b4c87d05067627eadb2dc079995"
|
||||||
uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
|
uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
|
||||||
version = "0.7.1"
|
version = "0.6.0"
|
||||||
|
|
||||||
[[CodecZlib]]
|
[[CodecZlib]]
|
||||||
deps = ["TranscodingStreams", "Zlib_jll"]
|
deps = ["BinaryProvider", "Libdl", "TranscodingStreams"]
|
||||||
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
|
git-tree-sha1 = "05916673a2627dd91b4969ff8ba6941bc85a960e"
|
||||||
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
|
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
|
||||||
version = "0.7.0"
|
version = "0.6.0"
|
||||||
|
|
||||||
[[CommonSubexpressions]]
|
[[CommonSubexpressions]]
|
||||||
deps = ["Test"]
|
deps = ["Test"]
|
||||||
@@ -59,21 +59,21 @@ version = "0.2.0"
|
|||||||
|
|
||||||
[[CompilerSupportLibraries_jll]]
|
[[CompilerSupportLibraries_jll]]
|
||||||
deps = ["Libdl", "Pkg"]
|
deps = ["Libdl", "Pkg"]
|
||||||
git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612"
|
git-tree-sha1 = "b57c5d019367c90f234a7bc7e24ff0a84971da5d"
|
||||||
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
|
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
|
||||||
version = "0.3.3+0"
|
version = "0.2.0+1"
|
||||||
|
|
||||||
[[CoordinateTransformations]]
|
[[CoordinateTransformations]]
|
||||||
deps = ["LinearAlgebra", "StaticArrays"]
|
deps = ["LinearAlgebra", "Rotations", "StaticArrays"]
|
||||||
git-tree-sha1 = "c230b1d94db9fdd073168830437e64b9db627fcb"
|
git-tree-sha1 = "71333ea3f841bca6c1aa2863f11758eb9b37bfbc"
|
||||||
uuid = "150eb455-5306-5404-9cee-2592286d6298"
|
uuid = "150eb455-5306-5404-9cee-2592286d6298"
|
||||||
version = "0.6.0"
|
version = "0.5.1"
|
||||||
|
|
||||||
[[DataStructures]]
|
[[DataStructures]]
|
||||||
deps = ["InteractiveUtils", "OrderedCollections"]
|
deps = ["InteractiveUtils", "OrderedCollections"]
|
||||||
git-tree-sha1 = "7d7578b00789cf16c5f68fad71868e773edd58a2"
|
git-tree-sha1 = "5a431d46abf2ef2a4d5d00bd0ae61f651cf854c8"
|
||||||
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
|
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
|
||||||
version = "0.17.16"
|
version = "0.17.10"
|
||||||
|
|
||||||
[[Dates]]
|
[[Dates]]
|
||||||
deps = ["Printf"]
|
deps = ["Printf"]
|
||||||
@@ -100,9 +100,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
|
|||||||
|
|
||||||
[[ForwardDiff]]
|
[[ForwardDiff]]
|
||||||
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
|
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
|
||||||
git-tree-sha1 = "869540e4367122fbffaace383a5bdc34d6e5e5ac"
|
git-tree-sha1 = "88b082d492be6b63f967b6c96b352e25ced1a34c"
|
||||||
uuid = "f6369f11-7733-5829-9624-2563aa707210"
|
uuid = "f6369f11-7733-5829-9624-2563aa707210"
|
||||||
version = "0.10.10"
|
version = "0.10.9"
|
||||||
|
|
||||||
[[Geodesy]]
|
[[Geodesy]]
|
||||||
deps = ["CoordinateTransformations", "Dates", "LinearAlgebra", "StaticArrays", "Test"]
|
deps = ["CoordinateTransformations", "Dates", "LinearAlgebra", "StaticArrays", "Test"]
|
||||||
@@ -112,9 +112,9 @@ version = "0.5.0"
|
|||||||
|
|
||||||
[[HTTP]]
|
[[HTTP]]
|
||||||
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"]
|
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"]
|
||||||
git-tree-sha1 = "fe31f4ff144392ad8176f5c7c03cca6ba320271c"
|
git-tree-sha1 = "8d9bdd55c9d0d6ddf08f8b5229f90b7f274b6777"
|
||||||
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
|
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
|
||||||
version = "0.8.14"
|
version = "0.8.12"
|
||||||
|
|
||||||
[[IniFile]]
|
[[IniFile]]
|
||||||
deps = ["Test"]
|
deps = ["Test"]
|
||||||
@@ -140,18 +140,17 @@ version = "0.2.0"
|
|||||||
|
|
||||||
[[JuMP]]
|
[[JuMP]]
|
||||||
deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "MutableArithmetics", "NaNMath", "Random", "SparseArrays", "Statistics"]
|
deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "MutableArithmetics", "NaNMath", "Random", "SparseArrays", "Statistics"]
|
||||||
git-tree-sha1 = "84c1cf8bec4729b8b2ef4dfc4e1db1b892ad0d30"
|
git-tree-sha1 = "8e87337fd19b6717fd9d5324bfab99848e363d9f"
|
||||||
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
|
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
|
||||||
version = "0.21.2"
|
version = "0.21.1"
|
||||||
|
|
||||||
[[JuliaInterpreter]]
|
[[JuliaInterpreter]]
|
||||||
deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"]
|
deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"]
|
||||||
git-tree-sha1 = "4ab65b7deb5af83f022f26ad3351a3bd5d80c6e2"
|
git-tree-sha1 = "2eadbbde5534346cbb837c3a75b377cba477a06d"
|
||||||
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
|
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
|
||||||
version = "0.7.16"
|
version = "0.7.13"
|
||||||
|
|
||||||
[[LibGit2]]
|
[[LibGit2]]
|
||||||
deps = ["Printf"]
|
|
||||||
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
|
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
|
||||||
|
|
||||||
[[Libdl]]
|
[[Libdl]]
|
||||||
@@ -166,9 +165,9 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
|
|||||||
|
|
||||||
[[LoweredCodeUtils]]
|
[[LoweredCodeUtils]]
|
||||||
deps = ["JuliaInterpreter"]
|
deps = ["JuliaInterpreter"]
|
||||||
git-tree-sha1 = "225f0035f01c24858c0884f38bb519e22b0a5150"
|
git-tree-sha1 = "1c41621653250b2824b6e664ac5bd805558aeff9"
|
||||||
uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
|
uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
|
||||||
version = "0.4.5"
|
version = "0.4.3"
|
||||||
|
|
||||||
[[Markdown]]
|
[[Markdown]]
|
||||||
deps = ["Base64"]
|
deps = ["Base64"]
|
||||||
@@ -176,9 +175,9 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
|
|||||||
|
|
||||||
[[MathOptInterface]]
|
[[MathOptInterface]]
|
||||||
deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "JSON", "JSONSchema", "LinearAlgebra", "MutableArithmetics", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
|
deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "JSON", "JSONSchema", "LinearAlgebra", "MutableArithmetics", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
|
||||||
git-tree-sha1 = "27f2ef85879b8f1d144266ab44f076ba0dfbd8a1"
|
git-tree-sha1 = "f0d60e42d8b64dd1b511e2dc13e0b72ba1dfc9cf"
|
||||||
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
|
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
|
||||||
version = "0.9.13"
|
version = "0.9.12"
|
||||||
|
|
||||||
[[MathProgBase]]
|
[[MathProgBase]]
|
||||||
deps = ["LinearAlgebra", "SparseArrays"]
|
deps = ["LinearAlgebra", "SparseArrays"]
|
||||||
@@ -188,24 +187,24 @@ version = "0.7.8"
|
|||||||
|
|
||||||
[[MbedTLS]]
|
[[MbedTLS]]
|
||||||
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
|
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
|
||||||
git-tree-sha1 = "426a6978b03a97ceb7ead77775a1da066343ec6e"
|
git-tree-sha1 = "a9e2221f06b42f56052f43ad7edecb01d0ef5ab4"
|
||||||
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
|
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
|
||||||
version = "1.0.2"
|
version = "1.0.1"
|
||||||
|
|
||||||
[[MbedTLS_jll]]
|
[[MbedTLS_jll]]
|
||||||
deps = ["Libdl", "Pkg"]
|
deps = ["Libdl", "Pkg"]
|
||||||
git-tree-sha1 = "c83f5a1d038f034ad0549f9ee4d5fac3fb429e33"
|
git-tree-sha1 = "066a4467008745eed36dad973ceb66405785a621"
|
||||||
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
|
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
|
||||||
version = "2.16.0+2"
|
version = "2.16.0+1"
|
||||||
|
|
||||||
[[Mmap]]
|
[[Mmap]]
|
||||||
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
|
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
|
||||||
|
|
||||||
[[MutableArithmetics]]
|
[[MutableArithmetics]]
|
||||||
deps = ["LinearAlgebra", "SparseArrays", "Test"]
|
deps = ["LinearAlgebra", "SparseArrays", "Test"]
|
||||||
git-tree-sha1 = "e1edd618a8f39d16f8595dd622a63b25f759cf8a"
|
git-tree-sha1 = "020d4f22e1151e0613edf91a56535379564c1ce8"
|
||||||
uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
|
uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
|
||||||
version = "0.2.9"
|
version = "0.2.7"
|
||||||
|
|
||||||
[[NaNMath]]
|
[[NaNMath]]
|
||||||
git-tree-sha1 = "928b8ca9b2791081dc71a51c55347c27c618760f"
|
git-tree-sha1 = "928b8ca9b2791081dc71a51c55347c27c618760f"
|
||||||
@@ -219,18 +218,19 @@ uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
|
|||||||
version = "0.5.3+3"
|
version = "0.5.3+3"
|
||||||
|
|
||||||
[[OrderedCollections]]
|
[[OrderedCollections]]
|
||||||
git-tree-sha1 = "12ce190210d278e12644bcadf5b21cbdcf225cd3"
|
deps = ["Random", "Serialization", "Test"]
|
||||||
|
git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
|
||||||
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
|
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
|
||||||
version = "1.2.0"
|
version = "1.1.0"
|
||||||
|
|
||||||
[[Parsers]]
|
[[Parsers]]
|
||||||
deps = ["Dates", "Test"]
|
deps = ["Dates", "Test"]
|
||||||
git-tree-sha1 = "f0abb338b4d00306500056a3fd44c221b8473ef2"
|
git-tree-sha1 = "0c16b3179190d3046c073440d94172cfc3bb0553"
|
||||||
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
|
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
|
||||||
version = "1.0.4"
|
version = "0.3.12"
|
||||||
|
|
||||||
[[Pkg]]
|
[[Pkg]]
|
||||||
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
|
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Test", "UUIDs"]
|
||||||
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
|
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
|
||||||
|
|
||||||
[[Printf]]
|
[[Printf]]
|
||||||
@@ -239,9 +239,9 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
|
|||||||
|
|
||||||
[[ProgressBars]]
|
[[ProgressBars]]
|
||||||
deps = ["Printf"]
|
deps = ["Printf"]
|
||||||
git-tree-sha1 = "fec529e15cccf342087de2ccda1b0b9064cbbb53"
|
git-tree-sha1 = "e66732bbdaad368cfc642cef1f639df5812dc818"
|
||||||
uuid = "49802e3a-d2f1-5c88-81d8-b72133a6f568"
|
uuid = "49802e3a-d2f1-5c88-81d8-b72133a6f568"
|
||||||
version = "0.7.1"
|
version = "0.6.0"
|
||||||
|
|
||||||
[[REPL]]
|
[[REPL]]
|
||||||
deps = ["InteractiveUtils", "Markdown", "Sockets"]
|
deps = ["InteractiveUtils", "Markdown", "Sockets"]
|
||||||
@@ -253,9 +253,15 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
|
|||||||
|
|
||||||
[[Revise]]
|
[[Revise]]
|
||||||
deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "UUIDs", "Unicode"]
|
deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "UUIDs", "Unicode"]
|
||||||
git-tree-sha1 = "3185d2ee31756af9e20ce045ddfaedcd0df9e4aa"
|
git-tree-sha1 = "3c04c929f8720c2fabb12534cd102a2356a7705c"
|
||||||
uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
|
uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
|
||||||
version = "2.6.6"
|
version = "2.5.4"
|
||||||
|
|
||||||
|
[[Rotations]]
|
||||||
|
deps = ["LinearAlgebra", "StaticArrays", "Statistics"]
|
||||||
|
git-tree-sha1 = "d5f83867093db7319a9366d55f29280ecae9bcda"
|
||||||
|
uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc"
|
||||||
|
version = "0.13.0"
|
||||||
|
|
||||||
[[SHA]]
|
[[SHA]]
|
||||||
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
|
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
|
||||||
@@ -272,15 +278,15 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
|
|||||||
|
|
||||||
[[SpecialFunctions]]
|
[[SpecialFunctions]]
|
||||||
deps = ["OpenSpecFun_jll"]
|
deps = ["OpenSpecFun_jll"]
|
||||||
git-tree-sha1 = "d8d8b8a9f4119829410ecd706da4cc8594a1e020"
|
git-tree-sha1 = "e19b98acb182567bcb7b75bb5d9eedf3a3b5ec6c"
|
||||||
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
|
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
|
||||||
version = "0.10.3"
|
version = "0.10.0"
|
||||||
|
|
||||||
[[StaticArrays]]
|
[[StaticArrays]]
|
||||||
deps = ["LinearAlgebra", "Random", "Statistics"]
|
deps = ["LinearAlgebra", "Random", "Statistics"]
|
||||||
git-tree-sha1 = "5c06c0aeb81bef54aed4b3f446847905eb6cbda0"
|
git-tree-sha1 = "5a3bcb6233adabde68ebc97be66e95dcb787424c"
|
||||||
uuid = "90137ffa-7385-5640-81b9-e52037218182"
|
uuid = "90137ffa-7385-5640-81b9-e52037218182"
|
||||||
version = "0.12.3"
|
version = "0.12.1"
|
||||||
|
|
||||||
[[Statistics]]
|
[[Statistics]]
|
||||||
deps = ["LinearAlgebra", "SparseArrays"]
|
deps = ["LinearAlgebra", "SparseArrays"]
|
||||||
@@ -302,9 +308,3 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
|
|||||||
|
|
||||||
[[Unicode]]
|
[[Unicode]]
|
||||||
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
|
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
|
||||||
|
|
||||||
[[Zlib_jll]]
|
|
||||||
deps = ["Libdl", "Pkg"]
|
|
||||||
git-tree-sha1 = "a2e0d558f6031002e380a90613b199e37a8565bf"
|
|
||||||
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
|
|
||||||
version = "1.2.11+10"
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
name = "RELOG"
|
name = "RELOG"
|
||||||
uuid = "a2afcdf7-cf04-4913-85f9-c0d81ddf2008"
|
uuid = "a2afcdf7-cf04-4913-85f9-c0d81ddf2008"
|
||||||
authors = ["Alinson S Xavier <axavier@anl.gov>"]
|
authors = ["Alinson S Xavier <axavier@anl.gov>"]
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
|
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
|
||||||
|
Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d"
|
||||||
Geodesy = "0ef565a4-170c-5f04-8de2-149903a85f3d"
|
Geodesy = "0ef565a4-170c-5f04-8de2-149903a85f3d"
|
||||||
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
|
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
|
||||||
JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
|
JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
|
||||||
@@ -23,4 +24,4 @@ JSON = "0.21"
|
|||||||
JSONSchema = "0.2"
|
JSONSchema = "0.2"
|
||||||
JuMP = "0.21"
|
JuMP = "0.21"
|
||||||
MathOptInterface = "0.9"
|
MathOptInterface = "0.9"
|
||||||
ProgressBars = "0.7"
|
ProgressBars = "0.6"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ RELOG: Reverse Logistics Optimization
|
|||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
* [https://axavier.org/projects/RELOG](https://axavier.org/projects/RELOG)
|
* [https://anl-ceeesa.github.io/RELOG/](https://anl-ceeesa.github.io/RELOG/)
|
||||||
|
|
||||||
### Authors
|
### Authors
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<h3 id="source-code">Source Code</h3>
|
<h3 id="source-code">Source Code</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://github.com/iSoron/RELOG">https://github.com/iSoron/RELOG</a></li>
|
<li><a href="https://anl-ceeesa.github.io/RELOG/">https://anl-ceeesa.github.io/RELOG/</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="authors">Authors</h3>
|
<h3 id="authors">Authors</h3>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -275,6 +275,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
</html>
|
</html>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
MkDocs version : 1.1
|
MkDocs version : 1.0.4
|
||||||
Build Date UTC : 2020-05-22 20:22:06
|
Build Date UTC : 2020-06-25 20:50:07
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -154,21 +154,21 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>time periods</code></td>
|
<td align="left"><code>time horizon (years)</code></td>
|
||||||
<td>Number of time periods in the simulation.</td>
|
<td>Number of years in the simulation.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 id="example">Example</h3>
|
<h3 id="example">Example</h3>
|
||||||
<pre><code class="json">{
|
<pre><code class="json">{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"time periods": 2
|
"time horizon (years)": 2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h2 id="products">Products</h2>
|
<h2 id="products">Products</h2>
|
||||||
<p>The <strong>products</strong> section describes all products and subproducts in the simulation. The field <code>instance["products"]</code> is a dictionary mapping the name of the product to a dictionary which describes its characteristics. Each product description contains the following keys:</p>
|
<p>The <strong>products</strong> section describes all products and subproducts in the simulation. The field <code>instance["Products"]</code> is a dictionary mapping the name of the product to a dictionary which describes its characteristics. Each product description contains the following keys:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -178,8 +178,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>transportation cost</code></td>
|
<td align="left"><code>transportation cost ($/km/tonne)</code></td>
|
||||||
<td>The cost (in dollars per km per tonnes) to transport this product. Must be a timeseries.</td>
|
<td>The cost to transport this product. Must be a timeseries.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left"><code>transportation energy (J/km/tonne)</code></td>
|
||||||
|
<td>The energy required to transport this product. Must be a timeseries. Optional.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left"><code>transportation emissions (tonne/km/tonne)</code></td>
|
||||||
|
<td>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.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>initial amounts</code></td>
|
<td align="left"><code>initial amounts</code></td>
|
||||||
@@ -197,16 +205,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>latitude</code></td>
|
<td align="left"><code>latitude (deg)</code></td>
|
||||||
<td>The latitude of the location, in degrees.</td>
|
<td>The latitude of the location.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>longitude</code></td>
|
<td align="left"><code>longitude (deg)</code></td>
|
||||||
<td>The longitude of the location, in degrees.</td>
|
<td>The longitude of the location.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>amount</code></td>
|
<td align="left"><code>amount (tonne)</code></td>
|
||||||
<td>The amount (in tonnes) of the product initially available at the location. Must be a timeseries.</td>
|
<td>The amount of the product initially available at the location. Must be a timeseries.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -214,40 +222,45 @@
|
|||||||
<pre><code class="json">{
|
<pre><code class="json">{
|
||||||
"products": {
|
"products": {
|
||||||
"P1": {
|
"P1": {
|
||||||
"transportation cost": [0.015, 0.015],
|
|
||||||
"initial amounts": {
|
"initial amounts": {
|
||||||
"C1": {
|
"C1": {
|
||||||
"latitude": 7.0,
|
"latitude (deg)": 7.0,
|
||||||
"longitude": 7.0,
|
"longitude (deg)": 7.0,
|
||||||
"amount": [934.56, 934.56]
|
"amount (tonne)": [934.56, 934.56]
|
||||||
},
|
},
|
||||||
"C2": {
|
"C2": {
|
||||||
"latitude": 7.0,
|
"latitude (deg)": 7.0,
|
||||||
"longitude": 19.0,
|
"longitude (deg)": 19.0,
|
||||||
"amount": [198.95, 198.95]
|
"amount (tonne)": [198.95, 198.95]
|
||||||
},
|
},
|
||||||
"C3": {
|
"C3": {
|
||||||
"latitude": 84.0,
|
"latitude (deg)": 84.0,
|
||||||
"longitude": 76.0,
|
"longitude (deg)": 76.0,
|
||||||
"amount": [212.97, 212.97]
|
"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": {
|
"P2": {
|
||||||
"transportation cost": [0.02, 0.02]
|
"transportation cost ($/km/tonne)": [0.022, 0.020]
|
||||||
},
|
},
|
||||||
"P3": {
|
"P3": {
|
||||||
"transportation cost": [0.0125, 0.0125]
|
"transportation cost ($/km/tonne)": [0.0125, 0.0125]
|
||||||
},
|
},
|
||||||
"P4": {
|
"P4": {
|
||||||
"transportation cost": [0.0175, 0.0175]
|
"transportation cost ($/km/tonne)": [0.0175, 0.0175]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h2 id="processing-plants">Processing Plants</h2>
|
<h2 id="processing-plants">Processing Plants</h2>
|
||||||
<p>The <strong>plants</strong> section describes the available types of reverse manufacturing plants, their potential locations and associated costs, as well as their inputs and outputs. The field <code>instance["plants"]</code> is a dictionary mapping the name of the plant to a dictionary with the following keys:</p>
|
<p>The <strong>plants</strong> section describes the available types of reverse manufacturing plants, their potential locations and associated costs, as well as their inputs and outputs. The field <code>instance["Plants"]</code> is a dictionary mapping the name of the plant to a dictionary with the following keys:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -261,10 +274,18 @@
|
|||||||
<td>The name of the product that this plant takes as input. Only one input is accepted per plant.</td>
|
<td>The name of the product that this plant takes as input. Only one input is accepted per plant.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>outputs</code></td>
|
<td align="left"><code>outputs (tonne/tonne)</code></td>
|
||||||
<td>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 <code>{"P2": 0.5, "P3": 0.25}</code>. If the plant does not output anything, this key may be omitted.</td>
|
<td>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 <code>{"P2": 0.5, "P3": 0.25}</code>. If the plant does not output anything, this key may be omitted.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td align="left"><code>energy (GJ/tonne)</code></td>
|
||||||
|
<td>The energy required to process 1 tonne of the input. Must be a timeseries. Optional.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left"><code>emissions (tonne/tonne)</code></td>
|
||||||
|
<td>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.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td align="left"><code>locations</code></td>
|
<td align="left"><code>locations</code></td>
|
||||||
<td>A dictionary mapping the name of the location to a dictionary which describes the site characteristics (see below).</td>
|
<td>A dictionary mapping the name of the location to a dictionary which describes the site characteristics (see below).</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -280,11 +301,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>latitude</code></td>
|
<td align="left"><code>latitude (deg)</code></td>
|
||||||
<td>The latitude of the location, in degrees.</td>
|
<td>The latitude of the location, in degrees.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>longitude</code></td>
|
<td align="left"><code>longitude (deg)</code></td>
|
||||||
<td>The longitude of the location, in degrees.</td>
|
<td>The longitude of the location, in degrees.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -292,7 +313,7 @@
|
|||||||
<td>A dictionary describing what products can be disposed locally at the plant.</td>
|
<td>A dictionary describing what products can be disposed locally at the plant.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>capacities</code></td>
|
<td align="left"><code>capacities (tonne)</code></td>
|
||||||
<td>A dictionary describing what plant sizes are allowed, and their characteristics.</td>
|
<td>A dictionary describing what plant sizes are allowed, and their characteristics.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -307,16 +328,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>cost</code></td>
|
<td align="left"><code>cost ($/tonne)</code></td>
|
||||||
<td>The cost (in dollars per tonnes) to dispose of the product. Must be a timeseries.</td>
|
<td>The cost to dispose of the product. Must be a timeseries.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>limit</code></td>
|
<td align="left"><code>limit (tonne)</code></td>
|
||||||
<td>The maximum amount (in tonnes) that can be disposed of. If an unlimited amount can be disposed, this key may be omitted. Must be a timeseries.</td>
|
<td>The maximum amount that can be disposed of. If an unlimited amount can be disposed, this key may be omitted. Must be a timeseries.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>The keys in the <code>capacities</code> dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys:</p>
|
<p>The keys in the <code>capacities (tonne)</code> dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -326,16 +347,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>opening cost</code></td>
|
<td align="left"><code>opening cost ($)</code></td>
|
||||||
<td>The cost (in dollars) to open a plant of this size.</td>
|
<td>The cost to open a plant of this size.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>fixed operating cost</code></td>
|
<td align="left"><code>fixed operating cost ($)</code></td>
|
||||||
<td>The cost (in dollars) to keep the plant open, even if the plant doesn't process anything. Must be a timeseries.</td>
|
<td>The cost to keep the plant open, even if the plant doesn't process anything. Must be a timeseries.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><code>variable operating cost</code></td>
|
<td align="left"><code>variable operating cost ($/tonne)</code></td>
|
||||||
<td>The cost (in dollars per tonnes) that the plant incurs to process each tonne of input. Must be a timeseries.</td>
|
<td>The cost that the plant incurs to process each tonne of input. Must be a timeseries.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -344,30 +365,35 @@
|
|||||||
"plants": {
|
"plants": {
|
||||||
"F1": {
|
"F1": {
|
||||||
"input": "P1",
|
"input": "P1",
|
||||||
"outputs": {
|
"outputs (tonne/tonne)": {
|
||||||
"P2": 0.2,
|
"P2": 0.2,
|
||||||
"P3": 0.5
|
"P3": 0.5
|
||||||
},
|
},
|
||||||
|
"energy (GJ/tonne)": [0.12, 0.11],
|
||||||
|
"emissions (tonne/tonne)": {
|
||||||
|
"CO2": [0.052, 0.050],
|
||||||
|
"CH4": [0.003, 0.002]
|
||||||
|
},
|
||||||
"locations": {
|
"locations": {
|
||||||
"L1": {
|
"L1": {
|
||||||
"latitude": 0.0,
|
"latitude (deg)": 0.0,
|
||||||
"longitude": 0.0,
|
"longitude (deg)": 0.0,
|
||||||
"disposal": {
|
"disposal": {
|
||||||
"P2": {
|
"P2": {
|
||||||
"cost": [-10.0, -12.0],
|
"cost ($/tonne)": [-10.0, -12.0],
|
||||||
"limit": [1.0, 1.0]
|
"limit (tonne)": [1.0, 1.0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"100": {
|
"100": {
|
||||||
"opening cost": [500, 530],
|
"opening cost ($)": [500, 530],
|
||||||
"fixed operating cost": [300.0, 310.0],
|
"fixed operating cost ($)": [300.0, 310.0],
|
||||||
"variable operating cost": [5.0, 5.2]
|
"variable operating cost ($/tonne)": [5.0, 5.2]
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"opening cost": [750, 760],
|
"opening cost ($)": [750, 760],
|
||||||
"fixed operating cost": [400.0, 450.0],
|
"fixed operating cost ($)": [400.0, 450.0],
|
||||||
"variable operating cost": [5.0, 5.2]
|
"variable operating cost ($/tonne)": [5.0, 5.2]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,19 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-05-22</lastmod>
|
<lastmod>2020-06-25</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url>
|
||||||
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-05-22</lastmod>
|
<lastmod>2020-06-25</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url>
|
||||||
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-05-22</lastmod>
|
<lastmod>2020-06-25</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url>
|
||||||
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-05-22</lastmod>
|
<lastmod>2020-06-25</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
||||||
Binary file not shown.
@@ -1,120 +1,130 @@
|
|||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"time periods": 2
|
"time horizon (years)": 2
|
||||||
},
|
},
|
||||||
"products": {
|
"products": {
|
||||||
"P1": {
|
"P1": {
|
||||||
"transportation cost": [0.015, 0.015],
|
"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]
|
||||||
|
},
|
||||||
"initial amounts": {
|
"initial amounts": {
|
||||||
"C1": {
|
"C1": {
|
||||||
"latitude": 7.0,
|
"latitude (deg)": 7.0,
|
||||||
"longitude": 7.0,
|
"longitude (deg)": 7.0,
|
||||||
"amount": [934.56, 934.56]
|
"amount (tonne)": [934.56, 934.56]
|
||||||
},
|
},
|
||||||
"C2": {
|
"C2": {
|
||||||
"latitude": 7.0,
|
"latitude (deg)": 7.0,
|
||||||
"longitude": 19.0,
|
"longitude (deg)": 19.0,
|
||||||
"amount": [198.95, 198.95]
|
"amount (tonne)": [198.95, 198.95]
|
||||||
},
|
},
|
||||||
"C3": {
|
"C3": {
|
||||||
"latitude": 84.0,
|
"latitude (deg)": 84.0,
|
||||||
"longitude": 76.0,
|
"longitude (deg)": 76.0,
|
||||||
"amount": [212.97, 212.97]
|
"amount (tonne)": [212.97, 212.97]
|
||||||
},
|
},
|
||||||
"C4": {
|
"C4": {
|
||||||
"latitude": 21.0,
|
"latitude (deg)": 21.0,
|
||||||
"longitude": 16.0,
|
"longitude (deg)": 16.0,
|
||||||
"amount": [352.19, 352.19]
|
"amount (tonne)": [352.19, 352.19]
|
||||||
},
|
},
|
||||||
"C5": {
|
"C5": {
|
||||||
"latitude": 32.0,
|
"latitude (deg)": 32.0,
|
||||||
"longitude": 92.0,
|
"longitude (deg)": 92.0,
|
||||||
"amount": [510.33, 510.33]
|
"amount (tonne)": [510.33, 510.33]
|
||||||
},
|
},
|
||||||
"C6": {
|
"C6": {
|
||||||
"latitude": 14.0,
|
"latitude (deg)": 14.0,
|
||||||
"longitude": 62.0,
|
"longitude (deg)": 62.0,
|
||||||
"amount": [471.66, 471.66]
|
"amount (tonne)": [471.66, 471.66]
|
||||||
},
|
},
|
||||||
"C7": {
|
"C7": {
|
||||||
"latitude": 30.0,
|
"latitude (deg)": 30.0,
|
||||||
"longitude": 83.0,
|
"longitude (deg)": 83.0,
|
||||||
"amount": [785.21, 785.21]
|
"amount (tonne)": [785.21, 785.21]
|
||||||
},
|
},
|
||||||
"C8": {
|
"C8": {
|
||||||
"latitude": 35.0,
|
"latitude (deg)": 35.0,
|
||||||
"longitude": 40.0,
|
"longitude (deg)": 40.0,
|
||||||
"amount": [706.17, 706.17]
|
"amount (tonne)": [706.17, 706.17]
|
||||||
},
|
},
|
||||||
"C9": {
|
"C9": {
|
||||||
"latitude": 74.0,
|
"latitude (deg)": 74.0,
|
||||||
"longitude": 52.0,
|
"longitude (deg)": 52.0,
|
||||||
"amount": [30.08, 30.08]
|
"amount (tonne)": [30.08, 30.08]
|
||||||
},
|
},
|
||||||
"C10": {
|
"C10": {
|
||||||
"latitude": 22.0,
|
"latitude (deg)": 22.0,
|
||||||
"longitude": 54.0,
|
"longitude (deg)": 54.0,
|
||||||
"amount": [536.52, 536.52]
|
"amount (tonne)": [536.52, 536.52]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"P2": {
|
"P2": {
|
||||||
"transportation cost": [0.02, 0.02]
|
"transportation cost ($/km/tonne)": [0.02, 0.02]
|
||||||
},
|
},
|
||||||
"P3": {
|
"P3": {
|
||||||
"transportation cost": [0.0125, 0.0125]
|
"transportation cost ($/km/tonne)": [0.0125, 0.0125]
|
||||||
},
|
},
|
||||||
"P4": {
|
"P4": {
|
||||||
"transportation cost": [0.0175, 0.0175]
|
"transportation cost ($/km/tonne)": [0.0175, 0.0175]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"plants": {
|
"plants": {
|
||||||
"F1": {
|
"F1": {
|
||||||
"input": "P1",
|
"input": "P1",
|
||||||
"outputs": {
|
"outputs (tonne/tonne)": {
|
||||||
"P2": 0.2,
|
"P2": 0.2,
|
||||||
"P3": 0.5
|
"P3": 0.5
|
||||||
},
|
},
|
||||||
|
"energy (GJ/tonne)": [0.12, 0.11],
|
||||||
|
"emissions (tonne/tonne)": {
|
||||||
|
"CO2": [0.052, 0.050],
|
||||||
|
"CH4": [0.003, 0.002]
|
||||||
|
},
|
||||||
"locations": {
|
"locations": {
|
||||||
"L1": {
|
"L1": {
|
||||||
"latitude": 0.0,
|
"latitude (deg)": 0.0,
|
||||||
"longitude": 0.0,
|
"longitude (deg)": 0.0,
|
||||||
"disposal": {
|
"disposal": {
|
||||||
"P2": {
|
"P2": {
|
||||||
"cost": [-10.0, -10.0],
|
"cost ($/tonne)": [-10.0, -10.0],
|
||||||
"limit": [1.0, 1.0]
|
"limit (tonne)": [1.0, 1.0]
|
||||||
},
|
},
|
||||||
"P3": {
|
"P3": {
|
||||||
"cost": [-10.0, -10.0],
|
"cost ($/tonne)": [-10.0, -10.0],
|
||||||
"limit": [1.0, 1.0]
|
"limit (tonne)": [1.0, 1.0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"250.0": {
|
"250.0": {
|
||||||
"opening cost": [500.0, 500.0],
|
"opening cost ($)": [500.0, 500.0],
|
||||||
"fixed operating cost": [30.0, 30.0],
|
"fixed operating cost ($)": [30.0, 30.0],
|
||||||
"variable operating cost": [30.0, 30.0]
|
"variable operating cost ($/tonne)": [30.0, 30.0]
|
||||||
},
|
},
|
||||||
"1000.0": {
|
"1000.0": {
|
||||||
"opening cost": [1250.0, 1250.0],
|
"opening cost ($)": [1250.0, 1250.0],
|
||||||
"fixed operating cost": [30.0, 30.0],
|
"fixed operating cost ($)": [30.0, 30.0],
|
||||||
"variable operating cost": [30.0, 30.0]
|
"variable operating cost ($/tonne)": [30.0, 30.0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"L2": {
|
"L2": {
|
||||||
"latitude": 0.5,
|
"latitude (deg)": 0.5,
|
||||||
"longitude": 0.5,
|
"longitude (deg)": 0.5,
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"0.0": {
|
"0.0": {
|
||||||
"opening cost": [1000, 1000],
|
"opening cost ($)": [1000, 1000],
|
||||||
"fixed operating cost": [50.0, 50.0],
|
"fixed operating cost ($)": [50.0, 50.0],
|
||||||
"variable operating cost": [50.0, 50.0]
|
"variable operating cost ($/tonne)": [50.0, 50.0]
|
||||||
},
|
},
|
||||||
"10000.0": {
|
"10000.0": {
|
||||||
"opening cost": [10000, 10000],
|
"opening cost ($)": [10000, 10000],
|
||||||
"fixed operating cost": [50.0, 50.0],
|
"fixed operating cost ($)": [50.0, 50.0],
|
||||||
"variable operating cost": [50.0, 50.0]
|
"variable operating cost ($/tonne)": [50.0, 50.0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,35 +132,35 @@
|
|||||||
},
|
},
|
||||||
"F2": {
|
"F2": {
|
||||||
"input": "P2",
|
"input": "P2",
|
||||||
"outputs": {
|
"outputs (tonne/tonne)": {
|
||||||
"P3": 0.05,
|
"P3": 0.05,
|
||||||
"P4": 0.80
|
"P4": 0.80
|
||||||
},
|
},
|
||||||
"locations": {
|
"locations": {
|
||||||
"L3": {
|
"L3": {
|
||||||
"latitude": 25.0,
|
"latitude (deg)": 25.0,
|
||||||
"longitude": 65.0,
|
"longitude (deg)": 65.0,
|
||||||
"disposal": {
|
"disposal": {
|
||||||
"P3": {
|
"P3": {
|
||||||
"cost": [100.0, 100.0]
|
"cost ($/tonne)": [100.0, 100.0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"1000.0": {
|
"1000.0": {
|
||||||
"opening cost": [3000, 3000],
|
"opening cost ($)": [3000, 3000],
|
||||||
"fixed operating cost": [50.0, 50.0],
|
"fixed operating cost ($)": [50.0, 50.0],
|
||||||
"variable operating cost": [50.0, 50.0]
|
"variable operating cost ($/tonne)": [50.0, 50.0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"L4": {
|
"L4": {
|
||||||
"latitude": 0.75,
|
"latitude (deg)": 0.75,
|
||||||
"longitude": 0.20,
|
"longitude (deg)": 0.20,
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"10000": {
|
"10000": {
|
||||||
"opening cost": [3000, 3000],
|
"opening cost ($)": [3000, 3000],
|
||||||
"fixed operating cost": [50.0, 50.0],
|
"fixed operating cost ($)": [50.0, 50.0],
|
||||||
"variable operating cost": [50.0, 50.0]
|
"variable operating cost ($/tonne)": [50.0, 50.0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,13 +170,13 @@
|
|||||||
"input": "P4",
|
"input": "P4",
|
||||||
"locations": {
|
"locations": {
|
||||||
"L5": {
|
"L5": {
|
||||||
"latitude": 100.0,
|
"latitude (deg)": 100.0,
|
||||||
"longitude": 100.0,
|
"longitude (deg)": 100.0,
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"15000": {
|
"15000": {
|
||||||
"opening cost": [0.0, 0.0],
|
"opening cost ($)": [0.0, 0.0],
|
||||||
"fixed operating cost": [0.0, 0.0],
|
"fixed operating cost ($)": [0.0, 0.0],
|
||||||
"variable operating cost": [-15.0, -15.0]
|
"variable operating cost ($/tonne)": [-15.0, -15.0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,13 +186,13 @@
|
|||||||
"input": "P3",
|
"input": "P3",
|
||||||
"locations": {
|
"locations": {
|
||||||
"L6": {
|
"L6": {
|
||||||
"latitude": 50.0,
|
"latitude (deg)": 50.0,
|
||||||
"longitude": 50.0,
|
"longitude (deg)": 50.0,
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"10000": {
|
"10000": {
|
||||||
"opening cost": [0.0, 0.0],
|
"opening cost ($)": [0.0, 0.0],
|
||||||
"fixed operating cost": [0.0, 0.0],
|
"fixed operating cost ($)": [0.0, 0.0],
|
||||||
"variable operating cost": [-15.0, -15.0]
|
"variable operating cost ($/tonne)": [-15.0, -15.0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,36 +1,53 @@
|
|||||||
Gurobi Optimizer version 9.0.0 build v9.0.0rc2 (linux64)
|
Gurobi Optimizer version 9.0.0 build v9.0.0rc2 (linux64)
|
||||||
Optimize a model with 112 rows, 141 columns and 378 nonzeros
|
Optimize a model with 124 rows, 141 columns and 400 nonzeros
|
||||||
Model fingerprint: 0xf1c6e6cc
|
Model fingerprint: 0x46af87f0
|
||||||
Variable types: 117 continuous, 24 integer (24 binary)
|
Variable types: 117 continuous, 24 integer (24 binary)
|
||||||
Coefficient statistics:
|
Coefficient statistics:
|
||||||
Matrix range [5e-02, 1e+08]
|
Matrix range [5e-02, 2e+04]
|
||||||
Objective range [1e+00, 3e+03]
|
Objective range [9e-01, 3e+03]
|
||||||
Bounds range [1e+00, 1e+08]
|
Bounds range [1e+00, 1e+08]
|
||||||
RHS range [3e+01, 1e+08]
|
RHS range [3e+01, 2e+04]
|
||||||
Found heuristic solution: objective 2000175.3046
|
Presolve removed 98 rows and 107 columns
|
||||||
Presolve removed 89 rows and 110 columns
|
|
||||||
Presolve time: 0.00s
|
Presolve time: 0.00s
|
||||||
Presolved: 23 rows, 31 columns, 68 nonzeros
|
Presolved: 26 rows, 34 columns, 74 nonzeros
|
||||||
Found heuristic solution: objective 1999822.1568
|
Variable types: 28 continuous, 6 integer (6 binary)
|
||||||
Variable types: 25 continuous, 6 integer (6 binary)
|
|
||||||
|
|
||||||
Root relaxation: objective 1.871010e+06, 9 iterations, 0.00 seconds
|
Root relaxation: objective 1.870636e+06, 10 iterations, 0.00 seconds
|
||||||
|
|
||||||
Nodes | Current Node | Objective Bounds | Work
|
Nodes | Current Node | Objective Bounds | Work
|
||||||
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
|
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
|
||||||
|
|
||||||
0 0 1871009.93 0 2 1999822.16 1871009.93 6.44% - 0s
|
0 0 1870636.06 0 2 - 1870636.06 - - 0s
|
||||||
H 0 0 1871552.8257 1871009.93 0.03% - 0s
|
H 0 0 1871178.9617 1870636.06 0.03% - 0s
|
||||||
|
|
||||||
Explored 1 nodes (9 simplex iterations) in 0.00 seconds
|
Explored 1 nodes (10 simplex iterations) in 0.00 seconds
|
||||||
Thread count was 4 (of 16 available processors)
|
Thread count was 8 (of 80 available processors)
|
||||||
|
|
||||||
Solution count 3: 1.87155e+06 1.99982e+06 2.00018e+06
|
Solution count 1: 1.87118e+06
|
||||||
|
|
||||||
Optimal solution found (tolerance 1.00e-02)
|
Optimal solution found (tolerance 1.00e-02)
|
||||||
Best objective 1.871552825663e+06, best bound 1.871009926997e+06, gap 0.0290%
|
Best objective 1.871178961663e+06, best bound 1.870636062997e+06, gap 0.0290%
|
||||||
|
Gurobi Optimizer version 9.0.0 build v9.0.0rc2 (linux64)
|
||||||
|
Optimize a model with 124 rows, 141 columns and 400 nonzeros
|
||||||
|
Model fingerprint: 0x133a97e7
|
||||||
|
Coefficient statistics:
|
||||||
|
Matrix range [5e-02, 2e+04]
|
||||||
|
Objective range [9e-01, 3e+03]
|
||||||
|
Bounds range [1e+00, 1e+08]
|
||||||
|
RHS range [3e+01, 2e+04]
|
||||||
|
Presolve removed 115 rows and 110 columns
|
||||||
|
Presolve time: 0.00s
|
||||||
|
Presolved: 9 rows, 31 columns, 94 nonzeros
|
||||||
|
|
||||||
|
Iteration Objective Primal Inf. Dual Inf. Time
|
||||||
|
0 1.0296026e+06 1.950922e+03 0.000000e+00 0s
|
||||||
|
7 1.8711790e+06 0.000000e+00 0.000000e+00 0s
|
||||||
|
|
||||||
|
Solved in 7 iterations and 0.00 seconds
|
||||||
|
Optimal objective 1.871178962e+06
|
||||||
Reading s1.json...
|
Reading s1.json...
|
||||||
Building graph...
|
Building graph...
|
||||||
Building optimization model...
|
Building optimization model...
|
||||||
Optimizing...
|
Optimizing MILP...
|
||||||
|
Re-optimizing with integer variables fixed...
|
||||||
Extracting solution...
|
Extracting solution...
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
### Source Code
|
### Source Code
|
||||||
|
|
||||||
* [https://github.com/iSoron/RELOG](https://github.com/iSoron/RELOG)
|
* [https://anl-ceeesa.github.io/RELOG/](https://anl-ceeesa.github.io/RELOG/)
|
||||||
|
|
||||||
### Authors
|
### Authors
|
||||||
* **Alinson S. Xavier,** Argonne National Laboratory <<axavier@anl.gov>>
|
* **Alinson S. Xavier,** Argonne National Laboratory <<axavier@anl.gov>>
|
||||||
|
|||||||
@@ -8,34 +8,36 @@ The **parameters** section describes details about the simulation itself.
|
|||||||
|
|
||||||
| Key | Description
|
| Key | Description
|
||||||
|:------------------------|---------------|
|
|:------------------------|---------------|
|
||||||
|`time periods` | Number of time periods in the simulation.
|
|`time horizon (years)` | Number of years in the simulation.
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"time periods": 2
|
"time horizon (years)": 2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Products
|
## 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:
|
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
|
| Key | Description
|
||||||
|:------------------------|---------------|
|
|:--------------------------------------|---------------|
|
||||||
|`transportation cost` | The cost (in dollars per km per tonnes) to transport this product. Must be a timeseries.
|
|`transportation cost ($/km/tonne)` | The cost to transport this product. Must be a timeseries.
|
||||||
|`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.
|
|`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:
|
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
|
| Key | Description
|
||||||
|:------------------------|---------------|
|
|:------------------------|---------------|
|
||||||
| `latitude` | The latitude of the location, in degrees.
|
| `latitude (deg)` | The latitude of the location.
|
||||||
| `longitude` | The longitude of the location, in degrees.
|
| `longitude (deg)` | The longitude of the location.
|
||||||
| `amount` | The amount (in tonnes) of the product initially available at the location. Must be a timeseries.
|
| `amount (tonne)` | The amount of the product initially available at the location. Must be a timeseries.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@@ -43,33 +45,38 @@ Each product may have some amount available at the beginning of each time period
|
|||||||
{
|
{
|
||||||
"products": {
|
"products": {
|
||||||
"P1": {
|
"P1": {
|
||||||
"transportation cost": [0.015, 0.015],
|
|
||||||
"initial amounts": {
|
"initial amounts": {
|
||||||
"C1": {
|
"C1": {
|
||||||
"latitude": 7.0,
|
"latitude (deg)": 7.0,
|
||||||
"longitude": 7.0,
|
"longitude (deg)": 7.0,
|
||||||
"amount": [934.56, 934.56]
|
"amount (tonne)": [934.56, 934.56]
|
||||||
},
|
},
|
||||||
"C2": {
|
"C2": {
|
||||||
"latitude": 7.0,
|
"latitude (deg)": 7.0,
|
||||||
"longitude": 19.0,
|
"longitude (deg)": 19.0,
|
||||||
"amount": [198.95, 198.95]
|
"amount (tonne)": [198.95, 198.95]
|
||||||
},
|
},
|
||||||
"C3": {
|
"C3": {
|
||||||
"latitude": 84.0,
|
"latitude (deg)": 84.0,
|
||||||
"longitude": 76.0,
|
"longitude (deg)": 76.0,
|
||||||
"amount": [212.97, 212.97]
|
"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": {
|
"P2": {
|
||||||
"transportation cost": [0.02, 0.02]
|
"transportation cost ($/km/tonne)": [0.022, 0.020]
|
||||||
},
|
},
|
||||||
"P3": {
|
"P3": {
|
||||||
"transportation cost": [0.0125, 0.0125]
|
"transportation cost ($/km/tonne)": [0.0125, 0.0125]
|
||||||
},
|
},
|
||||||
"P4": {
|
"P4": {
|
||||||
"transportation cost": [0.0175, 0.0175]
|
"transportation cost ($/km/tonne)": [0.0175, 0.0175]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,38 +84,40 @@ Each product may have some amount available at the beginning of each time period
|
|||||||
|
|
||||||
## Processing Plants
|
## 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:
|
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
|
| Key | Description
|
||||||
|:------------------------|---------------|
|
|:------------------------|---------------|
|
||||||
| `input` | The name of the product that this plant takes as input. Only one input is accepted per plant.
|
| `input` | The name of the product that this plant takes as input. Only one input is accepted per plant.
|
||||||
| `outputs` | 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.
|
| `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).
|
| `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:
|
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
|
| Key | Description
|
||||||
|:------------------------|---------------|
|
|:------------------------------|---------------|
|
||||||
| `latitude` | The latitude of the location, in degrees.
|
| `latitude (deg)` | The latitude of the location, in degrees.
|
||||||
| `longitude` | The longitude 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.
|
| `disposal` | A dictionary describing what products can be disposed locally at the plant.
|
||||||
| `capacities` | A dictionary describing what plant sizes are allowed, and their characteristics.
|
| `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:
|
The keys in the `disposal` dictionary should be the names of the products. The values are dictionaries with the following keys:
|
||||||
|
|
||||||
| Key | Description
|
| Key | Description
|
||||||
|:------------------------|---------------|
|
|:------------------------|---------------|
|
||||||
| `cost` | The cost (in dollars per tonnes) to dispose of the product. Must be a timeseries.
|
| `cost ($/tonne)` | The cost to dispose of the product. Must be a timeseries.
|
||||||
| `limit` | The maximum amount (in tonnes) that can be disposed of. If an unlimited amount can be disposed, this key may be omitted. 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` dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys:
|
The keys in the `capacities (tonne)` dictionary should be the amounts (in tonnes). The values are dictionaries with the following keys:
|
||||||
|
|
||||||
| Key | Description
|
| Key | Description
|
||||||
|:------------------------|---------------|
|
|:--------------------------------------|---------------|
|
||||||
| `opening cost` | The cost (in dollars) to open a plant of this size.
|
| `opening cost ($)` | The cost to open a plant of this size.
|
||||||
| `fixed operating cost` | The cost (in dollars) to keep the plant open, even if the plant doesn't process anything. Must be a timeseries.
|
| `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` | The cost (in dollars per tonnes) that the plant incurs to process each tonne of input. 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
|
### Example
|
||||||
|
|
||||||
@@ -117,30 +126,35 @@ The keys in the `capacities` dictionary should be the amounts (in tonnes). The v
|
|||||||
"plants": {
|
"plants": {
|
||||||
"F1": {
|
"F1": {
|
||||||
"input": "P1",
|
"input": "P1",
|
||||||
"outputs": {
|
"outputs (tonne/tonne)": {
|
||||||
"P2": 0.2,
|
"P2": 0.2,
|
||||||
"P3": 0.5
|
"P3": 0.5
|
||||||
},
|
},
|
||||||
|
"energy (GJ/tonne)": [0.12, 0.11],
|
||||||
|
"emissions (tonne/tonne)": {
|
||||||
|
"CO2": [0.052, 0.050],
|
||||||
|
"CH4": [0.003, 0.002]
|
||||||
|
},
|
||||||
"locations": {
|
"locations": {
|
||||||
"L1": {
|
"L1": {
|
||||||
"latitude": 0.0,
|
"latitude (deg)": 0.0,
|
||||||
"longitude": 0.0,
|
"longitude (deg)": 0.0,
|
||||||
"disposal": {
|
"disposal": {
|
||||||
"P2": {
|
"P2": {
|
||||||
"cost": [-10.0, -12.0],
|
"cost ($/tonne)": [-10.0, -12.0],
|
||||||
"limit": [1.0, 1.0]
|
"limit (tonne)": [1.0, 1.0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"100": {
|
"100": {
|
||||||
"opening cost": [500, 530],
|
"opening cost ($)": [500, 530],
|
||||||
"fixed operating cost": [300.0, 310.0],
|
"fixed operating cost ($)": [300.0, 310.0],
|
||||||
"variable operating cost": [5.0, 5.2]
|
"variable operating cost ($/tonne)": [5.0, 5.2]
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"opening cost": [750, 760],
|
"opening cost ($)": [750, 760],
|
||||||
"fixed operating cost": [400.0, 450.0],
|
"fixed operating cost ($)": [400.0, 450.0],
|
||||||
"variable operating cost": [5.0, 5.2]
|
"variable operating cost ($/tonne)": [5.0, 5.2]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ using JSON, JSONSchema
|
|||||||
mutable struct Product
|
mutable struct Product
|
||||||
name::String
|
name::String
|
||||||
transportation_cost::Array{Float64}
|
transportation_cost::Array{Float64}
|
||||||
|
transportation_energy::Array{Float64}
|
||||||
|
transportation_emissions::Dict{String, Array{Float64}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -40,6 +42,8 @@ mutable struct Plant
|
|||||||
disposal_limit::Dict{Product, Array{Float64}}
|
disposal_limit::Dict{Product, Array{Float64}}
|
||||||
disposal_cost::Dict{Product, Array{Float64}}
|
disposal_cost::Dict{Product, Array{Float64}}
|
||||||
sizes::Array{PlantSize}
|
sizes::Array{PlantSize}
|
||||||
|
energy::Array{Float64}
|
||||||
|
emissions::Dict{String, Array{Float64}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -60,14 +64,17 @@ function load(path::String)::Instance
|
|||||||
if result !== nothing
|
if result !== nothing
|
||||||
if result isa JSONSchema.SingleIssue
|
if result isa JSONSchema.SingleIssue
|
||||||
path = join(result.path, " → ")
|
path = join(result.path, " → ")
|
||||||
msg = "$(result.x) $(result.msg) in $(path)"
|
if length(path) == 0
|
||||||
|
path = "root"
|
||||||
|
end
|
||||||
|
msg = "$(result.msg) in $(path)"
|
||||||
else
|
else
|
||||||
msg = convert(String, result)
|
msg = convert(String, result)
|
||||||
end
|
end
|
||||||
throw(msg)
|
throw(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
T = json["parameters"]["time periods"]
|
T = json["parameters"]["time horizon (years)"]
|
||||||
plants = Plant[]
|
plants = Plant[]
|
||||||
products = Product[]
|
products = Product[]
|
||||||
collection_centers = CollectionCenter[]
|
collection_centers = CollectionCenter[]
|
||||||
@@ -75,7 +82,19 @@ function load(path::String)::Instance
|
|||||||
|
|
||||||
# Create products
|
# Create products
|
||||||
for (product_name, product_dict) in json["products"]
|
for (product_name, product_dict) in json["products"]
|
||||||
product = Product(product_name, product_dict["transportation cost"])
|
cost = product_dict["transportation cost (\$/km/tonne)"]
|
||||||
|
energy = zeros(T)
|
||||||
|
emissions = Dict()
|
||||||
|
|
||||||
|
if "transportation energy (J/km/tonne)" in keys(product_dict)
|
||||||
|
energy = product_dict["transportation energy (J/km/tonne)"]
|
||||||
|
end
|
||||||
|
|
||||||
|
if "transportation emissions (tonne/km/tonne)" in keys(product_dict)
|
||||||
|
emissions = product_dict["transportation emissions (tonne/km/tonne)"]
|
||||||
|
end
|
||||||
|
|
||||||
|
product = Product(product_name, cost, energy, emissions)
|
||||||
push!(products, product)
|
push!(products, product)
|
||||||
prod_name_to_product[product_name] = product
|
prod_name_to_product[product_name] = product
|
||||||
|
|
||||||
@@ -84,10 +103,10 @@ function load(path::String)::Instance
|
|||||||
for (center_name, center_dict) in product_dict["initial amounts"]
|
for (center_name, center_dict) in product_dict["initial amounts"]
|
||||||
center = CollectionCenter(length(collection_centers) + 1,
|
center = CollectionCenter(length(collection_centers) + 1,
|
||||||
center_name,
|
center_name,
|
||||||
center_dict["latitude"],
|
center_dict["latitude (deg)"],
|
||||||
center_dict["longitude"],
|
center_dict["longitude (deg)"],
|
||||||
product,
|
product,
|
||||||
center_dict["amount"])
|
center_dict["amount (tonne)"])
|
||||||
push!(collection_centers, center)
|
push!(collection_centers, center)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -99,12 +118,23 @@ function load(path::String)::Instance
|
|||||||
output = Dict()
|
output = Dict()
|
||||||
|
|
||||||
# Plant outputs
|
# Plant outputs
|
||||||
if "outputs" in keys(plant_dict)
|
if "outputs (tonne/tonne)" in keys(plant_dict)
|
||||||
output = Dict(prod_name_to_product[key] => value
|
output = Dict(prod_name_to_product[key] => value
|
||||||
for (key, value) in plant_dict["outputs"]
|
for (key, value) in plant_dict["outputs (tonne/tonne)"]
|
||||||
if value > 0)
|
if value > 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
energy = zeros(T)
|
||||||
|
emissions = Dict()
|
||||||
|
|
||||||
|
if "energy (GJ/tonne)" in keys(plant_dict)
|
||||||
|
energy = plant_dict["energy (GJ/tonne)"]
|
||||||
|
end
|
||||||
|
|
||||||
|
if "emissions (tonne/tonne)" in keys(plant_dict)
|
||||||
|
emissions = plant_dict["emissions (tonne/tonne)"]
|
||||||
|
end
|
||||||
|
|
||||||
for (location_name, location_dict) in plant_dict["locations"]
|
for (location_name, location_dict) in plant_dict["locations"]
|
||||||
sizes = PlantSize[]
|
sizes = PlantSize[]
|
||||||
disposal_limit = Dict(p => [0.0 for t in 1:T] for p in keys(output))
|
disposal_limit = Dict(p => [0.0 for t in 1:T] for p in keys(output))
|
||||||
@@ -114,20 +144,20 @@ function load(path::String)::Instance
|
|||||||
if "disposal" in keys(location_dict)
|
if "disposal" in keys(location_dict)
|
||||||
for (product_name, disposal_dict) in location_dict["disposal"]
|
for (product_name, disposal_dict) in location_dict["disposal"]
|
||||||
limit = [1e8 for t in 1:T]
|
limit = [1e8 for t in 1:T]
|
||||||
if "limit" in keys(disposal_dict)
|
if "limit (tonne)" in keys(disposal_dict)
|
||||||
limit = disposal_dict["limit"]
|
limit = disposal_dict["limit (tonne)"]
|
||||||
end
|
end
|
||||||
disposal_limit[prod_name_to_product[product_name]] = limit
|
disposal_limit[prod_name_to_product[product_name]] = limit
|
||||||
disposal_cost[prod_name_to_product[product_name]] = disposal_dict["cost"]
|
disposal_cost[prod_name_to_product[product_name]] = disposal_dict["cost (\$/tonne)"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Capacities
|
# Capacities
|
||||||
for (capacity_name, capacity_dict) in location_dict["capacities"]
|
for (capacity_name, capacity_dict) in location_dict["capacities (tonne)"]
|
||||||
push!(sizes, PlantSize(parse(Float64, capacity_name),
|
push!(sizes, PlantSize(parse(Float64, capacity_name),
|
||||||
capacity_dict["variable operating cost"],
|
capacity_dict["variable operating cost (\$/tonne)"],
|
||||||
capacity_dict["fixed operating cost"],
|
capacity_dict["fixed operating cost (\$)"],
|
||||||
capacity_dict["opening cost"]))
|
capacity_dict["opening cost (\$)"]))
|
||||||
end
|
end
|
||||||
length(sizes) > 1 || push!(sizes, sizes[1])
|
length(sizes) > 1 || push!(sizes, sizes[1])
|
||||||
sort!(sizes, by = x -> x.capacity)
|
sort!(sizes, by = x -> x.capacity)
|
||||||
@@ -145,11 +175,13 @@ function load(path::String)::Instance
|
|||||||
location_name,
|
location_name,
|
||||||
input,
|
input,
|
||||||
output,
|
output,
|
||||||
location_dict["latitude"],
|
location_dict["latitude (deg)"],
|
||||||
location_dict["longitude"],
|
location_dict["longitude (deg)"],
|
||||||
disposal_limit,
|
disposal_limit,
|
||||||
disposal_cost,
|
disposal_cost,
|
||||||
sizes)
|
sizes,
|
||||||
|
energy,
|
||||||
|
emissions)
|
||||||
|
|
||||||
push!(plants, plant)
|
push!(plants, plant)
|
||||||
end
|
end
|
||||||
|
|||||||
218
src/model.jl
218
src/model.jl
@@ -2,24 +2,24 @@
|
|||||||
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
|
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
|
||||||
# Released under the modified BSD license. See COPYING.md for more details.
|
# Released under the modified BSD license. See COPYING.md for more details.
|
||||||
|
|
||||||
using JuMP, LinearAlgebra, Geodesy, Cbc, ProgressBars
|
using JuMP, LinearAlgebra, Geodesy, Cbc, Clp, ProgressBars
|
||||||
|
|
||||||
|
|
||||||
mutable struct ManufacturingModel
|
mutable struct ManufacturingModel
|
||||||
mip::JuMP.Model
|
mip::JuMP.Model
|
||||||
vars::DotDict
|
vars::DotDict
|
||||||
|
eqs::DotDict
|
||||||
instance::Instance
|
instance::Instance
|
||||||
graph::Graph
|
graph::Graph
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function build_model(instance::Instance, graph::Graph, optimizer)::ManufacturingModel
|
function build_model(instance::Instance, graph::Graph, optimizer)::ManufacturingModel
|
||||||
model = ManufacturingModel(Model(optimizer), DotDict(), instance, graph)
|
model = ManufacturingModel(Model(optimizer), DotDict(), DotDict(), instance, graph)
|
||||||
create_vars!(model)
|
create_vars!(model)
|
||||||
create_objective_function!(model)
|
create_objective_function!(model)
|
||||||
create_shipping_node_constraints!(model)
|
create_shipping_node_constraints!(model)
|
||||||
create_process_node_constraints!(model)
|
create_process_node_constraints!(model)
|
||||||
JuMP.write_to_file(model.mip, "model.lp")
|
|
||||||
return model
|
return model
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -133,11 +133,16 @@ end
|
|||||||
|
|
||||||
function create_shipping_node_constraints!(model::ManufacturingModel)
|
function create_shipping_node_constraints!(model::ManufacturingModel)
|
||||||
mip, vars, graph, T = model.mip, model.vars, model.graph, model.instance.time
|
mip, vars, graph, T = model.mip, model.vars, model.graph, model.instance.time
|
||||||
|
eqs = model.eqs
|
||||||
|
|
||||||
|
eqs.balance = Dict()
|
||||||
|
|
||||||
for t in 1:T
|
for t in 1:T
|
||||||
# Collection centers
|
# Collection centers
|
||||||
for n in graph.collection_shipping_nodes
|
for n in graph.collection_shipping_nodes
|
||||||
@constraint(mip, sum(vars.flow[a, t] for a in n.outgoing_arcs) == n.location.amount[t])
|
eqs.balance[n, t] = @constraint(mip,
|
||||||
|
sum(vars.flow[a, t] for a in n.outgoing_arcs)
|
||||||
|
== n.location.amount[t])
|
||||||
end
|
end
|
||||||
|
|
||||||
# Plants
|
# Plants
|
||||||
@@ -188,7 +193,7 @@ function create_process_node_constraints!(model::ManufacturingModel)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function solve(filename::String; optimizer=Cbc.Optimizer)
|
function solve(filename::String; milp_optimizer=Cbc.Optimizer, lp_optimizer=Clp.Optimizer)
|
||||||
println("Reading $filename...")
|
println("Reading $filename...")
|
||||||
instance = RELOG.load(filename)
|
instance = RELOG.load(filename)
|
||||||
|
|
||||||
@@ -196,9 +201,21 @@ function solve(filename::String; optimizer=Cbc.Optimizer)
|
|||||||
graph = RELOG.build_graph(instance)
|
graph = RELOG.build_graph(instance)
|
||||||
|
|
||||||
println("Building optimization model...")
|
println("Building optimization model...")
|
||||||
model = RELOG.build_model(instance, graph, optimizer)
|
model = RELOG.build_model(instance, graph, milp_optimizer)
|
||||||
|
|
||||||
println("Optimizing...")
|
println("Optimizing MILP...")
|
||||||
|
JuMP.optimize!(model.mip)
|
||||||
|
|
||||||
|
println("Re-optimizing with integer variables fixed...")
|
||||||
|
all_vars = JuMP.all_variables(model.mip)
|
||||||
|
vals = Dict(var => JuMP.value(var) for var in all_vars)
|
||||||
|
JuMP.set_optimizer(model.mip, lp_optimizer)
|
||||||
|
for var in all_vars
|
||||||
|
if JuMP.is_binary(var)
|
||||||
|
JuMP.unset_binary(var)
|
||||||
|
JuMP.fix(var, vals[var])
|
||||||
|
end
|
||||||
|
end
|
||||||
JuMP.optimize!(model.mip)
|
JuMP.optimize!(model.mip)
|
||||||
|
|
||||||
println("Extracting solution...")
|
println("Extracting solution...")
|
||||||
@@ -206,20 +223,29 @@ function solve(filename::String; optimizer=Cbc.Optimizer)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function get_solution(model::ManufacturingModel)
|
function get_solution(model::ManufacturingModel)
|
||||||
mip, vars, graph, instance = model.mip, model.vars, model.graph, model.instance
|
mip, vars, eqs, graph, instance = model.mip, model.vars, model.eqs, model.graph, model.instance
|
||||||
T = instance.time
|
T = instance.time
|
||||||
|
|
||||||
output = Dict(
|
output = Dict(
|
||||||
"plants" => Dict(),
|
"Plants" => Dict(),
|
||||||
"costs" => Dict(
|
"Products" => Dict(),
|
||||||
"fixed operating" => zeros(T),
|
"Costs" => Dict(
|
||||||
"variable operating" => zeros(T),
|
"Fixed operating (\$)" => zeros(T),
|
||||||
"opening" => zeros(T),
|
"Variable operating (\$)" => zeros(T),
|
||||||
"transportation" => zeros(T),
|
"Opening (\$)" => zeros(T),
|
||||||
"disposal" => zeros(T),
|
"Transportation (\$)" => zeros(T),
|
||||||
"expansion" => zeros(T),
|
"Disposal (\$)" => zeros(T),
|
||||||
"total" => zeros(T),
|
"Expansion (\$)" => zeros(T),
|
||||||
)
|
"Total (\$)" => zeros(T),
|
||||||
|
),
|
||||||
|
"Energy" => Dict(
|
||||||
|
"Plants (GJ)" => zeros(T),
|
||||||
|
"Transportation (GJ)" => zeros(T),
|
||||||
|
),
|
||||||
|
"Emissions" => Dict(
|
||||||
|
"Plants (tonne)" => Dict(),
|
||||||
|
"Transportation (tonne)" => Dict(),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
plant_to_process_node = Dict(n.location => n for n in graph.process_nodes)
|
plant_to_process_node = Dict(n.location => n for n in graph.process_nodes)
|
||||||
@@ -231,40 +257,53 @@ function get_solution(model::ManufacturingModel)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Products
|
||||||
|
for n in graph.collection_shipping_nodes
|
||||||
|
location_dict = Dict{Any, Any}(
|
||||||
|
"Marginal cost (\$/tonne)" => [round(abs(JuMP.shadow_price(eqs.balance[n, t])), digits=2)
|
||||||
|
for t in 1:T],
|
||||||
|
)
|
||||||
|
if n.product.name ∉ keys(output["Products"])
|
||||||
|
output["Products"][n.product.name] = Dict()
|
||||||
|
end
|
||||||
|
output["Products"][n.product.name][n.location.name] = location_dict
|
||||||
|
end
|
||||||
|
|
||||||
|
# Plants
|
||||||
for plant in instance.plants
|
for plant in instance.plants
|
||||||
skip_plant = true
|
skip_plant = true
|
||||||
process_node = plant_to_process_node[plant]
|
process_node = plant_to_process_node[plant]
|
||||||
plant_dict = Dict{Any, Any}(
|
plant_dict = Dict{Any, Any}(
|
||||||
"input" => Dict(),
|
"Input" => Dict(),
|
||||||
"output" => Dict(
|
"Output" => Dict(
|
||||||
"send" => Dict(),
|
"Send" => Dict(),
|
||||||
"dispose" => Dict(),
|
"Dispose" => Dict(),
|
||||||
),
|
),
|
||||||
"total input" => [0.0 for t in 1:T],
|
"Total input (tonne)" => [0.0 for t in 1:T],
|
||||||
"total output" => Dict(),
|
"Total output" => Dict(),
|
||||||
"latitude" => plant.latitude,
|
"Latitude (deg)" => plant.latitude,
|
||||||
"longitude" => plant.longitude,
|
"Longitude (deg)" => plant.longitude,
|
||||||
"capacity" => [JuMP.value(vars.capacity[process_node, t])
|
"Capacity (tonne)" => [JuMP.value(vars.capacity[process_node, t])
|
||||||
for t in 1:T],
|
for t in 1:T],
|
||||||
"opening cost" => [JuMP.value(vars.open_plant[process_node, t]) *
|
"Opening cost (\$)" => [JuMP.value(vars.open_plant[process_node, t]) *
|
||||||
plant.sizes[1].opening_cost[t]
|
plant.sizes[1].opening_cost[t]
|
||||||
for t in 1:T],
|
for t in 1:T],
|
||||||
"fixed operating cost" => [JuMP.value(vars.is_open[process_node, t]) *
|
"Fixed operating cost (\$)" => [JuMP.value(vars.is_open[process_node, t]) *
|
||||||
plant.sizes[1].fixed_operating_cost[t] +
|
plant.sizes[1].fixed_operating_cost[t] +
|
||||||
JuMP.value(vars.expansion[process_node, t]) *
|
JuMP.value(vars.expansion[process_node, t]) *
|
||||||
slope_fix_oper_cost(plant, t)
|
slope_fix_oper_cost(plant, t)
|
||||||
for t in 1:T],
|
for t in 1:T],
|
||||||
"expansion cost" => [JuMP.value(vars.expansion[process_node, t]) *
|
"Expansion cost (\$)" => [JuMP.value(vars.expansion[process_node, t]) *
|
||||||
(if t < T
|
(if t < T
|
||||||
slope_open(plant, t) - slope_open(plant, t + 1)
|
slope_open(plant, t) - slope_open(plant, t + 1)
|
||||||
else
|
else
|
||||||
slope_open(plant, t)
|
slope_open(plant, t)
|
||||||
end)
|
end)
|
||||||
for t in 1:T],
|
for t in 1:T],
|
||||||
)
|
)
|
||||||
output["costs"]["fixed operating"] += plant_dict["fixed operating cost"]
|
output["Costs"]["Fixed operating (\$)"] += plant_dict["Fixed operating cost (\$)"]
|
||||||
output["costs"]["opening"] += plant_dict["opening cost"]
|
output["Costs"]["Opening (\$)"] += plant_dict["Opening cost (\$)"]
|
||||||
output["costs"]["expansion"] += plant_dict["expansion cost"]
|
output["Costs"]["Expansion (\$)"] += plant_dict["Expansion cost (\$)"]
|
||||||
|
|
||||||
# Inputs
|
# Inputs
|
||||||
for a in process_node.incoming_arcs
|
for a in process_node.incoming_arcs
|
||||||
@@ -274,15 +313,23 @@ function get_solution(model::ManufacturingModel)
|
|||||||
end
|
end
|
||||||
skip_plant = false
|
skip_plant = false
|
||||||
dict = Dict{Any, Any}(
|
dict = Dict{Any, Any}(
|
||||||
"amount" => vals,
|
"Amount (tonne)" => vals,
|
||||||
"distance" => a.values["distance"],
|
"Distance (km)" => a.values["distance"],
|
||||||
"latitude" => a.source.location.latitude,
|
"Latitude (deg)" => a.source.location.latitude,
|
||||||
"longitude" => a.source.location.longitude,
|
"Longitude (deg)" => a.source.location.longitude,
|
||||||
"transportation cost" => [a.source.product.transportation_cost[t] * vals[t]
|
"Transportation cost (\$)" => a.source.product.transportation_cost .* vals .* a.values["distance"],
|
||||||
for t in 1:T],
|
"Variable operating cost (\$)" => plant.sizes[1].variable_operating_cost .* vals,
|
||||||
"variable operating cost" => [plant.sizes[1].variable_operating_cost[t] * vals[t]
|
"Transportation energy (J)" => vals .* a.values["distance"] .* a.source.product.transportation_energy,
|
||||||
for t in 1:T],
|
"Emissions (tonne)" => Dict(),
|
||||||
)
|
)
|
||||||
|
emissions_dict = output["Emissions"]["Transportation (tonne)"]
|
||||||
|
for (em_name, em_values) in a.source.product.transportation_emissions
|
||||||
|
dict["Emissions (tonne)"][em_name] = em_values .* dict["Amount (tonne)"]
|
||||||
|
if em_name ∉ keys(emissions_dict)
|
||||||
|
emissions_dict[em_name] = zeros(T)
|
||||||
|
end
|
||||||
|
emissions_dict[em_name] += dict["Emissions (tonne)"][em_name]
|
||||||
|
end
|
||||||
if a.source.location isa CollectionCenter
|
if a.source.location isa CollectionCenter
|
||||||
plant_name = "Origin"
|
plant_name = "Origin"
|
||||||
location_name = a.source.location.name
|
location_name = a.source.location.name
|
||||||
@@ -291,31 +338,46 @@ function get_solution(model::ManufacturingModel)
|
|||||||
location_name = a.source.location.location_name
|
location_name = a.source.location.location_name
|
||||||
end
|
end
|
||||||
|
|
||||||
if plant_name ∉ keys(plant_dict["input"])
|
if plant_name ∉ keys(plant_dict["Input"])
|
||||||
plant_dict["input"][plant_name] = Dict()
|
plant_dict["Input"][plant_name] = Dict()
|
||||||
end
|
end
|
||||||
plant_dict["input"][plant_name][location_name] = dict
|
plant_dict["Input"][plant_name][location_name] = dict
|
||||||
plant_dict["total input"] += vals
|
plant_dict["Total input (tonne)"] += vals
|
||||||
output["costs"]["transportation"] += dict["transportation cost"]
|
output["Costs"]["Transportation (\$)"] += dict["Transportation cost (\$)"]
|
||||||
output["costs"]["variable operating"] += dict["variable operating cost"]
|
output["Costs"]["Variable operating (\$)"] += dict["Variable operating cost (\$)"]
|
||||||
|
output["Energy"]["Transportation (GJ)"] += dict["Transportation energy (J)"] / 1e6
|
||||||
|
end
|
||||||
|
|
||||||
|
plant_dict["Energy (GJ)"] = plant_dict["Total input (tonne)"] .* plant.energy
|
||||||
|
output["Energy"]["Plants (GJ)"] += plant_dict["Energy (GJ)"]
|
||||||
|
|
||||||
|
plant_dict["Emissions (tonne)"] = Dict()
|
||||||
|
emissions_dict = output["Emissions"]["Plants (tonne)"]
|
||||||
|
for (em_name, em_values) in plant.emissions
|
||||||
|
plant_dict["Emissions (tonne)"][em_name] = em_values .* plant_dict["Total input (tonne)"]
|
||||||
|
if em_name ∉ keys(emissions_dict)
|
||||||
|
emissions_dict[em_name] = zeros(T)
|
||||||
|
end
|
||||||
|
emissions_dict[em_name] += plant_dict["Emissions (tonne)"][em_name]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Outputs
|
# Outputs
|
||||||
for shipping_node in plant_to_shipping_nodes[plant]
|
for shipping_node in plant_to_shipping_nodes[plant]
|
||||||
product_name = shipping_node.product.name
|
product_name = shipping_node.product.name
|
||||||
plant_dict["total output"][product_name] = zeros(T)
|
plant_dict["Total output"][product_name] = zeros(T)
|
||||||
plant_dict["output"]["send"][product_name] = product_dict = Dict()
|
plant_dict["Output"]["Send"][product_name] = product_dict = Dict()
|
||||||
|
|
||||||
disposal_amount = [JuMP.value(vars.dispose[shipping_node, t]) for t in 1:T]
|
disposal_amount = [JuMP.value(vars.dispose[shipping_node, t]) for t in 1:T]
|
||||||
if sum(disposal_amount) > 1e-5
|
if sum(disposal_amount) > 1e-5
|
||||||
skip_plant = false
|
skip_plant = false
|
||||||
plant_dict["output"]["dispose"][product_name] = disposal_dict = Dict()
|
plant_dict["Output"]["Dispose"][product_name] = disposal_dict = Dict()
|
||||||
disposal_dict["amount"] = [JuMP.value(model.vars.dispose[shipping_node, t]) for t in 1:T]
|
disposal_dict["Amount (tonne)"] = [JuMP.value(model.vars.dispose[shipping_node, t])
|
||||||
disposal_dict["cost"] = [disposal_dict["amount"][t] *
|
for t in 1:T]
|
||||||
plant.disposal_cost[shipping_node.product][t]
|
disposal_dict["Cost (\$)"] = [disposal_dict["Amount (tonne)"][t] *
|
||||||
for t in 1:T]
|
plant.disposal_cost[shipping_node.product][t]
|
||||||
plant_dict["total output"][product_name] += disposal_amount
|
for t in 1:T]
|
||||||
output["costs"]["disposal"] += disposal_dict["cost"]
|
plant_dict["Total output"][product_name] += disposal_amount
|
||||||
|
output["Costs"]["Disposal (\$)"] += disposal_dict["Cost (\$)"]
|
||||||
end
|
end
|
||||||
|
|
||||||
for a in shipping_node.outgoing_arcs
|
for a in shipping_node.outgoing_arcs
|
||||||
@@ -325,27 +387,27 @@ function get_solution(model::ManufacturingModel)
|
|||||||
end
|
end
|
||||||
skip_plant = false
|
skip_plant = false
|
||||||
dict = Dict(
|
dict = Dict(
|
||||||
"amount" => vals,
|
"Amount (tonne)" => vals,
|
||||||
"distance" => a.values["distance"],
|
"Distance (km)" => a.values["distance"],
|
||||||
"latitude" => a.dest.location.latitude,
|
"Latitude (deg)" => a.dest.location.latitude,
|
||||||
"longitude" => a.dest.location.longitude,
|
"Longitude (deg)" => a.dest.location.longitude,
|
||||||
)
|
)
|
||||||
if a.dest.location.plant_name ∉ keys(product_dict)
|
if a.dest.location.plant_name ∉ keys(product_dict)
|
||||||
product_dict[a.dest.location.plant_name] = Dict()
|
product_dict[a.dest.location.plant_name] = Dict()
|
||||||
end
|
end
|
||||||
product_dict[a.dest.location.plant_name][a.dest.location.location_name] = dict
|
product_dict[a.dest.location.plant_name][a.dest.location.location_name] = dict
|
||||||
plant_dict["total output"][product_name] += vals
|
plant_dict["Total output"][product_name] += vals
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if !skip_plant
|
if !skip_plant
|
||||||
if plant.plant_name ∉ keys(output["plants"])
|
if plant.plant_name ∉ keys(output["Plants"])
|
||||||
output["plants"][plant.plant_name] = Dict()
|
output["Plants"][plant.plant_name] = Dict()
|
||||||
end
|
end
|
||||||
output["plants"][plant.plant_name][plant.location_name] = plant_dict
|
output["Plants"][plant.plant_name][plant.location_name] = plant_dict
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
output["costs"]["total"] = sum(values(output["costs"]))
|
output["Costs"]["Total (\$)"] = sum(values(output["Costs"]))
|
||||||
return output
|
return output
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"$id": "https://anl-ceeesa.github.io/RELOG/input",
|
"$id": "https://anl-ceeesa.github.io/RELOG/input",
|
||||||
"title": "Schema for ReverseManufacturing Input File",
|
"title": "Schema for RELOG Input File",
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"TimeSeries": {
|
"TimeSeries": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
@@ -12,10 +12,10 @@
|
|||||||
"Parameters": {
|
"Parameters": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"time": { "type": "number" }
|
"time horizon (years)": { "type": "number" }
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"time periods"
|
"time horizon (years)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Plant": {
|
"Plant": {
|
||||||
@@ -24,10 +24,15 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"input": { "type": "string" },
|
"input": { "type": "string" },
|
||||||
"outputs": {
|
"outputs (tonne/tonne)": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": { "type": "number" }
|
"additionalProperties": { "type": "number" }
|
||||||
},
|
},
|
||||||
|
"energy (GJ/tonne)": { "$ref": "#/definitions/TimeSeries" },
|
||||||
|
"emissions (tonne/tonne)": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": { "$ref": "#/definitions/TimeSeries" }
|
||||||
|
},
|
||||||
"locations": { "$ref": "#/definitions/PlantLocation" }
|
"locations": { "$ref": "#/definitions/PlantLocation" }
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -41,42 +46,42 @@
|
|||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"latitude": { "type": "number" },
|
"latitude (deg)": { "type": "number" },
|
||||||
"longitude": { "type": "number" },
|
"longitude (deg)": { "type": "number" },
|
||||||
"disposal": {
|
"disposal": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"cost": { "$ref": "#/definitions/TimeSeries" },
|
"cost ($/tonne)": { "$ref": "#/definitions/TimeSeries" },
|
||||||
"limit": { "$ref": "#/definitions/TimeSeries" }
|
"limit (tonne)": { "$ref": "#/definitions/TimeSeries" }
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"cost"
|
"cost ($/tonne)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"capacities": {
|
"capacities (tonne)": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"variable operating cost": { "$ref": "#/definitions/TimeSeries" },
|
"variable operating cost ($/tonne)": { "$ref": "#/definitions/TimeSeries" },
|
||||||
"fixed operating cost": { "$ref": "#/definitions/TimeSeries" },
|
"fixed operating cost ($)": { "$ref": "#/definitions/TimeSeries" },
|
||||||
"opening cost": { "$ref": "#/definitions/TimeSeries" }
|
"opening cost ($)": { "$ref": "#/definitions/TimeSeries" }
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"variable operating cost",
|
"variable operating cost ($/tonne)",
|
||||||
"fixed operating cost",
|
"fixed operating cost ($)",
|
||||||
"opening cost"
|
"opening cost ($)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"latitude",
|
"latitude (deg)",
|
||||||
"longitude",
|
"longitude (deg)",
|
||||||
"capacities"
|
"capacities (tonne)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -85,14 +90,14 @@
|
|||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"latitude": { "type": "number" },
|
"latitude (deg)": { "type": "number" },
|
||||||
"longitude": { "type": "number" },
|
"longitude (deg)": { "type": "number" },
|
||||||
"amount": { "$ref": "#/definitions/TimeSeries" }
|
"amount (tonne)": { "$ref": "#/definitions/TimeSeries" }
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"latitude",
|
"latitude (deg)",
|
||||||
"longitude",
|
"longitude (deg)",
|
||||||
"amount"
|
"amount (tonne)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -101,11 +106,16 @@
|
|||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"transportation cost": { "$ref": "#/definitions/TimeSeries" },
|
"transportation cost ($/km/tonne)": { "$ref": "#/definitions/TimeSeries" },
|
||||||
|
"transportation energy (J/km/tonne)": { "$ref": "#/definitions/TimeSeries" },
|
||||||
|
"transportation emissions (tonne/km/tonne)": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": { "$ref": "#/definitions/TimeSeries" }
|
||||||
|
},
|
||||||
"initial amounts": { "$ref": "#/definitions/InitialAmount" }
|
"initial amounts": { "$ref": "#/definitions/InitialAmount" }
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"transportation cost"
|
"transportation cost ($/km/tonne)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -117,6 +127,7 @@
|
|||||||
"products": { "$ref": "#/definitions/Product" }
|
"products": { "$ref": "#/definitions/Product" }
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
"parameters",
|
||||||
"plants",
|
"plants",
|
||||||
"products"
|
"products"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -36,27 +36,26 @@ using RELOG, Cbc, JuMP, Printf, JSON, MathOptInterface.FileFormats
|
|||||||
@test lower_bound(v) == 0.0
|
@test lower_bound(v) == 0.0
|
||||||
@test upper_bound(v) == 1.0
|
@test upper_bound(v) == 1.0
|
||||||
|
|
||||||
dest = FileFormats.Model(format = FileFormats.FORMAT_LP)
|
#dest = FileFormats.Model(format = FileFormats.FORMAT_LP)
|
||||||
MOI.copy_to(dest, model.mip)
|
#MOI.copy_to(dest, model.mip)
|
||||||
MOI.write_to_file(dest, "model.lp")
|
#MOI.write_to_file(dest, "model.lp")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "solve" begin
|
@testset "solve" begin
|
||||||
solution = RELOG.solve("$(pwd())/../instances/s1.json")
|
solution = RELOG.solve("$(pwd())/../instances/s1.json")
|
||||||
JSON.print(stdout, solution, 4)
|
JSON.print(stdout, solution, 4)
|
||||||
|
|
||||||
@test "costs" in keys(solution)
|
@test "Costs" in keys(solution)
|
||||||
@test "fixed operating" in keys(solution["costs"])
|
@test "Fixed operating (\$)" in keys(solution["Costs"])
|
||||||
@test "transportation" in keys(solution["costs"])
|
@test "Transportation (\$)" in keys(solution["Costs"])
|
||||||
@test "variable operating" in keys(solution["costs"])
|
@test "Variable operating (\$)" in keys(solution["Costs"])
|
||||||
@test "total" in keys(solution["costs"])
|
@test "Total (\$)" in keys(solution["Costs"])
|
||||||
|
|
||||||
@test "plants" in keys(solution)
|
@test "Plants" in keys(solution)
|
||||||
@test "F1" in keys(solution["plants"])
|
@test "F1" in keys(solution["Plants"])
|
||||||
@test "F2" in keys(solution["plants"])
|
@test "F2" in keys(solution["Plants"])
|
||||||
@test "F3" in keys(solution["plants"])
|
@test "F3" in keys(solution["Plants"])
|
||||||
@test "F4" in keys(solution["plants"])
|
@test "F4" in keys(solution["Plants"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user