Skip to content

Commit

Permalink
Also update discrete control table.
Browse files Browse the repository at this point in the history
  • Loading branch information
evetion committed Sep 10, 2024
1 parent 5613858 commit f7c95c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ribasim_nl/ribasim_nl/reset_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def reset_index(model: Model, node_start=1):
elif table.df.index.name == "node_id":
table.df.index = table.df.reset_index("node_id")["node_id"].apply(lambda x: index.loc[x])
# table.df.index.name = "node_id"

if "listen_node_id" in table.df.columns:
table.df.loc[:, "listen_node_id"] = table.df["listen_node_id"].apply(lambda x: index[x])

return model


Expand Down

1 comment on commit f7c95c8

@DanielTollenaar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that does it!

Please sign in to comment.