Skip to content

Commit

Permalink
Merge pull request #110 from PyPSA/sort_components
Browse files Browse the repository at this point in the history
Set sort to True for component concatenation
  • Loading branch information
FabianHofmann committed Dec 18, 2019
2 parents 80f82bc + 6be63c1 commit 1e8f380
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypsa/components.py
Expand Up @@ -784,16 +784,16 @@ def __getitem__(self, key):
#presence of links without s_nom_extendable
def branches(self):
return pd.concat((self.df(c) for c in self.branch_components),
keys=self.branch_components, sort=False,
keys=self.branch_components, sort=True,
names=['component', 'name'])

def passive_branches(self):
return pd.concat((self.df(c) for c in self.passive_branch_components),
keys=self.passive_branch_components, sort=False)
keys=self.passive_branch_components, sort=True)

def controllable_branches(self):
return pd.concat((self.df(c) for c in self.controllable_branch_components),
keys=self.controllable_branch_components, sort=False)
keys=self.controllable_branch_components, sort=True)

def determine_network_topology(self):
"""
Expand Down

0 comments on commit 1e8f380

Please sign in to comment.