dispaset.postprocessing package¶
Submodules¶
dispaset.postprocessing.postprocessing module¶
Set of functions useful to analyse to DispaSET output data.
@author: Sylvain Quoilin, JRC
-
dispaset.postprocessing.postprocessing.
CostExPost
(inputs, results)[source]¶ Ex post computation of the operational costs with plotting. This allows breaking down the cost into its different components and check that it matches with the objective function from the optimization.
- The cost objective function is the following:
- SystemCost(i) =E= sum(u,CostFixed(u)*Committed(u,i)) +sum(u,CostStartUpH(u,i) + CostShutDownH(u,i)) +sum(u,CostRampUpH(u,i) + CostRampDownH(u,i)) +sum(u,CostVariable(u,i) * Power(u,i)) +sum(l,PriceTransmission(l,i)*Flow(l,i)) +sum(n,CostLoadShedding(n,i)*ShedLoad(n,i)) +sum(chp, CostHeatSlack(chp,i) * HeatSlack(chp,i)) +sum(chp, CostVariable(chp,i) * CHPPowerLossFactor(chp) * Heat(chp,i)) +Config(“ValueOfLostLoad”,”val”)*(sum(n,LL_MaxPower(n,i)+LL_MinPower(n,i))) +0.8*Config(“ValueOfLostLoad”,”val”)*(sum(n,LL_2U(n,i)+LL_2D(n,i)+LL_3U(n,i))) +0.7*Config(“ValueOfLostLoad”,”val”)*sum(u,LL_RampUp(u,i)+LL_RampDown(u,i)) +Config(“CostOfSpillage”,”val”)*sum(s,spillage(s,i));
Returns: tuple with the cost components and their cumulative sums in two dataframes.
-
dispaset.postprocessing.postprocessing.
aggregate_by_fuel
(PowerOutput, Inputs, SpecifyFuels=None)[source]¶ This function sorts the power generation curves of the different units by technology
Parameters: - PowerOutput – Dataframe of power generationwith units as columns and time as index
- Inputs – Dispaset inputs version 2.1.1
- SpecifyFuels – If not all fuels should be considered, list containing the relevant ones
Returns PowerByFuel: Dataframe with power generation by fuel
-
dispaset.postprocessing.postprocessing.
filter_by_storage
(PowerOutput, Inputs, StorageSubset=None)[source]¶ This function filters the power generation curves of the different storage units by storage type
Parameters: - PowerOutput – Dataframe of power generationwith units as columns and time as index
- Inputs – Dispaset inputs version 2.1.1
- SpecifySubset – If not all EES storages should be considered, list containing the relevant ones
Returns PowerByFuel: Dataframe with power generation by fuel
-
dispaset.postprocessing.postprocessing.
filter_by_tech
(PowerOutput, inputs, t)[source]¶ This function filters the dispaset power output dataframe by technology
Parameters: - PowerOutput – Dataframe of power generation with units as columns and time as index
- inputs – Dispaset inputs version 2.1.1
- t – Selected tech (e.g. ‘HDAM’)
Returns Power:
-
dispaset.postprocessing.postprocessing.
filter_by_zone
(PowerOutput, inputs, z)[source]¶ This function filters the dispaset Output Power dataframe by zone
Parameters: - PowerOutput – Dataframe of power generationwith units as columns and time as index
- Inputs – Dispaset inputs version 2.1.1
- z – Selected zone (e.g. ‘BE’)
Returns Power: Dataframe with power generation by zone
-
dispaset.postprocessing.postprocessing.
get_imports
(flows, z)[source]¶ Function that computes the balance of the imports/exports of a given zone
Parameters: - flows – Pandas dataframe with the timeseries of the exchanges
- z – Zone to consider
Returns NetImports: Scalar with the net balance over the whole time period
-
dispaset.postprocessing.postprocessing.
get_indicators_powerplant
(inputs, results)[source]¶ Function that analyses the dispa-set results at the power plant level Computes the number of startups, the capacity factor, etc
Parameters: - inputs – DispaSET inputs
- results – DispaSET results
Returns out: Dataframe with the main power plants characteristics and the computed indicators
-
dispaset.postprocessing.postprocessing.
get_load_data
(inputs, z)[source]¶ Get the load curve, the residual load curve, and the net residual load curve of a specific zone
Parameters: - inputs – DispaSET inputs (output of the get_sim_results function)
- z – Zone to consider (e.g. ‘BE’)
Return out: Dataframe with the following columns: Load: Load curve of the specified zone ResidualLoad: Load minus the production of variable renewable sources NetResidualLoad: Residual netted from the interconnections with neightbouring zones
-
dispaset.postprocessing.postprocessing.
get_plot_data
(inputs, results, z)[source]¶ Function that reads the results dataframe of a DispaSET simulation and extract the dispatch data spedific to one zone
Parameters: - results – Pandas dataframe with the results (output of the GdxToDataframe function)
- z – Zone to be considered (e.g. ‘BE’)
Returns plotdata: Dataframe with the dispatch data storage and outflows are negative
-
dispaset.postprocessing.postprocessing.
get_result_analysis
(inputs, results)[source]¶ Reads the DispaSET results and provides useful general information to stdout
Parameters: - inputs – DispaSET inputs
- results – DispaSET results
-
dispaset.postprocessing.postprocessing.
get_units_operation_cost
(inputs, results)[source]¶ Function that computes the operation cost for each power unit at each instant of time from the DispaSET results Operation cost includes: CostFixed + CostStartUp + CostShutDown + CostRampUp + CostRampDown + CostVariable
Parameters: - inputs – DispaSET inputs
- results – DispaSET results
Returns out: Dataframe with the the power units in columns and the operation cost at each instant in rows
Main Author: @AbdullahAlawad