annular.satellite_model.reading_bids_strategy

Classes

ReadingBidsStrategy

Bidding strategy that reads bids from a CSV file.

Module Contents

class annular.satellite_model.reading_bids_strategy.ReadingBidsStrategy(bids_csv_path: pathlib.Path | str, **kwargs)[source]

Bases: 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

Parameters:
  • bids_csv_path – Path to the CSV file containing the bids.

  • rolling_horizon_step – How many snapshots to advance at every iteration, ie, for how many snapshots bids need to be made.

  • **kwargs – Additional keyword arguments, which are currently ignored.

bids[source]
timestamps[source]
LAST_TIMESTAMP[source]
increment[source]
num_cycles = 0[source]
cycle_length[source]
determine_bids() pandas.DataFrame[source]

Returns the bids from next timestamp.

meet_demand(market_price: numpy.ndarray | None, demand_met: numpy.ndarray | None) None[source]

No model for processing the demand_met, but forwards internal current timestep by 24 hours.

_get_horizon() pandas.Index[source]

Select the relevant horizon index values at the current timestep.

Returns:

Pandas Index object of the selected horizon values.

_reset_cycle() None[source]

Starting a new cycle.

adjust_timestamps(bids_table: pandas.DataFrame) pandas.DataFrame[source]

Adjusts the timestamps in the bids table based on the current cycle.

Parameters:

bids_table – DataFrame containing the bids with timestamps to adjust.

Returns:

DataFrame containing the bids with adjusted timestamps.

static read_multi_index_csv_with_utc_timestamps(bids_csv_path) pandas.DataFrame[source]

Reads a multi-index CSV file with UTC timestamps.