Skip to content

Commit

Permalink
Merge pull request #52 from NREL-Sienna/jdgk/cost_functions_2
Browse files Browse the repository at this point in the history
Cost Functions Refactor 2.1
  • Loading branch information
jd-lara authored Apr 30, 2024
2 parents 30b5ec8 + 4aed821 commit 5a4d840
Show file tree
Hide file tree
Showing 15 changed files with 138 additions and 68 deletions.
2 changes: 1 addition & 1 deletion psid_tests/data_examples/omib_sys.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion psid_tests/data_examples/omib_sys_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"count": 1
},
{
"type": "DynamicGenerator",
"type": "DynamicGenerator{BaseMachine, SingleMass, AVRFixed, TGFixed, PSSFixed}",
"count": 1
},
{
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion psid_tests/data_examples/threebus_sys.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions psid_tests/data_examples/threebus_sys_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"count": 1
},
{
"type": "DynamicGenerator",
"type": "DynamicGenerator{OneDOneQMachine, SingleMass, AVRTypeI, TGFixed, PSSFixed}",
"count": 1
},
{
"type": "DynamicInverter",
"type": "DynamicInverter{AverageConverter, OuterControl{VirtualInertia, ReactivePowerDroop}, VoltageModeControl, FixedDCSource, KauraPLL, LCLFilter, Nothing}",
"count": 1
},
{
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion psid_tests/data_tests/9BusSystem.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion psid_tests/data_tests/9BusSystem_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"count": 1
},
{
"type": "DynamicGenerator",
"type": "DynamicGenerator{AndersonFouadMachine, SingleMass, AVRTypeII, TGTypeI, PSSFixed}",
"count": 3
},
{
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion psid_tests/data_tests/WECC_240_dynamic.json

Large diffs are not rendered by default.

24 changes: 22 additions & 2 deletions psid_tests/data_tests/WECC_240_dynamic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,31 @@
"count": 4
},
{
"type": "DynamicGenerator",
"type": "DynamicGenerator{RoundRotorQuadratic, SingleMass, SEXS, GasTG, IEEEST}",
"count": 6
},
{
"type": "DynamicInverter",
"type": "DynamicGenerator{RoundRotorQuadratic, SingleMass, SEXS, GasTG, PSSFixed}",
"count": 41
},
{
"type": "DynamicGenerator{RoundRotorQuadratic, SingleMass, SEXS, HydroTurbineGov, IEEEST}",
"count": 3
},
{
"type": "DynamicGenerator{RoundRotorQuadratic, SingleMass, SEXS, HydroTurbineGov, PSSFixed}",
"count": 22
},
{
"type": "DynamicGenerator{RoundRotorQuadratic, SingleMass, SEXS, SteamTurbineGov1, IEEEST}",
"count": 1
},
{
"type": "DynamicGenerator{RoundRotorQuadratic, SingleMass, SEXS, SteamTurbineGov1, PSSFixed}",
"count": 36
},
{
"type": "DynamicInverter{RenewableEnergyConverterTypeA, OuterControl{ActiveRenewableControllerAB, ReactiveRenewableControllerAB}, RECurrentControlB, FixedDCSource, FixedFrequency, RLFilter, Nothing}",
"count": 37
},
{
Expand Down

Large diffs are not rendered by default.

70 changes: 60 additions & 10 deletions psy_data/data_10bus_ac_dc_pu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -0.30, max = 0.30),
ramp_limits = nothing,
time_limits = nothing,
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 14.0, 0.0), 0.0, 4.0, 2.0),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 14.0, 0.0)),
0.0,
4.0,
2.0,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -243,7 +248,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -1.275, max = 1.275),
ramp_limits = (up = 0.02 * 2.2125, down = 0.02 * 2.2125),
time_limits = (up = 2.0, down = 1.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 15.0, 0.0), 0.0, 1.5, 0.75),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 15.0, 0.0)),
0.0,
1.5,
0.75,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -260,7 +270,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -3.90, max = 3.90),
ramp_limits = (up = 0.012 * 5.2, down = 0.012 * 5.2),
time_limits = (up = 3.0, down = 2.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 30.0, 0.0), 0.0, 3.0, 1.5),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 30.0, 0.0)),
0.0,
3.0,
1.5,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -277,7 +292,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -1.5, max = 1.5),
ramp_limits = (up = 0.015 * 2.5, down = 0.015 * 2.5),
time_limits = (up = 2.0, down = 1.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 40.0, 0.0), 0.0, 4.0, 2.0),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 40.0, 0.0)),
0.0,
4.0,
2.0,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -294,7 +314,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -4.50, max = 4.50),
ramp_limits = (up = 0.015 * 7.5, down = 0.015 * 7.5),
time_limits = (up = 5.0, down = 3.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 10.0, 0.0), 0.0, 1.5, 0.75),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 10.0, 0.0)),
0.0,
1.5,
0.75,
),
base_power = 100.0,
),
ThermalStandard(;
Expand All @@ -311,7 +336,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -0.30, max = 0.30),
ramp_limits = nothing,
time_limits = nothing,
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 14.0, 0.0), 0.0, 4.0, 2.0),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 14.0, 0.0)),
0.0,
4.0,
2.0,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -328,7 +358,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -1.275, max = 1.275),
ramp_limits = (up = 0.02 * 2.2125, down = 0.02 * 2.2125),
time_limits = (up = 2.0, down = 1.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 15.0, 0.0), 0.0, 1.5, 0.75),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 15.0, 0.0)),
0.0,
1.5,
0.75,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -345,7 +380,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -3.90, max = 3.90),
ramp_limits = (up = 0.012 * 5.2, down = 0.012 * 5.2),
time_limits = (up = 3.0, down = 2.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 30.0, 0.0), 0.0, 3.0, 1.5),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 30.0, 0.0)),
0.0,
3.0,
1.5,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -362,7 +402,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -1.5, max = 1.5),
ramp_limits = (up = 0.015 * 2.5, down = 0.015 * 2.5),
time_limits = (up = 2.0, down = 1.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 40.0, 0.0), 0.0, 4.0, 2.0),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 40.0, 0.0)),
0.0,
4.0,
2.0,
),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -379,7 +424,12 @@ thermal_generators10(nodes10) = [
reactive_power_limits = (min = -4.50, max = 4.50),
ramp_limits = (up = 0.015 * 7.5, down = 0.015 * 7.5),
time_limits = (up = 5.0, down = 3.0),
operation_cost = ThreePartCost(QuadraticFunctionData(0.0, 10.0, 0.0), 0.0, 1.5, 0.75),
operation_cost = ThermalGenerationCost(
CostCurve(QuadraticCurve(0.0, 10.0, 0.0)),
0.0,
1.5,
0.75,
),
base_power = 100.0,
),
];
Expand Down
10 changes: 5 additions & 5 deletions psy_data/data_14bus_pu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ thermal_generators14(nodes14) = [
reactive_power_limits = (min = 0.0, max = 0.1),
time_limits = nothing,
ramp_limits = nothing,
operation_cost = ThreePartCost(QuadraticFunctionData(0.0430292599, 20.0, 0.0), 0.0, 0.0, 0.0),
operation_cost = ThermalGenerationCost(CostCurve(QuadraticCurve(0.0430292599, 20.0, 0.0)), 0.0, 0.0, 0.0),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -671,7 +671,7 @@ thermal_generators14(nodes14) = [
reactive_power_limits = (min = -0.4, max = 0.5),
time_limits = nothing,
ramp_limits = nothing,
operation_cost = ThreePartCost(QuadraticFunctionData(0.25, 20.0, 0.0), 0.0, 0.0, 0.0),
operation_cost = ThermalGenerationCost(CostCurve(QuadraticCurve(0.25, 20.0, 0.0)), 0.0, 0.0, 0.0),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -688,7 +688,7 @@ thermal_generators14(nodes14) = [
reactive_power_limits = (min = 0.0, max = 0.4),
time_limits = nothing,
ramp_limits = nothing,
operation_cost = ThreePartCost(QuadraticFunctionData(0.01, 40.0, 0.0), 0.0, 0.0, 0.0),
operation_cost = ThermalGenerationCost(CostCurve(QuadraticCurve(0.01, 40.0, 0.0)), 0.0, 0.0, 0.0),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -705,7 +705,7 @@ thermal_generators14(nodes14) = [
reactive_power_limits = (min = -0.06, max = 0.24),
time_limits = nothing,
ramp_limits = nothing,
operation_cost = ThreePartCost(QuadraticFunctionData(0.01, 40.0, 0.0), 0.0, 0.0, 0.0),
operation_cost = ThermalGenerationCost(CostCurve(QuadraticCurve(0.01, 40.0, 0.0)), 0.0, 0.0, 0.0),
base_power = 100.0,
),
ThermalStandard(
Expand All @@ -722,7 +722,7 @@ thermal_generators14(nodes14) = [
reactive_power_limits = (min = -0.06, max = 0.24),
time_limits = nothing,
ramp_limits = nothing,
operation_cost = ThreePartCost(QuadraticFunctionData(0.01, 40.0, 0.0), 0.0, 0.0, 0.0),
operation_cost = ThermalGenerationCost(CostCurve(QuadraticCurve(0.01, 40.0, 0.0)), 0.0, 0.0, 0.0),
base_power = 100.0,
),
]
Expand Down
Loading

0 comments on commit 5a4d840

Please sign in to comment.