Input Output Management

Standard inputs and outputs

Descriptions of the basic functions are given below.

Function descriptions:

standardIO.readEnergySystemModelFromExcel(fileName='scenarioInput.xlsx')[source]

Reads energy system model from excel file

Parameters:fileName (string) – excel file name or path (including .xlsx ending)
* the default value is ‘scenarioInput.xlsx’
Returns:esM, esMData - an EnergySystemModel class instance and general esMData as a Series
standardIO.readEnergySystemModelFromExcel(fileName='scenarioInput.xlsx')[source]

Reads energy system model from excel file

Parameters:fileName (string) – excel file name or path (including .xlsx ending)
* the default value is ‘scenarioInput.xlsx’
Returns:esM, esMData - an EnergySystemModel class instance and general esMData as a Series
standardIO.writeOptimizationOutputToExcel(esM, outputFileName='scenarioOutput', optSumOutputLevel=2, optValOutputLevel=2)[source]

Writes optimization output to an Excel file

Parameters:
  • esM (EnergySystemModel instance) – EnergySystemModel instance in which the optimized model is hold
  • outputFileName (string) – name of the Excel output file (without .xlsx ending)
    * the default value is ‘scenarioOutput’
  • optSumOutputLevel (int (0,1,2)) – output level of the optimization summary (see EnergySystemModel)
    * the default value is 2
  • optValOutputLevel (int (0,1)) – output level of the optimal values. 0: all values are kept. 1: Lines containing only zeroes are dropped.
    * the default value is 1
standardIO.energySystemModelRunFromExcel(fileName='scenarioInput.xlsx')[source]

Runs an energy system model from excel file

Parameters:fileName (string) – excel file name or path (including .xlsx ending)
* the default value is ‘scenarioInput.xlsx’
Returns:esM - an EnergySystemModel class instance and general esMData as a Series
standardIO.getDualValues(pyM)[source]

Gets dual values of an optimized pyomo instance

Parameters:pyM – optimized pyomo instance
Returns:Pandas Series with dual values
standardIO.getShadowPrices(pyM, constraint, dualValues=None)[source]

Gets dual values of constraint (“shadow prices”)

Parameters:
  • pyM – pyomo model instance with optimized optimization problem
  • constraint – constraint from which the dual values should be obtained (e.g. pyM.commodityBalanceConstraint)
  • dualValues (None or Series) – dual values of the optimized model instance (if not specified is call using the function# getDualValues)
    * the default value is None
Returns:

Pandas Series with the dual values of the specified constraint