Skip to content

Commit

Permalink
commented out plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Manish-Khanra committed Nov 27, 2024
1 parent dead787 commit d448285
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions assume/strategies/naive_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later


import matplotlib.pyplot as plt
# import matplotlib.pyplot as plt

from assume.common.base import BaseStrategy, SupportsMinMax
from assume.common.market_objects import MarketConfig, Order, Orderbook, Product
Expand Down Expand Up @@ -155,7 +155,7 @@ def calculate_bids(
) -> Orderbook:
# calculate the optimal operation of the unit
unit.determine_optimal_operation_with_flex()
self.plot_power_requirements(unit)
# self.plot_power_requirements(unit)

bids = []
for product in product_tuples:
Expand All @@ -181,40 +181,40 @@ def calculate_bids(

return bids

def plot_power_requirements(self, unit: SupportsMinMax):
"""
Plots the optimal power requirement and flexibility power requirement for comparison.
Args:
unit (SupportsMinMax): The unit containing power requirements.
"""
# Retrieve power requirements data
opt_power_requirement = unit.opt_power_requirement
flex_power_requirement = unit.flex_power_requirement

# Plotting
plt.figure(figsize=(10, 6))
plt.plot(
opt_power_requirement.index,
opt_power_requirement,
label="Optimal Power Requirement",
color="blue",
)
plt.plot(
flex_power_requirement.index,
flex_power_requirement,
label="Flex Power Requirement",
color="orange",
linestyle="--",
)

# Labels and title
plt.xlabel("Time")
plt.ylabel("Power Requirement (kW)")
plt.title("Comparison of Optimal and Flexible Power Requirements")
plt.legend()
plt.grid(True)
plt.show()
# def plot_power_requirements(self, unit: SupportsMinMax):
# """
# Plots the optimal power requirement and flexibility power requirement for comparison.

# Args:
# unit (SupportsMinMax): The unit containing power requirements.
# """
# # Retrieve power requirements data
# opt_power_requirement = unit.opt_power_requirement
# flex_power_requirement = unit.flex_power_requirement

# # Plotting
# plt.figure(figsize=(10, 6))
# plt.plot(
# opt_power_requirement.index,
# opt_power_requirement,
# label="Optimal Power Requirement",
# color="blue",
# )
# plt.plot(
# flex_power_requirement.index,
# flex_power_requirement,
# label="Flex Power Requirement",
# color="orange",
# linestyle="--",
# )

# # Labels and title
# plt.xlabel("Time")
# plt.ylabel("Power Requirement (kW)")
# plt.title("Comparison of Optimal and Flexible Power Requirements")
# plt.legend()
# plt.grid(True)
# plt.show()


class NaiveRedispatchSteelplantStrategy(BaseStrategy):
Expand Down

0 comments on commit d448285

Please sign in to comment.