pomato.POMATO¶
- class pomato.POMATO(wdir, options_file=None, logging_level=20, file_logger=True)¶
The main module joins all components of POMATO, providing accessibility to the user.
The core attributes are modules that provide specific functionalities to the model. At the center is an instance of the DataManagement module, that reads and processes input data, makes processed input data accessible to other modules and is the container for the results from the market model.
- Attributes:
- wdirpathlib.Path
Working directory, all necessary folders, temporary files and results are stored in relation to this directory.
- optionsdict
Dictionary containing centralized all options relevant for running an economic dispatch. The options are roughly categorized into:
Optimization: defining model type, model horizon, inclusion of model features like heat or curtailment, management of infeasibility variables and definition of plant types considered.
Grid: Setting Capacity multiplier, applying redundancy removal for contingency analysis and its sensitivity, for zonal representation setting the node-zone weights.
Data: data type, data that is stored stacked (opposed to long), options to process marginal costs to be unique and default values.
Gets initialized with the input json file and receives default options based on the method
add_default_options().- data
DataManagement Instance of DataManagement class containing all data, data processing, results and result processing. Is initialized empty, then data explicitly loaded.
- grid_topology
GridTopology Object containing all grid information. Initializes empty and filled based on nodes and lines data when it is loaded and processed. Provides the PTDF matrices for N-0 and N-1 load flow analysis.
- grid_model
GridModel The GridModel provides the grid representation to the market model, based on the chosen configuration. Combines input data and the GridModel into a grid representation based on the chosen configuration (N-0, N-1, zonal, zonal CBCO, ntc, copper plate) and runs the redundancy removal algorithm needed for N-1 grid representation.
- grid_representation
GridModel.grid_representation The output of the grid_module. A namespace containing all information for the market model to account for the chosen network representation.
- market_model
MarketModel Module containing and managing the market model. This includes storing the necessary data, running and managing a julia process instance and initializing the result object inside
data.- visualization
Visualization Module that collects all visualization functionality. Including a geoplot and dashboard based around the library plotly.
- Parameters
- ———-
- wdirpathlib.Path, optional
Working directory, should be the root of the POMATO folder.
- options_filestr, optional
Providing the name of an option file, usually located in the
/profilesfolder. If not provided, using default options as defined in tools.
Methods
create_grid_representation(**kwargs)Grid Representation as property.
Initialize the grid model from the data management object
initialize_market_results(result_folders)Initializes market results from a list of folders.
initialize_options(options_file)Initialize options file.
load_data(filename)Load data into
DataManagementmodule.rename_market_result(oldname, newname)Rename market results.
run_market_model([update_data])Run the market model based on the current state of data and options.
update_market_model_data([folder])Update data within an instance of the market model.
- create_flowbased_parameters(basecase, **kwargs)¶
Create flow based parameters based on a chosen basecase.
This method collects the respective methods from
FBMCModulemore specificallycreate_flowbased_parameters().Additionally, this method create the appropriate grid representation.
- create_grid_representation(**kwargs)¶
Grid Representation as property.
Creates grid representation to be used in the market model.
- Parameters:
- flowbased_parametersoptional, pandas.DataFrame
Flowbased parameters, derived using
FBMCModule
- init_grid_model()¶
Initialize the grid model from the data management object
- initialize_market_results(result_folders)¶
Initializes market results from a list of folders.
- Parameters:
- result_folderslist
List of folders containing market results.
- initialize_options(options_file)¶
Initialize options file.
- Parameters:
- options_filestr, optional
Providing the name of an option file, usually located in the
/profilesfolder. If not provided, using default options as defined in tools.
- load_data(filename)¶
Load data into
DataManagementmodule.The data attribute is initialized empty and explicitly filled with this method. When done reading and processing data, the grid model is also initialized.
- Parameters:
- filenamestr
Providing the name of a data file, usually located in the
/input_datafolder. Excel files and matpower cases are supported.
- rename_market_result(oldname, newname)¶
Rename market results.
The market results are initialized from folders in data_temp/julia_files/results in a autogenerated format which consists of date and time. This can be replaced with a more appropriate naming. If multiple results exist, all are renamed accordingly.
E.g. with two results 01010_market_results, 01010_redispatch_Z1, it might make sense to replace the numeric prefix.
- Parameters:
- oldnameString
The original name
- newnameString
The new name.
- run_market_model(update_data=False)¶
Run the market model based on the current state of data and options.
- Parameters:
- update_databool, optional
Update data before model run. Default: False.
- start_dashboard(**kwargs)¶
Initialize Dashboard for result analysis.
This is done with the
Dashboard()class. See the correpsonding documentation for the available conditional arguments.
- stop_dashboard()¶
Stop Dashboard server.
- update_market_model_data(folder=None)¶
Update data within an instance of the market model.
It is possible to change the data which is used in the market model and re-run without explicitly re-initializing the module.
- Parameters:
- folderpathlib.Path, optional
Saving model data to specified path, defaults to
data_temp/julia_files/data.