PyPSA
PyPSA copied to clipboard
Error in adding new generators
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))
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