diff --git a/app/figures.py b/app/figures.py index c0c2fd8..e516231 100644 --- a/app/figures.py +++ b/app/figures.py @@ -778,6 +778,7 @@ def generate_dsr_commands_fig(df: pd.DataFrame) -> px.line: ) return dsr_commands_fig + @figure("EV Charging Demand") @axes(ylabel="MW", yrange=[-0.5, 4.5]) def generate_ev_demand_fig(df: pd.DataFrame) -> px.line: @@ -797,12 +798,8 @@ def generate_ev_demand_fig(df: pd.DataFrame) -> px.line: "Time", ] ].copy() - figure_data["Planned"] = ( - df["Expected Ev Charging Power"] - ) - figure_data["Actual"] = ( - df["Real Ev Charging Power"] - ) + figure_data["Planned"] = df["Expected Ev Charging Power"] + figure_data["Actual"] = df["Real Ev Charging Power"] ev_demand_fig = px.line( figure_data, x="Time", @@ -818,6 +815,7 @@ def generate_ev_demand_fig(df: pd.DataFrame) -> px.line: ) return ev_demand_fig + def sainte_lague_algorithm(votes: list[int], seats: int) -> list[int]: """Saint-Lague algorithm for proportional representation in voting. diff --git a/app/pages/overview.py b/app/pages/overview.py index 5067635..eb3e73a 100644 --- a/app/pages/overview.py +++ b/app/pages/overview.py @@ -18,9 +18,9 @@ generate_agent_activity_breakdown_fig, generate_balancing_market_fig, generate_dsr_commands_fig, - generate_ev_demand_fig, generate_energy_deficit_fig, generate_ev_charging_breakdown_fig, + generate_ev_demand_fig, generate_intraday_market_sys_fig, generate_map_fig, generate_total_dem_fig, @@ -148,14 +148,24 @@ ) def update_figures( n_intervals: int, -) -> tuple[go.Figure, px.line, px.line, go.Figure, go.Figure, px.line, px.line, go.Figure, go.Figure]: +) -> tuple[ + go.Figure, + px.line, + px.line, + go.Figure, + go.Figure, + px.line, + px.line, + go.Figure, + go.Figure, +]: """Function to update the plots in this page. Args: n_intervals (int): The number of times this page has updated. indexes by 1 every interval. - Returns: # TODO check this + Returns: tuple[px.line, px.line, px.line,