Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jd/fix cost functions #87

Merged
merged 4 commits into from
May 13, 2024
Merged

Jd/fix cost functions #87

merged 4 commits into from
May 13, 2024

Conversation

jd-lara
Copy link
Member

@jd-lara jd-lara commented May 13, 2024

This PR adds new cases for cost function implementation testing

Copy link
Collaborator

@GabrielKS GabrielKS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're missing some code looks good aside from some duplication and maybe a bug thereby caused

src/library/psitest_library.jl Show resolved Hide resolved
src/library/psitest_library.jl Outdated Show resolved Hide resolved
return base_sys
end

function build_linear_fuel_test_sys(; kwargs...)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: could eliminate duplication by defining a helper function

function build_cost_test_sys(gen_func; kwargs...)
    ...
    test_gen = gen_func(node)
    ...
end

(or fold this into _build_cost_base_test_sys) and then each of these is like

Suggested change
function build_linear_fuel_test_sys(; kwargs...)
build_linear_fuel_test_sys(; kwargs...) =
build_cost_test_sys(thermal_generator_linear_fuel; kwargs...)

src/system_library.jl Show resolved Hide resolved
@GabrielKS
Copy link
Collaborator

Depends on NREL-Sienna/PowerSystemsTestData#54

Copy link
Collaborator

@rodrigomha rodrigomha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I can take care of testing all of these in NREL-Sienna/PowerSimulations.jl#1104

@GabrielKS GabrielKS self-requested a review May 13, 2024 17:04
@jd-lara
Copy link
Member Author

jd-lara commented May 13, 2024

I'll merge, and if we need more, we should open more. I don't want to make these very large PRs a common thing.

@rodrigomha, note that in some cases, there is non-sensical existing data already

@jd-lara jd-lara merged commit 2b97700 into psy4 May 13, 2024
1 of 6 checks passed
@jd-lara jd-lara deleted the jd/fix_cost_functions branch June 25, 2024 16:41
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants