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

method for updating component attributes #788

Open
jessLryan opened this issue Nov 17, 2023 · 2 comments
Open

method for updating component attributes #788

jessLryan opened this issue Nov 17, 2023 · 2 comments

Comments

@jessLryan
Copy link
Contributor

it could be useful to be able to change component attribute values after creating the network. Perhaps also for time-varying attributes. For me this would be useful when merging two networks with duplicate component indices, but I could imagine other use cases.

@alexfias
Copy link

alexfias commented Nov 18, 2023

Hi jessLryan,

I don't understand the issue Isn't this possible, e.g.
changing the maximum power (P_max) of a generator
n.generators.loc['GeneratorID', 'p_nom_max'] = new_value
or for time-varying attributes
n.generators_t.p_max_pu.loc[:, 'GeneratorID'] = new_time_series

@jessLryan
Copy link
Contributor Author

jessLryan commented Nov 18, 2023

@alexfias thanks for the comment. I don't think it will be complex, I'm just suggesting (and working on) a method that hopefully makes it easier. Any method that we write is also possible by writing out the code directly, otherwise it wouldn't be possible to write the method. Also if, for instance, a bus name is changed then this new name should be propagated elsewhere in the dataframes (that was my original incentive for writing this method).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants