import pypsaimport pandas as pdn = pypsa.Network()n.add("Bus", "Bus 0")n.add("Bus", "Bus 1")n.add("Bus", "Bus 2")n.add("Line","Line 01", bus0 = "Bus 0", bus1 = "Bus 1", x=0.1, s_nom=50)n.add("Line","Line 12", bus0 = "Bus 1", bus1 = "Bus 2", x=0.1, s_nom=50)n.add("Generator", "Gen 3",bus=f"Bus 2",p_nom=100,marginal_cost=10,control = 'Slack',)n.add("Load", "Load 1",bus="Bus 1",p_set=50,)
n.determine_network_topology()sn = n.sub_networks.obj['0']
sn.slack_bus
Bus | Bus 0 | Bus 1 | Bus 2 | |
---|---|---|---|---|
type | name | |||
Line | Line 01 | 0.0 | 1.0 | 0.0 |
Line 12 | 0.0 | 1.0 | 1.0 |
Hey Tom,
this indeed looks a bit suspicious. Would you be so kind and post
this as an issue on Github?
Best wishes
Fabian Hofmann
--
You received this message because you are subscribed to the Google Groups "pypsa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pypsa+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pypsa/CAOGMRcZ9s696LxzbSGKtOGsLxCGuGEUfutwSR13jSkbEAgf8mg%40mail.gmail.com.
-- Fabian Hofmann Postdoctoral Researcher Institute of Energy Technology Technische Universität Berlin http://fabianhofmann.org/ Group website: https://www.tu.berlin/ensys
n.determine_network_topology()sn = n.sub_networks.obj['0']
sn.calculate_PTDF()sn.branches()pd.DataFrame(sn.PTDF, index = sn.branches_i(), columns = sn.buses_o)
To view this discussion on the web, visit https://groups.google.com/d/msgid/pypsa/e2b3821d-c72c-4ded-b271-7c796bf11c6b%40gmail.com.