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

Allow single function to build different sized systems #42

Open
ciaranrob opened this issue Apr 12, 2022 · 2 comments
Open

Allow single function to build different sized systems #42

ciaranrob opened this issue Apr 12, 2022 · 2 comments

Comments

@ciaranrob
Copy link

I have a function for taking the system size as an argument and read a different .raw file to build the system. Currently it doesn't work because PowerSystemCaseBuilder is always loading the first system that was generated when I call this function.

@claytonpbarrows
Copy link
Member

claytonpbarrows commented Apr 21, 2022

You can do buiild_system() with force_build = true kwarg. That will force it to run the build process rather than just deserialize the system from json.

But, more fundamentally, I think that we'd usually consider these seperate systems. They can share the same build code with arguments applied from the build_system interface to access the different size. So, you'd end up with several options like:

  • build_system(MySystems, "my_sys_small")
  • build_system(MySystems, "my_sys_big")

but the code that actually builds those systems is shared.

@jd-lara
Copy link
Member

jd-lara commented Apr 22, 2022

@claytonpbarrows I think this will be a valuable way of making systems, particularly for dynamics. We can keep a tag that forces rebuild if the system size doesn't match the kwarg

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

No branches or pull requests

3 participants