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/ntp bugfix #14

Merged
merged 20 commits into from
Aug 4, 2023
Merged

Jd/ntp bugfix #14

merged 20 commits into from
Aug 4, 2023

Conversation

jd-lara
Copy link
Member

@jd-lara jd-lara commented Aug 2, 2023

Fixes to avoid issues with the NTP models. Some of these cases were not covered by the tests.

@jd-lara jd-lara requested a review from pesap August 2, 2023 06:01
@jd-lara jd-lara self-assigned this Aug 2, 2023
src/feedforwards.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydrogeneration_constructor.jl Outdated Show resolved Hide resolved
src/hydrogeneration_constructor.jl Outdated Show resolved Hide resolved
jd-lara and others added 7 commits August 2, 2023 00:11
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydrogeneration_constructor.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydro_generation.jl Outdated Show resolved Hide resolved
src/hydrogeneration_constructor.jl Outdated Show resolved Hide resolved
@@ -571,9 +580,9 @@ function PSI.add_constraints!(
resolution = PSI.get_resolution(container)
fraction_of_hour = Dates.value(Dates.Minute(resolution)) / PSI.MINUTES_IN_HOUR
names = [PSY.get_name(x) for x in devices]
initial_conditions = PSI.get_initial_condition(container, InitialEnergyLevelDown(), V)
initial_conditions = PSI.get_initial_condition(container, InitialHydroEnergyLevelDown(), V)
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
initial_conditions = PSI.get_initial_condition(container, InitialHydroEnergyLevelDown(), V)
initial_conditions =
PSI.get_initial_condition(container, InitialHydroEnergyLevelDown(), V)

@@ -764,23 +775,25 @@
return
end


Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

Comment on lines 876 to 877
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
var_val = PSI.get_variable_value(
store,
HydroEnergyVariableUp(),
PSI.get_component_type(ic),
)

Comment on lines 1209 to 1210
PSI.add_variables!(container, HydroEnergyVariableUp, devices, HydroDispatchPumpedStorage())
PSI.add_variables!(container, HydroEnergyVariableDown, devices, HydroDispatchPumpedStorage())
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
PSI.add_variables!(container, HydroEnergyVariableUp, devices, HydroDispatchPumpedStorage())
PSI.add_variables!(container, HydroEnergyVariableDown, devices, HydroDispatchPumpedStorage())
PSI.add_variables!(
container,
HydroEnergyVariableUp,
devices,
HydroDispatchPumpedStorage(),
)
PSI.add_variables!(
container,
HydroEnergyVariableDown,
devices,
HydroDispatchPumpedStorage(),
)

@@ -571,9 +580,9 @@ function PSI.add_constraints!(
resolution = PSI.get_resolution(container)
fraction_of_hour = Dates.value(Dates.Minute(resolution)) / PSI.MINUTES_IN_HOUR
names = [PSY.get_name(x) for x in devices]
initial_conditions = PSI.get_initial_condition(container, InitialEnergyLevelDown(), V)
initial_conditions = PSI.get_initial_condition(container, InitialHydroEnergyLevelDown(), V)
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
initial_conditions = PSI.get_initial_condition(container, InitialHydroEnergyLevelDown(), V)
initial_conditions =
PSI.get_initial_condition(container, InitialHydroEnergyLevelDown(), V)

Comment on lines 875 to 876
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
var_val = PSI.get_variable_value(
store,
HydroEnergyVariableUp(),
PSI.get_component_type(ic),
)

Comment on lines 876 to 877
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
var_val = PSI.get_variable_value(
store,
HydroEnergyVariableUp(),
PSI.get_component_type(ic),
)

Comment on lines 876 to 877
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
var_val =
PSI.get_variable_value(store, EnergyVariableUp(), PSI.get_component_type(ic))
PSI.get_variable_value(store, HydroEnergyVariableUp(), PSI.get_component_type(ic))
var_val = PSI.get_variable_value(
store,
HydroEnergyVariableUp(),
PSI.get_component_type(ic),
)

@jd-lara jd-lara merged commit cd01d2a into main Aug 4, 2023
1 of 5 checks passed
@jd-lara jd-lara deleted the jd/ntp_bugfix branch August 4, 2023 05:33
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.

None yet

1 participant