annular.satellite_model.reading_bids_strategy ============================================= .. py:module:: annular.satellite_model.reading_bids_strategy Classes ------- .. autoapisummary:: annular.satellite_model.reading_bids_strategy.ReadingBidsStrategy Module Contents --------------- .. py:class:: ReadingBidsStrategy(bids_csv_path: pathlib.Path | str, **kwargs) Bases: :py:obj:`annular.satellite_model.satellite_model.SatelliteModel` Bidding strategy that reads bids from a CSV file. This strategy loads bids from a CSV file once during initialization. When its `determine_bids` method is called, it identifies the next set of timestamps to provide bids for, shifting by `rolling_horizon_step` timestamps every iteration. It then reads bids for this set of timestamps from the loaded bids. When it reaches the end of the data, it cycles back to the beginning and starts serving the same bids again, but with the timestamps adjusted forward by however many time increments have passed. The data in the CSV does not need to span a perfect multiple of e.g. 24 hours. If the data ends at a shorter time (e.g., 11:00:00), the strategy will only serve the available bids and then reset to the beginning for the next cycle. The strategy expects the CSV file to have the following columns: +--------------------+------------------+-----------+----------+-------+ | exclusive_group_id | profile_block_id | timestamp | quantity | price | +--------------------+------------------+-----------+----------+-------+ | ... | ... | ... | ... | ... | +--------------------+------------------+-----------+----------+-------+ :param bids_csv_path: Path to the CSV file containing the bids. :param rolling_horizon_step: How many snapshots to advance at every iteration, ie, for how many snapshots bids need to be made. :param \*\*kwargs: Additional keyword arguments, which are currently ignored. .. py:attribute:: bids .. py:attribute:: timestamps .. py:attribute:: LAST_TIMESTAMP .. py:attribute:: increment .. py:attribute:: num_cycles :value: 0 .. py:attribute:: cycle_length .. py:method:: determine_bids() -> pandas.DataFrame Returns the bids from next timestamp. .. py:method:: meet_demand(market_price: numpy.ndarray | None, demand_met: numpy.ndarray | None) -> None No model for processing the demand_met, but forwards internal current timestep by 24 hours. .. py:method:: _get_horizon() -> pandas.Index Select the relevant horizon index values at the current timestep. :returns: Pandas Index object of the selected horizon values. .. py:method:: _reset_cycle() -> None Starting a new cycle. .. py:method:: adjust_timestamps(bids_table: pandas.DataFrame) -> pandas.DataFrame Adjusts the timestamps in the bids table based on the current cycle. :param bids_table: DataFrame containing the bids with timestamps to adjust. :returns: DataFrame containing the bids with adjusted timestamps. .. py:method:: read_multi_index_csv_with_utc_timestamps(bids_csv_path) -> pandas.DataFrame :staticmethod: Reads a multi-index CSV file with UTC timestamps.