Skip to content

Commit

Permalink
Bump Pyomo to v6.7.1
Browse files Browse the repository at this point in the history
and associated changes including changes to objective
function values and ordering of set() to avoid
non-determinacy issues introduced in 6.6.0.
  • Loading branch information
anamileva committed Feb 27, 2024
1 parent ad4ffd1 commit 30fee35
Show file tree
Hide file tree
Showing 60 changed files with 391 additions and 301 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-20171691798.19
-20171691804.79
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-20171691750.06
-20171691754.44
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-110384972580606.39
-110384972580597.61
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-10087189902.38
-10087189895.81
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-17323444870.1
-17323444870.08
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-17323445422.1
-17323445422.08
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-11133045895.81
-11133045900.18
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -76.25 -0.02
Gas 151,905.63 49.70
Hybrid_Solar 1,395.96 0.46
Hydro 65,867.85 21.55
Solar 32,823.58 10.74
Wind 53,712.83 17.57
Gas 160,664.36 51.13
Hybrid_Solar 1,239.36 0.39
Hydro 65,867.85 20.96
Solar 32,823.58 10.45
Wind 53,712.83 17.09
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -61.52 -0.02
Gas 152,149.59 48.76
Hybrid_Solar 2,350.86 0.75
Hydro 65,867.85 21.11
Solar 35,386.91 11.34
Wind 56,339.03 18.06
Zone1 2026 Batteries -75.32 -0.02
Gas 160,307.74 50.08
Hybrid_Solar 2,274.81 0.71
Hydro 65,867.85 20.58
Solar 35,386.91 11.05
Wind 56,339.03 17.60
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -52.16 -0.02
Gas 151,583.77 44.00
Hybrid_Solar 377.48 0.11
Hydro 97,045.58 28.17
Solar 35,691.85 10.36
Wind 59,865.29 17.38
Zone1 2026 Batteries -53.62 -0.02
Gas 156,136.49 44.73
Hybrid_Solar 369.43 0.11
Hydro 97,045.58 27.80
Solar 35,691.85 10.23
Wind 59,865.29 17.15
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -37.14 -0.01
Gas 151,005.03 41.83
Hybrid_Solar 220.10 0.06
Hydro 97,045.58 26.88
Solar 36,295.00 10.05
Wind 76,452.35 21.18
Zone1 2026 Batteries -42.97 -0.01
Gas 155,551.95 42.56
Hybrid_Solar 187.98 0.05
Hydro 97,045.58 26.55
Solar 36,295.00 9.93
Wind 76,452.35 20.92
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -78.99 -0.03
Gas 153,400.66 48.75
Hybrid_Solar 2,842.49 0.90
Hydro 65,867.85 20.93
Solar 35,138.66 11.17
Wind 57,510.50 18.28
Zone1 2026 Batteries -96.06 -0.03
Gas 160,215.62 49.87
Hybrid_Solar 2,647.58 0.82
Hydro 65,867.85 20.50
Solar 35,138.66 10.94
Wind 57,510.50 17.90
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -85.63 -0.03
Gas 153,219.77 49.21
Hybrid_Solar 1,500.58 0.48
Hydro 65,867.85 21.16
Solar 36,240.81 11.64
Wind 54,609.64 17.54
Zone1 2026 Batteries -98.12 -0.03
Gas 160,422.41 50.37
Hybrid_Solar 1,431.74 0.45
Hydro 65,867.85 20.68
Solar 36,240.81 11.38
Wind 54,609.64 17.15
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -69.34 -0.02
Gas 152,204.58 44.35
Hybrid_Solar 1,392.63 0.41
Hydro 97,045.58 28.27
Solar 35,138.66 10.24
Wind 57,510.50 16.76
Zone1 2026 Batteries -79.19 -0.02
Gas 156,586.78 45.08
Hybrid_Solar 1,175.53 0.34
Hydro 97,045.58 27.94
Solar 35,138.66 10.12
Wind 57,510.50 16.56
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -74.51 -0.02
Gas 152,315.15 44.72
Gas 156,987.49 45.47
Hybrid_Solar 466.73 0.14
Hydro 97,045.58 28.49
Solar 36,240.81 10.64
Wind 54,609.64 16.03
Hydro 97,045.58 28.11
Solar 36,240.81 10.50
Wind 54,609.64 15.82
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -69.05 -0.02
Gas 151,779.02 46.40
Hybrid_Solar 567.70 0.17
Hydro 65,867.85 20.14
Solar 34,835.95 10.65
Wind 74,097.91 22.65
Zone1 2026 Batteries -77.06 -0.02
Gas 158,300.19 47.46
Hybrid_Solar 523.53 0.16
Hydro 65,867.85 19.75
Solar 34,835.95 10.44
Wind 74,097.91 22.22
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -91.72 -0.03
Gas 153,477.80 48.37
Hybrid_Solar 2,657.34 0.84
Hydro 65,867.85 20.76
Solar 36,873.78 11.62
Wind 58,534.70 18.45
Zone1 2026 Batteries -99.08 -0.03
Gas 160,181.64 49.47
Hybrid_Solar 2,404.48 0.74
Hydro 65,867.85 20.34
Solar 36,873.78 11.39
Wind 58,534.70 18.08
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -34.07 -0.01
Gas 151,591.19 42.39
Gas 155,971.96 43.08
Hybrid_Solar 102.65 0.03
Hydro 97,045.58 27.14
Solar 34,835.95 9.74
Wind 74,097.91 20.72
Hydro 97,045.58 26.81
Solar 34,835.95 9.62
Wind 74,097.91 20.47
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
--> Energy Production <--
Annual Energy (MWh) % Total Power
load_zone period technology
Zone1 2026 Batteries -75.31 -0.02
Gas 152,416.19 44.12
Hybrid_Solar 638.30 0.18
Hydro 97,045.58 28.09
Solar 36,873.78 10.67
Wind 58,534.70 16.95
Zone1 2026 Batteries -78.45 -0.02
Gas 156,918.43 44.85
Hybrid_Solar 618.43 0.18
Hydro 97,045.58 27.73
Solar 36,873.78 10.54
Wind 58,534.70 16.73
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.11111111 0.0 0.88888889 0.0 0.4 0.0 360.0 360.0 0.0 6.0
Coal 0 1.0 0.88888889 0.0 1.6 2.0 1.6 360.0 360.0 0.0 6.0
Gas_CCGT -1 1.0 0.0 0.0 2.0 1.6 2.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 1.0 0.0 0.0 2.4 1.2 2.4 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.7 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.7 0.7 0.0 2.52 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.0 0.0 0.0 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Coal 0 0.0 0.0 0.0 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CCGT -1 0.0 0.0 0.83333389 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 0.83333389 0.83333389 0.0 2.000004 0.999998 2.000004 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.99999944 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.99999944 0.99999944 0.0 3.599998 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.99999944 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.99999944 0.99999944 0.0 3.599998 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Coal -1 0.0 -0.0 0.0 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Coal 0 0.0 0.0 0.0 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CCGT -1 0.0 0.0 0.83333389 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CCGT 0 0.83333389 0.83333389 0.0 2.000004 0.999998 2.000004 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.99999944 0.0 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT 0 0.99999944 0.99999944 0.0 3.599998 0.0 0.0 360.0 360.0 0.0 6.0
Gas_CT -1 0.0 0.0 0.99999944 0.0 0 0 360.0 360.0 0.0 6.0
Gas_CT 0 0.99999944 0.99999944 0.0 3.599998 0 0 360.0 360.0 0.0 6.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-56530649982951.8
-56530649991711.79
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-560795927282.98
-560795927282.51
2 changes: 1 addition & 1 deletion gridpath/project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def export_results(
m.technology[prj],
m.load_zone[prj],
]
for (prj, prd) in set(m.PRJ_OPR_PRDS | m.PRJ_FIN_PRDS)
for (prj, prd) in sorted(list(set(m.PRJ_OPR_PRDS | m.PRJ_FIN_PRDS)))
],
).set_index(["project", "period"])

Expand Down
12 changes: 7 additions & 5 deletions gridpath/project/capacity/capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,13 @@ def op_gens_by_tmp(mod, tmp):

def operational_periods_by_project(prj, project_operational_periods):
""" """
return list(
set(
period
for (project, period) in project_operational_periods
if project == prj
return sorted(
list(
set(
period
for (project, period) in project_operational_periods
if project == prj
)
)
)

Expand Down
4 changes: 3 additions & 1 deletion gridpath/project/capacity/capacity_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ def add_model_components(
m.CAPACITY_GROUP_PERIODS = Set(dimen=2)

m.CAPACITY_GROUPS = Set(
initialize=lambda mod: list(set([g for (g, p) in mod.CAPACITY_GROUP_PERIODS]))
initialize=lambda mod: sorted(
list(set([g for (g, p) in mod.CAPACITY_GROUP_PERIODS]))
)
)

m.PROJECTS_IN_CAPACITY_GROUP = Set(m.CAPACITY_GROUPS, within=m.PROJECTS)
Expand Down
12 changes: 8 additions & 4 deletions gridpath/project/capacity/capacity_types/common_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ def project_relevant_periods(
capital costs) given all project-vintages and relevant periods by
project-vintage (the lifetime is allowed to differ by vintage).
"""
return set(
(g, p)
for (g, v) in project_vintages_set
for p in relevant_periods_by_project_vintage_set[g, v]
return sorted(
list(
set(
(g, p)
for (g, v) in project_vintages_set
for p in relevant_periods_by_project_vintage_set[g, v]
)
)
)


Expand Down
18 changes: 11 additions & 7 deletions gridpath/project/capacity/capacity_types/gen_ret_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,21 @@ def add_model_components(
m.GEN_RET_BIN_OPR_PRDS = Set(dimen=2)

m.GEN_RET_BIN = Set(
initialize=lambda mod: list(set(g for (g, p) in mod.GEN_RET_BIN_OPR_PRDS))
initialize=lambda mod: sorted(
list(set(g for (g, p) in mod.GEN_RET_BIN_OPR_PRDS))
)
)

m.OPR_PRDS_BY_GEN_RET_BIN = Set(
m.GEN_RET_BIN,
initialize=lambda mod, prj: list(
set(
period
for (project, period) in mod.GEN_RET_BIN_OPR_PRDS
if project == prj
)
initialize=lambda mod, prj: sorted(
list(
set(
period
for (project, period) in mod.GEN_RET_BIN_OPR_PRDS
if project == prj
)
),
),
)

Expand Down
Loading

0 comments on commit 30fee35

Please sign in to comment.