MarketModel¶
- class pomato.market_model.MarketModel(wdir, options, data, grid_representation)¶
Class to interface the MarketModel in Julia with the python based Data and Grid models.
This module is initialized empty and only initializes the interactive julia process used to run the market model. Once started the model can be easily re-run with changed options or data. The option file serves as an argument to distinguish possible market model implementations which would be initialized differently.
- Parameters:
- wdirpathlib.Path
Working directory
- optionsdict
The options from POMATO main method persist in the MarketModel.
- Attributes:
- wdirpathlib.Path
Working directory
- optionsdict
The options from POMATO main method persist in the MarketModel.
- data_dirpathlib.Path
Subdirectory of working directory to store the data in.
- julia_model
JuliaDaemon Interactive julia process which is used to run the market model.
- data
DataManagement An instance of the DataManagement class with processed input data.
- grid_representationtypes.SimpleNamespace
Grid representation resulting from of
GridRepresentation. Contains a suitable grid representation based on the chosen options.- statusstr
Attribute indicating the model status: Empty, Solved, Error.
- result_folderslist(pathlib.Path)
List of sub-directories containing the results in case of successful solve. Can be multiples for redispatch calculations or FBMC application.
Methods
run()Run the julia program via command Line.
Initialise or update the underlying data of the market model.
Export input data to csv files in the data_dir sub-directory.
- data_to_csv()¶
Export input data to csv files in the data_dir sub-directory.
Writes all data specified in the model structure attribute of DataManagement to csv. Additionally stores a comprehensive table of plant types, relevant to distinguish between certain generation constraints (storages, res etc.), table of slack zones, the grid representation and the options.
- Parameters:
- model_horizonlist
List of timesteps that are the model horizon
- run()¶
Run the julia program via command Line.
Uses
JuliaDaemonthat is initialized into the julia_model attribute to run the market model. The model run depends on the supplied options. In the case of successful completion, the result folders are stores in the result_folders attribute which will be instantiated asResultsas part of the DataManagement module.
- save_rolling_horizon_storage_levels()¶
Set start/end storage levels for rolling horizon market clearing.
This method alters the storage_level attribute of the
DataManagementinstance, when market model horizon shorter than total model horizon or values within the supplied data does not exactly match the model segments. Default storage levels can be set as part of the options attribute.
- update_data()¶
Initialise or update the underlying data of the market model.
Updates all data used to run the market model: input data, grid representation, options and model horizon by running
data_to_csv().