diff --git a/README.md b/README.md index ea2cea15..362feed0 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,6 @@ ASSUME is funded by the Federal Ministry for Economic Affairs and Climate Action ## License -Copyright 2022-2023 [ASSUME developers](https://assume.readthedocs.io/en/latest/developers.html). +Copyright 2022-2024 [ASSUME developers](https://assume.readthedocs.io/en/latest/developers.html). ASSUME is licensed under the [GNU Affero General Public License v3.0](./LICENSES/AGPL-3.0-or-later.txt). This license is a strong copyleft license that requires that any derivative work be licensed under the same terms as the original work. It is approved by the [Open Source Initiative](https://opensource.org/licenses/AGPL-3.0). diff --git a/assume/common/base.py b/assume/common/base.py index 8c33d2cb..8be41583 100644 --- a/assume/common/base.py +++ b/assume/common/base.py @@ -4,7 +4,7 @@ from collections import defaultdict from datetime import datetime, timedelta -from typing import Dict, List, Tuple, TypedDict, Union +from typing import TypedDict, Union import pandas as pd @@ -20,7 +20,7 @@ class BaseUnit: """ A base class for a unit. This class is used as a foundation for all units. - Attributes: + Parameters: id (str): The ID of the unit. unit_operator (str): The operator of the unit. technology (str): The technology of the unit. @@ -79,14 +79,14 @@ def __init__( def calculate_bids( self, market_config: MarketConfig, - product_tuples: List[Tuple], + product_tuples: list[tuple], ) -> Orderbook: """ Calculates the bids for the next time step. Args: market_config (MarketConfig): The market configuration. - product_tuples (List[Tuple]): The product tuples. + product_tuples (list[tuple]): The product tuples. Returns: Orderbook: The bids. @@ -173,8 +173,8 @@ def calculate_generation_cost( Calculates the generation cost for a specific product type within the given time range. Args: - start (datetime): The start time for the calculation. - end (datetime): The end time for the calculation. + start (datetime.datetime): The start time for the calculation. + end (datetime.datetime): The end time for the calculation. product_type (str): The type of product for which the generation cost is to be calculated. """ @@ -225,7 +225,7 @@ def get_output_before(self, dt: datetime, product_type: str = "energy") -> float else: return self.outputs[product_type].at[dt - self.index.freq] - def as_dict(self) -> Dict[str, Union[str, int]]: + def as_dict(self) -> dict[str, Union[str, int]]: """ Returns a dictionary representation of the unit. @@ -301,7 +301,7 @@ class SupportsMinMax(BaseUnit): Base class used for units supporting continuous dispatch and without energy storage. This class is best to be used as foundation for classes of power plants and similar units. - Attributes: + Parameters: min_power (float): The minimum power output of the unit. max_power (float): The maximum power output of the unit. ramp_down (float): How much power can be decreased in one time step. @@ -406,7 +406,7 @@ def get_operation_time(self, start: datetime) -> int: Returns the time the unit is operating (positive) or shut down (negative). Args: - start (datetime): The start time. + start (datetime.datetime): The start time. Returns: int: The operation time. @@ -433,7 +433,7 @@ def get_average_operation_times(self, start: datetime) -> tuple[float, float]: Calculates the average uninterrupted operation and down time. Args: - start (datetime): The current time. + start (datetime.datetime): The current time. Returns: tuple[float, float]: Tuple of the average operation time avg_op_time and average down time avg_down_time. @@ -511,7 +511,7 @@ class SupportsMinMaxCharge(BaseUnit): """ Base Class used for units with energy storage. - Attributes: + Parameters: initial_soc (float): The initial state of charge of the storage. min_power_charge (float): How much power must be charged at least in one time step. max_power_charge (float): How much power can be charged at most in one time step. @@ -544,7 +544,7 @@ class SupportsMinMaxCharge(BaseUnit): def calculate_min_max_charge( self, start: pd.Timestamp, end: pd.Timestamp, product_type="energy" - ) -> Tuple[pd.Series, pd.Series]: + ) -> tuple[pd.Series, pd.Series]: """ Calculates the min and max charging power for the given time period. @@ -554,7 +554,7 @@ def calculate_min_max_charge( product_type (str, optional): The product type of the unit. Defaults to "energy". Returns: - Tuple[pd.Series, pd.Series]: The min and max charging power for the given time period. + tuple[pd.Series, pd.Series]: The min and max charging power for the given time period. """ pass @@ -581,7 +581,7 @@ def get_soc_before(self, dt: datetime) -> float: The SoC is a float between 0 and 1. Args: - dt (datetime): The current datetime. + dt (datetime.datetime): The current datetime. Returns: float: The SoC before the given datetime. @@ -708,7 +708,7 @@ def calculate_bids( self, unit: BaseUnit, market_config: MarketConfig, - product_tuples: List[Product], + product_tuples: list[Product], **kwargs, ) -> Orderbook: """ @@ -717,7 +717,7 @@ def calculate_bids( Args: unit (BaseUnit): The unit. market_config (MarketConfig): The market configuration. - product_tuples (List[Product]): The product tuples. + product_tuples (list[Product]): The product tuples. Returns: Orderbook: The bids. @@ -744,7 +744,7 @@ class LearningStrategy(BaseStrategy): """ A strategy which provides learning functionality, has a method to calculate the reward. - Attributes: + Parameters: obs_dim (int): The observation dimension. act_dim (int): The action dimension. @@ -769,7 +769,7 @@ class LearningConfig(TypedDict): """ A class for the learning configuration. - Attributes: + Parameters: observation_dimension (int): The observation dimension. action_dimension (int): The action dimension. continue_learning (bool): Whether to continue learning. diff --git a/assume/common/forecasts.py b/assume/common/forecasts.py index c5f8bbaa..d3e7ca6d 100644 --- a/assume/common/forecasts.py +++ b/assume/common/forecasts.py @@ -15,7 +15,7 @@ class Forecaster: to retrieve forecasts for specific columns, availability of units, and prices of fuel types, returning the corresponding timeseries as pandas Series. - Attributes: + Parameters: index (pd.Series): The index of the forecasts. Args: @@ -90,7 +90,7 @@ class CsvForecaster(Forecaster): It initializes with the provided index. It includes methods to retrieve forecasts for specific columns, availability of units, and prices of fuel types, returning the corresponding timeseries as pandas Series. - Attributes: + Parameters: index (pd.Series): The index of the forecasts. powerplants (dict[str, pd.Series]): The power plants. @@ -365,7 +365,7 @@ class RandomForecaster(CsvForecaster): from the `CsvForecaster` class and initializes with the provided index, power plants, and standard deviation of the noise. - Attributes: + Parameters: index (pd.Series): The index of the forecasts. powerplants (dict[str, pd.Series]): The power plants. sigma (float): The standard deviation of the noise. @@ -425,7 +425,7 @@ class NaiveForecast(Forecaster): provided index. If the optional parameters are lists, they are converted to pandas Series with the provided index and the corresponding values. - Attributes: + Parameters: index (pd.Series): The index of the forecasts. availability (float | list, optional): The availability of the power plants. fuel_price (float | list, optional): The fuel price. diff --git a/assume/common/market_objects.py b/assume/common/market_objects.py index 7cbd9323..8cc060e7 100644 --- a/assume/common/market_objects.py +++ b/assume/common/market_objects.py @@ -30,8 +30,8 @@ class Order(TypedDict): Args: bid_id (str): the id of the bid - start_time (datetime): the start time of the order - end_time (datetime): the end time of the order + start_time (datetime.datetime): the start time of the order + end_time (datetime.datetime): the end time of the order volume (Number | dict[datetime, Number]): the volume of the order (positive if generation) accepted_volume (Number | dict[datetime, Number]): the accepted volume of the order price (Number): the price of the order @@ -82,8 +82,8 @@ class Product(NamedTuple): An actual product with start and end. Args: - start (datetime): the start time of the product - end (datetime): the end time of the product + start (datetime.datetime): the start time of the product + end (datetime.datetime): the end time of the product only_hours (OnlyHours | None): tuple of hours from which this order is available, on multi day products """ @@ -230,8 +230,8 @@ class DataRequestMessage(TypedDict): context (str): the context of the message market_id (str): the id of the market metric (str): the specific metric being requested - start_time (datetime): the start time of the data request - end_time (datetime): the end time of the data request + start_time (datetime.datetime): the start time of the data request + end_time (datetime.datetime): the end time of the data request """ context: str diff --git a/assume/common/outputs.py b/assume/common/outputs.py index 83f04852..2bb76b65 100644 --- a/assume/common/outputs.py +++ b/assume/common/outputs.py @@ -28,8 +28,8 @@ class WriteOutput(Role): Args: simulation_id (str): The ID of the simulation as a unique classifier. - start (datetime): The start datetime of the simulation run. - end (datetime): The end datetime of the simulation run. + start (datetime.datetime): The start datetime of the simulation run. + end (datetime.datetime): The end datetime of the simulation run. db_engine: The database engine. Defaults to None. export_csv_path (str, optional): The path for exporting CSV files, no path results in not writing the csv. Defaults to "". save_frequency_hours (int): The frequency in hours for storing data in the db and/or csv files. Defaults to None. diff --git a/assume/common/units_operator.py b/assume/common/units_operator.py index 73567c0b..f33337f7 100644 --- a/assume/common/units_operator.py +++ b/assume/common/units_operator.py @@ -34,7 +34,7 @@ class UnitsOperator(Role): The UnitsOperator is the agent that manages the units. It receives the opening hours of the market and sends back the bids for the market. - Attributes: + Parameters: available_markets (list[MarketConfig]): The available markets. registered_markets (dict[str, MarketConfig]): The registered markets. last_sent_dispatch (int): The last sent dispatch. diff --git a/assume/markets/base_market.py b/assume/markets/base_market.py index 8a741b36..fde3de90 100644 --- a/assume/markets/base_market.py +++ b/assume/markets/base_market.py @@ -36,7 +36,7 @@ class MarketMechanism: The MarketMechanism is embedded into the general MarketRole, which takes care of simulation concerns. In the Marketmechanism, all data needed for the clearing is present. - Attributes: + Parameters: all_orders (Orderbook): The list of all orders. marketconfig (MarketConfig): The configuration of the market. open_auctions (list[dict]): The list of open auctions. @@ -154,7 +154,7 @@ class MarketRole(MarketMechanism, Role): This is the base class for all market roles. It implements the basic functionality of a market role, such as registering agents, clearing the market and sending the results to the database agent. - Attributes: + Parameters: longitude (float): The longitude of the market. latitude (float): The latitude of the market. marketconfig (MarketConfig): The configuration of the market. diff --git a/assume/markets/clearing_algorithms/complex_clearing.py b/assume/markets/clearing_algorithms/complex_clearing.py index 532f3672..b73a4e5b 100644 --- a/assume/markets/clearing_algorithms/complex_clearing.py +++ b/assume/markets/clearing_algorithms/complex_clearing.py @@ -2,7 +2,6 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -import cProfile import logging from datetime import timedelta from operator import itemgetter @@ -201,7 +200,7 @@ class ComplexClearingRole(MarketRole): The complex market is a pay-as-clear market with more complex bid structures, including minimum acceptance ratios, bid types, and profiled volumes. - Attributes: + Parameters: marketconfig (MarketConfig): The market configuration. Args: diff --git a/assume/reinforcement_learning/learning_role.py b/assume/reinforcement_learning/learning_role.py index dc260c78..8a3f7948 100644 --- a/assume/reinforcement_learning/learning_role.py +++ b/assume/reinforcement_learning/learning_role.py @@ -26,8 +26,8 @@ class Learning(Role): the provided learning configuration. Args: - simulation_start (datetime): The start of the simulation. - simulation_end (datetime): The end of the simulation. + simulation_start (datetime.datetime): The start of the simulation. + simulation_end (datetime.datetime): The end of the simulation. learning_config (LearningConfig): The configuration for the learning process. """ diff --git a/assume/scenario/loader_amiris.py b/assume/scenario/loader_amiris.py index 2044d38e..ec059c29 100644 --- a/assume/scenario/loader_amiris.py +++ b/assume/scenario/loader_amiris.py @@ -3,17 +3,14 @@ # SPDX-License-Identifier: AGPL-3.0-or-later import logging -from datetime import datetime, timedelta +from datetime import timedelta import dateutil.rrule as rr -import numpy as np import pandas as pd import yaml -from tqdm import tqdm from yamlinclude import YamlIncludeConstructor -from assume.common.base import LearningConfig -from assume.common.forecasts import CsvForecaster, Forecaster, NaiveForecast +from assume.common.forecasts import NaiveForecast from assume.common.market_objects import MarketConfig, MarketProduct from assume.world import World diff --git a/assume/scenario/loader_csv.py b/assume/scenario/loader_csv.py index 1c096699..63ee5630 100644 --- a/assume/scenario/loader_csv.py +++ b/assume/scenario/loader_csv.py @@ -141,8 +141,8 @@ def make_market_config( Args: id (str): The id of the market. market_params (dict): The market parameters. - world_start (datetime): The start time of the world. - world_end (datetime): The end time of the world. + world_start (datetime.datetime): The start time of the world. + world_end (datetime.datetime): The end time of the world. Returns: MarketConfig: The market config. diff --git a/assume/scenario/oeds/infrastructure.py b/assume/scenario/oeds/infrastructure.py index c5f54204..6495b1eb 100644 --- a/assume/scenario/oeds/infrastructure.py +++ b/assume/scenario/oeds/infrastructure.py @@ -14,7 +14,7 @@ from sqlalchemy import create_engine from tqdm import tqdm -# !pip install git+https://github.com/maurerle/windpowerlib@maurerle +# !pip install git+https://github.com/wind-python/windpowerlib@dev from windpowerlib import ModelChain, WindTurbine from assume.scenario.oeds.static import ( diff --git a/assume/strategies/advanced_orders.py b/assume/strategies/advanced_orders.py index 0511c4c3..77b9d057 100644 --- a/assume/strategies/advanced_orders.py +++ b/assume/strategies/advanced_orders.py @@ -2,8 +2,6 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -from datetime import datetime, timedelta - import pandas as pd from assume.common.base import BaseStrategy, SupportsMinMax @@ -19,7 +17,7 @@ class flexableEOMBlock(BaseStrategy): """ A strategy that bids on the EOM-market with block bids. - Attributes: + Parameters: foresight (pd.Timedelta): The foresight for the EOM-market. Args: diff --git a/assume/strategies/dmas_powerplant.py b/assume/strategies/dmas_powerplant.py index b270c6ea..0609fe80 100644 --- a/assume/strategies/dmas_powerplant.py +++ b/assume/strategies/dmas_powerplant.py @@ -439,7 +439,7 @@ def optimize_result( power_prices: np.array, ) -> np.array: """ - calculates the result with prices *2 + calculates the result with prices times 2 to optimize according to the result in the best way possible :param unit: unit to optimize diff --git a/assume/strategies/extended.py b/assume/strategies/extended.py index ae4a679c..d2a9eba4 100644 --- a/assume/strategies/extended.py +++ b/assume/strategies/extended.py @@ -92,7 +92,7 @@ def calculate_bids( Args: unit (SupportsMinMax): Unit to dispatch. market_config (MarketConfig): Market configuration. - product_tuples (List[Product]): List of products to dispatch. + product_tuples (list[Product]): List of products to dispatch. **kwargs (dict): Additional arguments. Returns: diff --git a/assume/strategies/flexable.py b/assume/strategies/flexable.py index 08f68115..4d4abb88 100644 --- a/assume/strategies/flexable.py +++ b/assume/strategies/flexable.py @@ -15,8 +15,8 @@ class flexableEOM(BaseStrategy): """ A strategy that bids on the EOM-market. - Attributes: - foresight (timedelta): The foresight of the unit. + Parameters: + foresight (datetime.timedelta): The foresight of the unit. Args: *args: Variable length argument list. @@ -182,8 +182,8 @@ class flexablePosCRM(BaseStrategy): """ A strategy that bids the energy_price or the capacity_price of the unit on the CRM (reserve market). - Attributes: - foresight (timedelta): The foresight of the unit. + Parameters: + foresight (datetime.timedelta): The foresight of the unit. Args: *args: Variable length argument list. @@ -287,8 +287,8 @@ class flexableNegCRM(BaseStrategy): """ A strategy that bids the energy_price or the capacity_price of the unit on the negative CRM(reserve market). - Attributes: - foresight (timedelta): The foresight of the unit. + Parameters: + foresight (datetime.timedelta): The foresight of the unit. Args: *args: Variable length argument list. @@ -450,10 +450,10 @@ def calculate_EOM_price_if_on( Args: unit (SupportsMinMax): A unit that the unit operator manages. - start (datetime): The start time of the product. + start (datetime.datetime): The start time of the product. marginal_cost_flex (float): The marginal cost of the unit. bid_quantity_inflex (float): The bid quantity of the unit. - foresight (timedelta): The foresight of the unit. + foresight (datetime.timedelta): The foresight of the unit. avg_down_time (int): The average down time of the unit. Returns: @@ -507,8 +507,8 @@ def get_specific_revenue( Args: unit (SupportsMinMax): A unit that the unit operator manages. marginal_cost (float): The marginal cost of the unit. - t (datetime): The start time of the product. - foresight (timedelta): The foresight of the unit. + t (datetime.datetime): The start time of the product. + foresight (datetime.timedelta): The foresight of the unit. Returns: float: The specific revenue of the unit. diff --git a/assume/strategies/flexable_storage.py b/assume/strategies/flexable_storage.py index 5d35202e..1d26faf8 100644 --- a/assume/strategies/flexable_storage.py +++ b/assume/strategies/flexable_storage.py @@ -20,7 +20,7 @@ class flexableEOMStorage(BaseStrategy): The price is then set as the average price divided by the discharge efficiency of the unit. Otherwise, the unit will charge with the price defined as the average price multiplied by the charge efficiency of the unit. - Attributes: + Parameters: foresight (pd.Timedelta): Foresight for the average price calculation. Args: @@ -216,7 +216,7 @@ class flexablePosCRMStorage(BaseStrategy): The strategy bids the energy_price for the energy_pos product if the specific revenue is positive. Otherwise, the strategy bids the capacity_price for the capacity_pos product. - Attributes: + Parameters: foresight (pd.Timedelta): Foresight for the average price calculation. Args: @@ -354,7 +354,7 @@ class flexableNegCRMStorage(BaseStrategy): """ A strategy that bids the energy_price or the capacity_price of the unit on the negative CRM(reserve market). - Attributes: + Parameters: foresight (pd.Timedelta): Foresight for the average price calculation. Args: diff --git a/assume/strategies/learning_advanced_orders.py b/assume/strategies/learning_advanced_orders.py index 963c84d6..c689a01b 100644 --- a/assume/strategies/learning_advanced_orders.py +++ b/assume/strategies/learning_advanced_orders.py @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -from datetime import datetime, timedelta +from datetime import datetime from pathlib import Path import numpy as np @@ -19,7 +19,7 @@ class RLAdvancedOrderStrategy(LearningStrategy): """ Reinforcement Learning Strategy for an Energy-Only-Market with simple hourly, block and linked orders. - Attributes: + Parameters: foresight (int): Number of time steps to look ahead. Default 24. max_bid_price (float): The maximum bid price. max_demand (float): The maximum demand. @@ -328,17 +328,17 @@ def create_observation( Args: unit (SupportsMinMax): Unit to create observation for - start (datetime): Start time - end (datetime): End time + start (datetime.datetime): Start time + end (datetime.datetime): End time Returns: Observation (torch.Tensor): Observation containing residual load forecast, price forecast, must run time, max power and marginal cost Note: The dimension of the observation space is defined by - 2 * product_len (int): number of hours in the clearing horizon - + 2 * (foresight-1) (int): number of hours we look ahead - + 3 (int): must run time, max power and marginal cost + 2 * product_len (int): number of hours in the clearing horizon + + 2 * (foresight-1) (int): number of hours we look ahead + + 3 (int): must run time, max power and marginal cost The observation space is scaled to the range [-1,1] to make it easier for the actor neuronal net to learn. The scaling factors are defined by the maximum residual load, the maximum bid price and the maximum capacity of the unit. diff --git a/assume/strategies/learning_strategies.py b/assume/strategies/learning_strategies.py index 45b608ed..47b983c7 100644 --- a/assume/strategies/learning_strategies.py +++ b/assume/strategies/learning_strategies.py @@ -24,7 +24,7 @@ class RLStrategy(LearningStrategy): The agent submittes two price bids - one for the infelxible (P_min) and one for the flexible part (P_max-P_min) of ist capacity. - Attributes: + Parameters: foresight (int): Number of time steps to look ahead. Defaults to 24. max_bid_price (float): Maximum bid price. Defaults to 100. max_demand (float): Maximum demand. Defaults to 10e3. @@ -245,8 +245,8 @@ def create_observation( Args: unit (SupportsMinMax): Unit to create observation for. - start (datetime): Start time. - end (datetime): End time. + start (datetime.datetime): Start time. + end (datetime.datetime): End time. Returns: Observation (torch.Tensor): Observation. diff --git a/assume/units/demand.py b/assume/units/demand.py index 0ddef101..d2c0cc8d 100644 --- a/assume/units/demand.py +++ b/assume/units/demand.py @@ -13,7 +13,7 @@ class Demand(SupportsMinMax): """ A demand unit. - Attributes: + Parameters: id (str): The unique identifier of the unit. index (pd.DatetimeIndex): The index of the unit. max_power (float): The maximum power output capacity of the power plant in MW. diff --git a/assume/units/powerplant.py b/assume/units/powerplant.py index 5144f43f..ed887743 100644 --- a/assume/units/powerplant.py +++ b/assume/units/powerplant.py @@ -19,7 +19,7 @@ class PowerPlant(SupportsMinMax): """ A class for a powerplant unit. - Attributes: + Parameters: id (str): The ID of the unit. unit_operator (str): The operator of the unit. technology (str): The technology of the unit. @@ -383,7 +383,7 @@ def calculate_marginal_cost(self, start: datetime, power: float): Returns the marginal cost of the unit. Args: - start (datetime): The start time of the dispatch. + start (datetime.datetime): The start time of the dispatch. power (float): The power output of the unit. Returns: diff --git a/assume/units/storage.py b/assume/units/storage.py index c0c95c87..487bdeb6 100644 --- a/assume/units/storage.py +++ b/assume/units/storage.py @@ -18,7 +18,7 @@ class Storage(SupportsMinMaxCharge): """ A class for a storage unit. - Attributes: + Parameters: max_power_charge (float): The maximum power input of the storage unit in MW (negative value). min_power_charge (float): The minimum power input of the storage unit in MW (negative value). max_power_discharge (float): The maximum power output of the storage unit in MW. @@ -263,7 +263,7 @@ def calculate_marginal_cost( Returns the marginal cost of the unit. Args: - start (datetime): The start time of the dispatch. + start (datetime.datetime): The start time of the dispatch. power (float): The power output of the unit. Returns: diff --git a/assume/world.py b/assume/world.py index 29c3d900..a76725cc 100644 --- a/assume/world.py +++ b/assume/world.py @@ -51,7 +51,7 @@ class World: markets, unit operators, unit types, bidding strategies, and clearing mechanisms. If available, it imports learning strategies and handles any potential import errors. Finally, it sets up the event loop for asynchronous operations. - Attributes: + Parameters: logger (logging.Logger): The logger for the world instance. addr (Union[Tuple[str, int], str]): The address of the world, represented as a tuple of string and int or a string. container (Optional[Container]): The container for the world instance. @@ -67,8 +67,8 @@ class World: addresses (list[str]): The addresses for the world instance. loop (asyncio.AbstractEventLoop): The event loop for the world instance. clock (ExternalClock): The external clock for the world instance. - start (datetime): The start datetime for the simulation. - end (datetime): The end datetime for the simulation. + start (datetime.datetime): The start datetime for the simulation. + end (datetime.datetime): The end datetime for the simulation. learning_config (LearningConfig): The configuration for the learning process. evaluation_mode (bool): A boolean indicating whether the evaluation mode is enabled. forecaster (Optional[Forecaster]): The forecaster used for custom unit types. @@ -171,8 +171,8 @@ async def setup( Set up the environment for the simulation, initializing various parameters and components required for the simulation run. Args: - start (datetime): The start datetime for the simulation. - end (datetime): The end datetime for the simulation. + start (datetime.datetime): The start datetime for the simulation. + end (datetime.datetime): The end datetime for the simulation. simulation_id (str): The unique identifier for the simulation. index (pd.Series): The index for the simulation. save_frequency_hours (int, optional): The frequency (in hours) at which to save simulation data. Defaults to 24. diff --git a/cli.py b/cli.py index 0022affb..e837f926 100644 --- a/cli.py +++ b/cli.py @@ -9,12 +9,13 @@ import logging import os import sys +import warnings from pathlib import Path import argcomplete import yaml from sqlalchemy import make_url -import warnings + from assume.common.exceptions import AssumeException os.makedirs("./examples/outputs", exist_ok=True) diff --git a/docs/source/assume.markets.clearing_algorithms.rst b/docs/source/assume.markets.clearing_algorithms.rst index e3cf1501..aa905589 100644 --- a/docs/source/assume.markets.clearing_algorithms.rst +++ b/docs/source/assume.markets.clearing_algorithms.rst @@ -24,6 +24,14 @@ assume.markets.clearing\_algorithms.complex\_clearing module :undoc-members: :show-inheritance: +assume.markets.clearing\_algorithms.complex\_clearing\_dmas module +------------------------------------------------------------------ + +.. automodule:: assume.markets.clearing_algorithms.complex_clearing_dmas + :members: + :undoc-members: + :show-inheritance: + assume.markets.clearing\_algorithms.nodal\_pricing module --------------------------------------------------------- diff --git a/docs/source/assume.strategies.rst b/docs/source/assume.strategies.rst index 0e366b29..101a5181 100644 --- a/docs/source/assume.strategies.rst +++ b/docs/source/assume.strategies.rst @@ -8,6 +8,30 @@ Bidding strategies Submodules ---------- +assume.strategies.advanced\_orders module +----------------------------------------- + +.. automodule:: assume.strategies.advanced_orders + :members: + :undoc-members: + :show-inheritance: + +assume.strategies.dmas\_powerplant module +----------------------------------------- + +.. automodule:: assume.strategies.dmas_powerplant + :members: + :undoc-members: + :show-inheritance: + +assume.strategies.dmas\_storage module +-------------------------------------- + +.. automodule:: assume.strategies.dmas_storage + :members: + :undoc-members: + :show-inheritance: + assume.strategies.extended module --------------------------------- @@ -32,6 +56,14 @@ assume.strategies.flexable\_storage module :undoc-members: :show-inheritance: +assume.strategies.learning\_advanced\_orders module +--------------------------------------------------- + +.. automodule:: assume.strategies.learning_advanced_orders + :members: + :undoc-members: + :show-inheritance: + assume.strategies.learning\_strategies module --------------------------------------------- @@ -48,7 +80,6 @@ assume.strategies.naive\_strategies module :undoc-members: :show-inheritance: - Module contents --------------- diff --git a/docs/source/conf.py b/docs/source/conf.py index 97a50166..6ecfd2cb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -4,14 +4,19 @@ # Configuration file for the Sphinx documentation builder. +import tomllib + +with open("../../pyproject.toml", "rb") as f: + pyproject_toml = tomllib.load(f)["tool"]["poetry"] + # -- Project information project = "ASSUME" -copyright = "2022-2023 ASSUME Developers" -author = "ASSUME Developers" +copyright = "2022-2024 ASSUME Developers" +author = ",".join(pyproject_toml["authors"]) -release = "0.2" -version = "0.2.1" +version = pyproject_toml["version"] +release = version # -- General configuration diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index 0c25d4e5..13bbbb6b 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -187,6 +187,6 @@ multiple systems, where different market participants operate independently both Licence ======= -Copyright 2022-2023 :doc:`developers` +Copyright 2022-2024 :doc:`developers` ASSUME is licensed under the `GNU Affero General Public License v3.0 `_. diff --git a/docs/source/learning_algorithm.rst b/docs/source/learning_algorithm.rst index ff6643e6..ca86d311 100644 --- a/docs/source/learning_algorithm.rst +++ b/docs/source/learning_algorithm.rst @@ -31,7 +31,7 @@ The following table shows the options that can be adjusted and gives a short exp observation_dimension The dimension of the observations given to the actor in the bidding strategy. action_dimension The dimension of the actors made by the actor, which equals the output neurons of the actor neural net. continue_learning Whether to use pre-learned strategies and then continue learning. - trained_policies_save_path Where to store the newly trained rl strategies - only needed when + trained_policies_save_path Where to store the newly trained rl strategies - only needed when learning_mode is set trained_policies_load_path If pre-learned strategies should be used, where are they stored? - only needed when continue_learning max_bid_price The maximum bid price which limits the action of the actor to this price. learning_mode Should we use learning mode at all? If not, the learning bidding strategy is overwritten with a default strategy. diff --git a/pyproject.toml b/pyproject.toml index 719d7fc8..88f90730 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ pytest-cov = {version = "^4.1.0", optional = true} pytest-asyncio = {version = "^0.21.1", optional = true} torch = {version = "^2.0.1", optional = true} glpk = {version = "^0.4.7", optional = true} -windpowerlib = {git = "https://github.com/maurerle/windpowerlib", rev = "maurerle"} +windpowerlib = {version = "^0.2.1", optional = true} pvlib = {version = "^0.10.2", optional = true} holidays = {version = "^0.37", optional = true} demandlib = {version = "^0.1.9", optional = true}