We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73057e8 commit ea2e33aCopy full SHA for ea2e33a
switch_model/policies/wind_to_solar_ratio.py
@@ -47,10 +47,15 @@ def define_components(mod):
47
within=NonNegativeReals
48
)
49
50
+ # We use a scaling factor to improve the numerical properties
51
+ # of the model.
52
+ # Learn more by reading the documentation on Numerical Issues.
53
+ # 1e-3 was picked since this value is normally on the order of GW instead of MW
54
+ scaling_factor = 1e-3
55
mod.wind_to_solar_ratio_const = Constraint(
56
mod.PERIODS,
57
rule=lambda m, p: Constraint.skip if m.wind_to_solar_ratio == 0 else (
- m.WindCapacity[p] == m.SolarCapacity[p] * m.wind_to_solar_ratio[p]
58
+ m.WindCapacity[p] * scaling_factor == m.SolarCapacity[p] * m.wind_to_solar_ratio[p] * scaling_factor
59
60
61
0 commit comments