annular.market.tulipa.run_model

Attributes

logger

Functions

run_julia_subprocess(→ None)

Run Julia subprocess with Tulipa configuration.

run_market_model(→ tuple[numpy.ndarray, numpy.ndarray])

Create the central market clearing model.

Module Contents

annular.market.tulipa.run_model.logger[source]
annular.market.tulipa.run_model.run_julia_subprocess(tulipa_config: annular.market.tulipa.config._TulipaConfig) None[source]

Run Julia subprocess with Tulipa configuration.

Parameters:

tulipa_config_TulipaConfig instance with paths and settings.

Raises:

RuntimeError – If Julia subprocess fails with non-zero exit code.

annular.market.tulipa.run_model.run_market_model(bids: pandas.DataFrame, timeseries_data: pandas.DataFrame, snapshots: pandas.DatetimeIndex, bidding_window: pandas.DatetimeIndex, output_path: pathlib.Path, iteration_id: int, config: dict) tuple[numpy.ndarray, numpy.ndarray][source]

Create the central market clearing model.

Parameters:
  • bids – MultiIndex DataFrame of bids for all satellites.

  • timeseries_data – DataFrame with timeseries_data for entire simulation time.

  • snapshots – Optimization window of the market model.

  • bidding_window – Bidding window that matters for bids.

  • output_path – Path to store the database file with the solved TulipaEnergyModel. The file is named tulipa_iteration-ID.duckdb where ID is the iteration ID (starting at 0).

  • iteration_id – Identifier of the iteration number. Used internally to manage folder names.

  • config – config dict

Returns:

market clearing price and quantities allocated by the market.

Return type:

tuple

Raises:
  • ValueError – If Tulipa configuration is incomplete.

  • RuntimeError

    • if Tulipa cofiguration caused other problems

    • if the optimization problem is infeasible or unbounded