PyPSA icon indicating copy to clipboard operation
PyPSA copied to clipboard

Error in adding new generators

Open eeliubin opened this issue 7 months ago • 1 comments

Location

https://pypsa.readthedocs.io/en/latest/examples/scigrid-redispatch.html

Documentation problem

In this tutorial, the following command will not change p_max_pu for the newly added generators. I changed p_max_pu=up to p_max_pu=up.T.iloc[:,0].tolist() and that works.

n.add("Generator", g_up.index, p_max_pu=up, **g_up.drop("p_max_pu", axis=1))

eeliubin avatar Apr 24 '25 00:04 eeliubin

Thanks for reporting @eeliubin !

This needs to be double checked. I think the index is mismatched, but this should at least give a warning and not just not change any values

lkstrp avatar Apr 24 '25 08:04 lkstrp