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

Dsc/psy2pras cleanup #25

Closed
wants to merge 3 commits into from
Closed

Dsc/psy2pras cleanup #25

wants to merge 3 commits into from

Conversation

scdhulipala
Copy link
Contributor

@scdhulipala scdhulipala commented Nov 18, 2024

  1. Remove unnecessary tracking in S2P_metadata
  2. Clean-up lumping logic - this makes system manipulations, so if we are not okay with this, let's discuss.

All the tests pass locally but we might have to discuss including a test which cpatures the failure of luming logic (we can discuss more after you review this)

Copy link
Collaborator

@josephmckinsey josephmckinsey left a comment

Choose a reason for hiding this comment

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

  • We should move that time series logic to a separate function.
  • I would still prefer to avoid removing or adding any components to the system.

PSY.set_prime_mover_type!(temp_lumped_wind_gen, PSY.PrimeMovers.WT)
ext = PSY.get_ext(temp_lumped_wind_gen)
ext["region_gen_ts"] =
round.(
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should be able to turn this rounding procedure into a proper function.

PSY.set_rating!(temp_lumped_wind_gen, maximum(ext["region_gen_ts"]))
PSY.add_component!(sys, temp_lumped_wind_gen)
for comp in wind_gs
PSY.remove_component!(sys, comp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are we removing this component? Can't we just create the appropriate generator from the new lumped one without having to add it to the system?

@@ -891,7 +852,7 @@ function generate_pras_system(

@info "The Sienna/Data PowerSystems System is being de-serialized from the System JSON ..."
sys = try
PSY.System(sys_location; time_series_read_only=true, runchecks=false)
PSY.System(sys_location; runchecks=false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was this necessary?

@scdhulipala scdhulipala marked this pull request as draft November 19, 2024 00:00
@scdhulipala scdhulipala closed this Dec 3, 2024
@scdhulipala scdhulipala deleted the dsc/psy2pras_cleanup branch December 3, 2024 00:20
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.

2 participants