Skip to content

Commit 1e70466

Browse files
committed
Still working in the generation of the demand patterns, still with some
issues Former-commit-id: bc01dcb
1 parent ff9abd4 commit 1e70466

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Demand_patterns/ctown_map.inp

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

Demand_patterns/wntr_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# includesimport pandas as pddef get_demand_patterns_from_nodes(wn, index=0): df_pat = pd.DataFrame(columns = wn.junction_name_list) for name, j in wn.junctions(): try: base = j.demand_timeseries_list[index].base_value pat = j.demand_timeseries_list[index].pattern if pat is not None: df_pat.loc[:,name] = base * pat.multipliers except IndexError: print('Index Error excepted') return df_pat.dropna(axis=1)

0 commit comments

Comments
 (0)