Skip to content

Commit

Permalink
Merge pull request #12 from TomFer97/sankey_branch
Browse files Browse the repository at this point in the history
Business plan plot
  • Loading branch information
davide-f authored Nov 13, 2023
2 parents fc3420f + 76cf345 commit 4e6a2a8
Show file tree
Hide file tree
Showing 14 changed files with 448 additions and 15 deletions.
10 changes: 6 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,30 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
ExportAll = "ad2082ca-a69e-11e9-38fa-e96309a31fe4"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
TheoryOfGames = "eb50afb4-6f20-4b37-9b66-473e668300bf"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LayeredLayouts = "f4a74d36-062a-4d48-97cd-1356bad1de4e"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SankeyPlots = "8fd88ec8-d95c-41fc-b299-05f2225f2cc5"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
TheoryOfGames = "eb50afb4-6f20-4b37-9b66-473e668300bf"
XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[compat]
julia = "1"
CSV = "0.10"
DataFrames = "1"
ExportAll = "0.1"
FileIO = "1"
Formatting = "0.4"
TheoryOfGames = "0.1"
JuMP = "1"
LayeredLayouts = "0.2"
MathOptInterface = "1.0"
Plots = "1"
SankeyPlots = "0.2.2"
StatsPlots = "0.15"
TheoryOfGames = "0.1"
XLSX = "0.9"
YAML = "0.4"
YAML = "0.4"
julia = "1"
8 changes: 7 additions & 1 deletion docs/src/examples/example_aggregated_non_cooperative.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,10 @@ print_summary(ANC_Model)
save_summary(ANC_Model, output_file_isolated)

# Plot the sankey plot of resources
plot_sankey(ANC_Model)
plot_sankey(ANC_Model)

# DataFrame of the business plan
business_plan(ANC_Model)

# plot business plan
business_plan_plot(ANC_Model)
8 changes: 7 additions & 1 deletion docs/src/examples/example_cooperative.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,10 @@ print_summary(CO_Model)
save_summary(CO_Model, output_file_isolated)

# Plot the sankey plot of resources
plot_sankey(CO_Model)
plot_sankey(CO_Model)

# DataFrame of the business plan
business_plan(CO_Model)

# plot business plan
business_plan_plot(CO_Model)
8 changes: 7 additions & 1 deletion docs/src/examples/example_non_cooperative.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,10 @@ print_summary(NC_Model)
save_summary(NC_Model, output_file_isolated)

# Plot the sankey plot of resources
plot_sankey(NC_Model)
plot_sankey(NC_Model)

# DataFrame of the business plan
business_plan(NC_Model)

# plot business plan
business_plan_plot(NC_Model)
16 changes: 16 additions & 0 deletions examples/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
EnergyCommunity = "2f2d8a28-e724-42c4-aa4e-51fe4e6b7a61"
ExportAll = "ad2082ca-a69e-11e9-38fa-e96309a31fe4"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
TheoryOfGames = "eb50afb4-6f20-4b37-9b66-473e668300bf"
HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SankeyPlots = "8fd88ec8-d95c-41fc-b299-05f2225f2cc5"
XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
20 changes: 16 additions & 4 deletions examples/RunSingleModel.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run this script from EnergyCommunity.jl root!!!
using Pkg
Pkg.activate(".") # this line requires EnergyCommunity.jl to be the current directory
# # Run this script from EnergyCommunity.jl root!!!
# using Pkg
# Pkg.activate("examples")

using EnergyCommunity, JuMP
using HiGHS, Plots
Expand Down Expand Up @@ -45,6 +45,12 @@ save_summary(ECModel, output_file_combined)
# Plot sankey plot of CO model
plot_sankey(ECModel)

# DataFrame of the business plan
business_plan(ECModel)

# plot 20 years business plan of CO model
business_plan_plot(ECModel)

## Model NC

# create NonCooperative model
Expand All @@ -66,4 +72,10 @@ print_summary(NC_Model)
save_summary(NC_Model, output_file_isolated)

# plot Sankey plot of NC model
plot_sankey(NC_Model)
plot_sankey(NC_Model)

# DataFrame of the business plan of NC model
business_plan(NC_Model)

# plot business plan of NC model
business_plan_plot(NC_Model)
4 changes: 2 additions & 2 deletions examples/RunSingleModel_complete.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run this script from EnergyCommunity.jl root!!!
# # Run this script from EnergyCommunity.jl root!!!
# using Pkg
# Pkg.activate(".") # this line requires EnergyCommunity.jl to be the current directory
# Pkg.activate("examples")

using EnergyCommunity, JuMP
using HiGHS, Plots
Expand Down
Loading

0 comments on commit 4e6a2a8

Please sign in to comment.