Home

Awesome

REVOL-E-TION System diagram

Resilient Electric Vehicle Optimization model for Local Energy TransitION

REVOL-E-TION is an energy system model toolbox designed to optimize integration of electric vehicle fleets into local energy systems such as mini- and microgrids, company sites, apartment blocks or single homes and estimate the resulting technoeconomic potentials in terms of costs and revenues within the energy (and optionally also the mobility system). It is built as a wrapper on top of the oemof energy system model framework.

Created by

Philipp Rosner, M.Sc. and Brian Dietermann, M.Sc.
Institute of Automotive Technology
Department of Mobility Systems Engineering
TUM School of Engineering and Design
Technical University of Munich
philipp.rosner@tum.de
September 2nd, 2021

Contributors

Marcel Brödel, M.Sc. - Research Associate 01/2024-

David Eickholt, B.Sc. - Semester Thesis submitted 07/2021
Marcel Brödel, B.Sc. - Semester Thesis submitted 05/2022
Hannes Henglein, B.Sc. - Semester Thesis submitted 10/2022
Marc Alsina Planelles, B.Sc. - Master's Thesis submitted 10/2022
Juan Forero Yacaman - Bachelor's Thesis submitted 04/2023
Elisabeth Spiegl - Bachelor's Thesis submitted 06/2023
Alejandro Hernando Armengol, B.Sc. - Master's Thesis submitted 10/2023
Hannes Henglein, B.Sc. - Master's Thesis submitted 01/2024
Florian Melzig, B.Sc. - Master's Thesis submitted 10/2024

Licensing

REVOL-E-TION is licensed under the Apache 2.0 open source license.
The full license text can be found in the LICENSE file in the root directory of the repository.

Related publications

Description

REVOL-E-TION is a scalable generator for (mixed integer) linear energy system models of local energy systems with or without electric vehicle fleets. It can be used to optimize component sizes and/or dispatch behavior of the system to achieve least cost in the simulation timeframe. Simulation results are later extrapolated and discounted to a project timeframe to estimate the technoeconomic potential of the system in the long run. Please note that this split between simulation and extrapolation improves computational effort, but creates possibly unwanted incentives for the optimizer (e.g. preferring low initial cost but operationally expensive power sources), especially when sizing components.

REVOL-E-TION groups oemof components and buses into blocks representing real-world systems (e.g. a PV array) for easy application. Electric vehicles (in fact any mobile storage devices) are modeled individually within a block called a CommoditySystem. Their behavior (i.e. when they depart and arrive again, how much energy they use in between and whether they can be charged externally) is described in a so called log file. Log files can be created using the integrated Discrete Event Simulation (DES), which is also capable of modeling range extension through a Battery CommoditySystem as well as multiple use cases in different time frames (e.g. summer/winter) for the commoditites.

The following system diagram shows the basic structure including one example of each block class (blocks are indicated by dashed lines): System diagram

Installation

REVOL-E-TION is designed to run under Windows 10, Ubuntu 22.04 LTS and MacOS 15 Sequoia, each with Python 3.11. While portability is generally built in, other operating systems are untested.

Step 1: Getting the source code

REVOL-E-TION is available at the institute's GitHub and can be cloned from there using

git clone https://github.com/TUMFTM/REVOL-E-TION.git

Step 2: Create a clean virtual environment

It is recommended to create and activate a clean virtual environment for the installation of REVOL-E-TION. This can be done using the following command:

python -m venv <path_to_virtual_environment>
source <path_to_virtual_environment>/bin/activate

or alternatively with conda:

conda create -n <name_of_virtual_environment> python=3.11
conda activate <name_of_virtual_environment>

Step 3: Install package and dependencies locally

Navigate to the root directory of the cloned repository and install the package and its dependencies using pip:

pip install -e .

This will install the revoletion package in editable mode, meaning that changes to the source code will be reflected in the installed package without reinstalling it.

Step 4: MILP Solver

REVOL-E-TION requires a pyomo compatible Mixed Integer Linear Programming (MILP) solver (as does oemof). The open-source cbc solver works well. The proprietary Gurobi solver is recommended however, as it is faster in execution, especially for large problems and offers a free academic license. If Gurobi is used, the version of Gurobi, gurobipy and the license file have to match. To ensure this get the version of both your gurobi license/installation (grbgetkey --version) and the installed gurobipy package (pip show gurobipy). If their major version numbers do not match, install the correct version of gurobipy using pip:

pip install gurobipy==<your_gurobi_version>

Step 5: Basic Usage

Running REVOL-E-TION requires closely defined scenario(s) to simulate and common simulation settings to operate on. Both are to be given as .csv-files specified as parameters in the terminal execution command using one of three options:

  1. No parameters passed: graphical selection dialogs open automatically for scenario and settings files. (simple option)
  2. Only filenames passed: scenario and settings files are searched in (a) the working directory and (b) in the package's example directory.
  3. Valid paths to files passed: scenario and settings files are searched in the specified directories (best for remote execution on a server)

The actual terminal command can also be given in multiple forms:

  1. Direct execution of the package's main module, e.g. python -m revoletion.main <scenario_file_parameter> <settings_file_parameter> (best for local execution on host machine, e.g. through a run configuration in PyCharm)
  2. Call to the package's entry point, e.g. revoletion <scenario_file_parameter> <settings_file_parameter> (best for remote execution on a server as it works irrespective of the current working directory as long as the correct environment is active)

Example scenario and settings files are provided in the example directory. Formatting of the scenario and settings files can be taken from the example files and is explained in tabular form below. Some parameters in the scenario files reference to other files specified by file name within the input directory specified in the settings file. This mostly applies to timeseries data. Furthermore, to describe the mapping of different timeframes defining behavior of CommoditySystems (see below), modification of the mapper_timeframe_example.py code file might be necessary to fit the scenario as this is not simply and flexibly done in parameter files. The filename of the modified file has to be given in the scenario file under the key filename_mapper and the file has to be placed in the respective input directory specified in the settings file.

Concerning computational effort, REVOL-E-TION relies heavily on single core computing power for each scenario and especially in 'go' strategy uses significant memory. To avoid memory limitations, it is advised to limit the number of parallel scenarios to be executed in the settings file depending on the hardware used.

General Terms & Definitions

The following table details common terms occuring in further descriptions and the code:

TermDescription
ProjectAn application of REVOL-E-TION in a specific setting. All files (scenarios file, input data files, etc.) should be contained in a single directory. ./example is an example project.
RunA single execution of REVOL-E-TION defined by a single scenario file (possibly containing multiple scenario definitions as columns) and settings file each. Common information and methods valid for all scenarios are defined in a SimulationRun object.
ScenarioA set of parameters (i.e. an energy system) to be simulated and/or optimized. It is defined by a column in the scenario file and some timeseries inputs.
StrategyThe (energy management) strategy to dispatch the energy system's blocks generally (see CommoditySystem capability levels later on for differences). REVOL-E-TION supports two strategies: "go" for single shot global optimization and "rh" for rolling horizon (i.e. time slotted myopic) optimization similar to Model Predictive Control (MPC). The former is a special case of the latter with just a single horizon. Component size optimization is only applicable in "go".
HorizonA single optimization process by the solver, whether as the only one of the scenario ("go" strategy) or as a slice of the simulation timeframe ("rh" strategy). In the latter case, the total simulation time is split up into prediction horizons (each of which is represented in the code by a PredictionHorizon object) that are simulated consecutively. However, overlap between the horizons is necessary to ensure feasibilty of dispatch. Therefore, only the first part of the prediction horizon (called control horizon) is actually used for overall result calculation, while the rest is discarded. The simulation timeframe is automatically split up into horizons as per the defined length of prediction and control horizons from the scenario file. See the following diagram for clarification: Rolling Horizon principle
BlockA set of oemof components representing a real-world system including necessary converters and buses. Each is represented by an instance of the Block parent class with further child classes. The blocks present in the energy system are defined in the scenario file as a dictionary, except for the core block (of class SystemCore) containing the AC and DC buses as well as the converter(s) inbetween them. Multiple instances of one block can coexist in a model. The possible types (i.e. Classes) are laid out in the following chapter.
ComponentA component is an oemof element that is either a source, a sink, a bus, a converter or a storage.

Classes of Blocks

The following table details the classes of blocks that can be specified in the "blocks" parameter of the scenario in the scenario file with respective names for the instances. Block instances cannot be named "scenario". Each instance requires a certain set of parameters dependent on its class. These are specified in the following chapter.

Class NameDescription
InvestBlockParent class for all blocks that are possibly being sized in optimization (i.e. where an investment decision has to be taken) and for which entering 'opt' as the size in the scenario file will trigger that size optimization. However, this option is only compatible with the "go" strategy. Class contains mostly methods for result evaluation.
RenewableInvestBlockParent class for all InvestBlocks representing a renewable source with a curtailment sink component and variable potential power (defined as a fraction of nominal power to enable sizing) over time. Child of class InvestBlock.
SystemCoreClass for collection of central energy system components (AC and DC buses and the two unidirectional transformers between them). Child of class Block. This is present once and only once in every energy system defined in REVOL-E-TION under the name "core". For pure AC or DC systems, the respective core cost and size parameters can be set to zero to have no effect on the result.
FixedDemandClass for undeferrable (i.e. inflexible) power demand such as households. Child of class Block. Power timeseries is defined in a csv file.
PVSourceClass for photovoltaic array. Child of class RenewableInvestBlock. Power potential is defined either in a Solcast or PVGIS formatted csv file (both pre-downloaded) or retrieved from either the Solcast or PVGIS API (selection of API requires active internet connection. In addition the Solcast API requires an active subscription plan. There is a limited free plan for researchers).
WindSourceClass for wind turbine. Child of class RenewableInvestBlock. Power potential is defined either in a csv timeseries file or from PVSource data containing wind speed, which is then converted to power for a specific turbine height. For the latter option, a PVSource block must exist.
ControllableSourceClass for independently controllable power sources (e.g. fossil generator, hydro power plant) that is unlimited in energy. Child of class InvestBlock.
GridConnectionClass for utility grid and/or energy market connection. Child of class InvestBlock. A GridConnection instance can contain multiple GridMarkets. Definition of GridMarket instances happens in a separate csv file.
StationaryEnergyStorageClass for stationary battery energy storage systems. Child of class InvestBlock. A posteriori aging (i.e. capacity reduction) estimation is possible and will be taken into the next horizon as a reduced available SOC range. Storage modelling is done linearly without SOC or temperature based limits of charge or discharge power.
CommoditySystemParent class for fleets of mobile battery based devices (e.g. electric vehicles or battery rental). Child of class InvestBlock. Behavior is defined in a csv file (the log) that can either be given or generated within the integrated Discrete Event Simulation from stochastic behavioral parameters to be given in a usecase definition csv file for different timeframes defined in mapper_timeframe.py in code. Each CommoditySystem consists of at least one MobileCommodity representing one vehicle or battery.
VehicleCommoditySystemClass for fleet of electric vehicles, possibly with range extension using a BatteryCommoditySystem (see publication). Child of class CommoditySystem.
BatteryCommoditySystemClass for fleet of mobile batteries. Child of class CommoditySystem.
ICEVSystemClass for comparative calculation of ICEV fleet cost.

Scenario Input Parameters

The scenario file defines all noncomplex (i.e. integer, float, string, boolean) parameters of the scenarios. Complex (multidimensional) parameters are mostly defined through links to other files (by filename) in the scenario file. The following table specifies each parameter for each possible block class in the scenario file. If and only if a block of a certain class exists within the scenario are these parameters required and read in. Therefore not every scenario file contains all possible parameters. Multiple scenarios can be defined as multiple columns. The first row (header) of each scenario column defines the scenarios name. By adding a '#' to the start of the name of a scenario column, the scenario is ignored during the simulation process. The first column of the scenario file defines the name of the block the parameter in the second column applies to. An example scenario file is provided in the ./example directory. As all string values specified in the scenario definition file are converted to lower case, all files have to be named in lower case to be read in properly.

<!ENTRY_POINT_SCENARIOS_TABLE>
BlockKeyNameTypeDescriptionValid values or format
ScenariostarttimeStart timestrStart time of the project and the simulation in local time. If no time is given in addition to the date the project starts at 00:00 local time'dd.mm.YYYY HH:MM'
timestepTime stepstrTime step used for the simulationformats compatible with pd.to_timedelta() such as '15min' or '1H'
sim_durationSimulation durationint or strSimulation duration. If given as integer the number is interpreted as number of days. Specifying a pandas.Timedelta() compliant string is also supported. The duration is rounded down to the specified timestep.[1, inf[ or str such as '1 day 12 hours 14 minutes'
prj_durationProject durationintProject duration in years to which the economic results of the simulation duration are extrapolated[1, inf[
compensate_sim_prjSpecific Capex/Opex compensation triggerboolTrigger whether to optimize for sim duration (False) or project duration (True)e.g. 'EUR', 'USD'
strategyStrategystrOptimization strategy'go' or 'rh' (global optimum, rolling horizon)
len_phPrediction horizon lengthintLength of the prediction horizon in hours. Neglected for every optimization strategy other than 'rh'[1, inf[
len_chControl horizon lengthintLength of the control horizon in hours. Neglected for every optimization strategy other than 'rh'[1, inf[
truncate_phTruncate Prediction HorizonboolToggles whether to truncate predictions horizons to simulation end time when using 'rh' optimization strategy. If activated all horizons are truncated to the simulation end time. Deactivation requires additional input data for all Prediction Horizons even beyond the end of the simulation specified by "starttime" and "sim_duration"True, False
invest_maxMaximum initial investment costsfloatLimit the initial investment costs to a specific amount. If no limit should be considered set this parameter to None[0, inf[ or None
waccWeighted average cost of capitalfloatWeighted average cost of capital: discount rate for future expenses/revenues and energies per year[0, 1]
currencyCurrencystrCurrency used to display results of economic calculations. No influence of calculation itself, only used for displaying.e.g. 'EUR', 'USD'
latitudeLatitudefloatLatitude of the location of the local energy system. Used to determine timezone, pv and wind data. Has to be given in WGS84[-90, 90]
longitudeLongitudefloatLatitude of the location of the local energy system. Used to determine timezone, pv and wind data. Has to be given in WGS84[-90, 90]
cost_epsEpsilon costsfloatCost added to some flows in order to disincentivice circular flows[0, inf[
filename_mapperFilename TimeframeMapperstrFilename of the file containing the mapping function for the CommoditySystems' DES. The file has to The filename has to be given without the ending ".py". The file itself has to be placed in the project directory.string with filename of python file without ".py"
blocksBlocksdictAll blocks present in the scenario except for the SystemCore, which is added automatically, in the format {block_name: class_name}. Non valid names are 'run', 'scenario' and 'core' (default name for block of class SystemCore).'{'custom block name': 'class name of block'}'
SystemCoresize_acdc_existingExisting AC/DC sizefloat or strInstalled power of the AC/DC converter in the SystemCore in W. To set both converter sizes to the same value set one size to 'equal'[0, inf[ or 'equal'
capex_existing_acdcConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_acdc_maxMaximum size of AC/DC converterfloatMaximum size of the AC/DC converter of the SystemCore including existing size. To enable unlimited investment set this parameter to None. To set both converters' maximum investments to the same value set one maximum investment to 'equal'[0, inf[ or None
invest_acdcInvestment into AC/DC converterbool or strEnable additional investment into the AC/DC converter of the SystemCore. If one of the invest parameters is set to 'equal' both investments are forced to the same sizeTrue, False, 'equal'
size_dcac_existingExisting DC/AC sizefloat or strInstalled power of the DC/AC converter in the SystemCore in W. To set both converter sizes to the same value set one size to 'equal'[0, inf[ or 'equal'
capex_existing_dcacConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_dcac_maxMaximum size of DC/AC converterfloatMaximum size of the DC/AC converter of the SystemCore including existing size. To enable unlimited investment set this parameter to None. To set both converters' maximum investments to the same value set one maximum investment to 'equal'[0, inf[ or None
invest_dcacInvestment into DC/AC converterbool or strEnable additional investment into the DC/AC converter of the SystemCore. If one of the invest parameters is set to 'equal' both investments are forced to the same sizeTrue, False, 'equal'
capex_specSpecific capital expendituresfloatSpecific capital expenditures for each of the converters in the SystemCore: cost in currency per installed power (cumulative size of "size_acdc" and "size_dcac") in W[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures for each of the converters in the SystemCore: cost in currency per year per installed power in W[0, inf[
opex_specSpecific operational expendituresfloat or strSpecific operational expenditures for each of the converters in the SystemCore cost in currency per converted energy in Wh. Energy is measured at converter inflowstring with filename or [0, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, inf[
eff_dcacDC/AC efficiencyfloatEfficiency of the DC/AC converter in the SystemCore[0, 1]
eff_acdcAC/DC efficiencyfloatEfficiency of the AC/DC converter in the SystemCore[0, 1]
FixedDemandload_profileLoad ProfilestrLoad profile for the fixed demand. Can be given as filename of a csv file containing a timeseries specifying the fixed demand of the block or as string defining a constant load or one of the standard load profiles by BDEW. If a filename is given, the file has to include the two columns 'time' and 'power' including a timezone aware timestamp and the corresponding power value in Wstring with filename, {'const', 'H0', 'G0', 'G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'L0', 'L1', 'L2'}
consumption_yrlYearly consumptionfloatYearly consumption in Wh. Only taken into account if a standard load profile or 'const' is defined in "load_profile"[0, inf[
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
crev_specSpecific customer revenuefloatSpecific customer revenue for consumed energy in currency per Wh[0, inf[
WindSourcesize_existingExisting sizefloatInstalled rated power of wind turbine in W[0, inf[
capex_existingConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_maxMaximum sizefloatMaximum size of WindSource including existing size. To enable unlimited investment set this parameter to None[0, inf[ or None
investInvestmentboolEnable additional investment into the wind turbineTrue, False
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
data_sourceData sourcestrData source for wind power. Wind power can either be calculated from the PV data or given as a separate filestring containing the name of a block of class PVSource or 'file'
heightHeightfloatHub height of the wind turbine in meters[0, inf[
filenameFilenamestrFilename of csv file containing wind power data with the columns time (timezone aware timestamp) and power_spec (specific power in W per rated power in W) for each defined timestampstring with filename
capex_specSpecific capital expendituresfloatSpecific capital expenditures: cost in currency per installed rated power in W[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures: cost in currency per year per installed rated power in W[0, inf[
opex_specSpecific operational expendituresfloat or strSpecific operational expenditures: cost in currency per generated energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, inf[
effEfficiencyfloatEfficiency of the wind turbine[0, 1]
PVSourcesize_existingExisting sizefloatInstalled peak power of the pv array in in Wp[0, inf[
capex_existingConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_maxMaximum sizefloatMaximum size of PVSource including existing size. To enable unlimited investment set this parameter to None[0, inf[ or None
investInvestmentboolEnable additional investment into the PV systemTrue, False
data_sourceData sourcestrData source for pv power. This can be PVGIS or Solcast API or a file containing data from PVGIS or Solcast. If Solcast API is chosen a valid API key has to specified in .input\PVSource\solcast_api.conf by copying and renaming .input\PVSource\solcast_api_template.conf'pvgis api', 'solcast api', pvgis file', 'solcast file'
filenameFilenamestrName of a PVGIS or Solcast csv file if "data_source" is set to 'pvgis file' or 'solcast file'. Name of a parameter file or None to use the default values if 'pvgis api' or 'solcast api' is chosen.string with filename
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
capex_specSpecific capital expendituresfloatSpecific capital expenditures: cost in currency per installed peak power in W[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures: cost in currency per year per installed peak power in W[0, inf[
opex_specSpecific operational expendituresfloat or strSpecific operational expenditures: cost in currency per generated energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, inf[
effEfficiencyfloatEfficiency of the PV array, taking into account all losses occurring from insulation up to the point of feeding power into the bus to which the block is connected[0, 1]
ControllableSourcesize_existingExisting sizefloatInstalled rated power of the source in W[0, inf[
capex_existingConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_maxMaximum sizefloatMaximum size of ControllableSource including existing size. To enable unlimited investment set this parameter to None[0, inf[ or None
investInvestmentboolEnable additional investment into the power sourceTrue, False
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
capex_specSpecific capital expendituresfloatSpecific capital expenditures: cost in currency per installed power in W[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures: cost in currency per year per installed peak power in W[0, inf[
opex_specSpecific operational expendituresfloat or strSpecific operational expenditures: cost in currency per generated energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, inf[
effEfficiencyfloatEfficiency of the source[0, 1]
GridConnectionsize_g2s_existingExisting maximum power from grid to local sitefloatInstalled power for the power flow from the grid to the local site in W. To set both directions' existing powers to the same value set one size to 'equal'[0, inf[, 'equal'
capex_existing_g2sConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_g2s_maxMaximum size of Grid2SitefloatMaximum size of Grid2Site including existing size. To enable unlimited investment set this parameter to None. To set both directions' maximum investments to the same value set one maximum investment to 'equal'[0, inf[ or None
invest_g2sInvestment into Grid2Sitebool or strEnable additional investment into the maximum power from the grid to the local site. To ensure the same additional power for both directions set one invest variable to 'equal'[0, inf[
size_s2g_existingExisting maximum power from local site to gridfloatInstalled power for the power flow from the local site to the grid in W. To set both directions' existing powers to the same value set one size to 'equal'[0, inf[, 'equal'
capex_existing_s2gConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_s2g_maxMaximum size of Site2GridfloatMaximum size of Site2Grid including existing size. To enable unlimited investment set this parameter to None. To set both directions' maximum investments to the same value set one maximum investment to 'equal'[0, inf[ or None
invest_s2gInvestment into Site2Gridbool or strEnable additional investment into the maximum power from the local site to the grid. To ensure the same additional power for both directions set one invest variable to 'equal'[0, inf[
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
peakshavingPeakshavingstrPeakshaving period. Peakshaving can be deactivated by setting this parameter to 'None''None', 'day', 'week', 'month', 'quarter', 'year'
opex_spec_peakOperational expenditures for peakshavingfloatSpecific operational expenditures for maximum power drawn from the public grid in cost in currency per peak power in W per peakshaving duration[0, inf[
capex_specSpecific capital expendituresfloatSpecific capital expenditures: cost in currency per installed power (cumulative size of "size_s2g" and "size_g2s") in W of the grid connection[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures: cost in currency per year per installed power (cumulative size of "size_s2g" and "size_g2s") in W of the grid connection[0, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, inf[
effEfficiencyfloatEfficiency of the grid connection[0, 1]
filename_marketsMarkets filestrIf multiple markets should be specified the filename of a file containing the parameters for different markets can be set here. Otherwise set to 'None'. If a markets file is specified, the default market specified by the following three parameters in this file will be neglected.string with filename or 'None'
res_onlyRenewable energy sources onlyboolDefault market: If activated, selling energy to the grid is restricted to energy produced by renewable energies blocks (PVSource, WindSource) in the current timestep and energy stored in a storage with activated "res_only" parameter'True' or 'False'
opex_spec_g2sSpecific operational expenditures for grid to local sitefloat or strDefault market: Specific operational expenditures for buying energy from the default market: cost in currency per energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_s2gSpecific operational expenditures for local site to gridfloat or strDefault market: Specific operational expenditures for selling energy to the default market; cost in currency per energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
StationaryEnergyStoragesize_existingExisting sizefloatExisting nominal capacity of the storage in Wh[0, inf[
capex_existingConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_maxMaximum sizefloatMaximum size of StationaryEnergyStorage including existing size. To enable unlimited investment set this parameter to None[0, inf[ or None
investInvestmentboolEnable additional investment into the storage capacityTrue, False
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
res_onlyRenewable energy sources onlyboolIf activated, only energy from renewable sources can be stored in the storage'True' or 'False'
agingAgingboolBattery aging calculation after each horizon. Aging results are taken into account for the next horizon'True' or 'False'
chemistryChemistrystrCell chemistry of the storage to select the correct aging model for aging calculation'NMC', 'LFP'
temp_batteryBattery temperaturefloat or strBattery temperature used as stress factor in aging model. Can be set to a constant value or defined using the timeseries of a PVSource block as this contains a temperature timeseriesstring with name of block of class PVSource or ]-inf, inf[
capex_specSpecific capital expendituresfloatSpecific capital expenditures: cost in currency per installed nominal storage capacity in Wh[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures: cost in currency per year per installed nominal storage capacity in Wh[0, inf[
opex_specSpecific operational expendituresfloat or strSpecific operational expenditures: cost in currency per energy stored in the storage in Wh. Energy is measured at storage inflow. Can be given as float or filename of a csv file containing a timeseriesstring with filename [0, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
eff_roundtripRoundtrip efficiencyfloatStorage roundtrip efficiency. Charge and discharge efficiency is calculated using sqrt(eff_roundtrip)[0, 1]
eff_acdcEfficiency of the AC/DC converterfloatEfficiency of the AC/DC converter connecting the block to the AC bus. This parameter is neglected if the block is connected to the DC bus[0, 1]
eff_dcacEfficiency of the DC/AC converterfloatEfficiency of the DC/AC converter connecting the block to the AC bus. This parameter is neglected if the block is connected to the DC bus[0, 1]
crate_chgCharge C-ratefloatMaximum C-rate for charging[0, inf[
crate_disDischarge C-ratefloatMaximum C-rate for discharging[0, inf[
soc_initInitial SOCfloatInitial SOC of the storage at simulation start[0, 1]
q_loss_cal_initInitial capacity loss due to calendric agingfloatInitial capacity loss of the storage at simulation start due to calendric aging given as fraction of the total capacity. The capacity-related initial SOH is calculated by 1 - (q_loss_cal_init + q_loss_cyc_init)[0, 1]
q_loss_cyc_initInitial capacity loss due to cyclic agingfloatInitial cyclic loss of the storage at simulation start due to calendric aging given as fraction of the total capacity. The capacity-related initial SOH is calculated by 1 - (q_loss_cal_init + q_loss_cyc_init)[0, 1]
sdrSelf discharge ratefloatSelf discharge rate of storage components per month (30 days)[0, inf[
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, inf[
VehicleCommoditySystemdata_sourceData sourcestrDefine whether usage timeseries should be (a) generated through mobility and dispatch simulation when given a usecase file, (b) generated through dispatch simulation only given a demand file or (c) read directly from a log file, forgoing a priori simulations'usecases', 'demand', 'log'
filenameFilenamestrFilename of csv file containing existing log or usecase definition for DESstring with filename
numNumberintNumber of commodities within the commodity system[1, inf[
size_existingExisting sizefloatInstalled nominal capacity of the commodity's storage in Wh per single commodity for all commodities within the commodity system[0, inf[
capex_existingConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_maxMaximum sizefloatMaximum size per commodity including existing size. To enable unlimited investment set this parameter to None[0, inf[ or None
investInvestfloatEnable additional investment into the commodities' storagesTrue, False
lvl_capCapability levelstrPhysical capability level of the commodity system's commodities for power feedback into the local energy grid. Available options are unidirectional charging ('ud'), vehicle-to-vehicle (restricted to commodities within the same commodity system, 'v2v') and vehicle-to-site ('v2s')'ud', 'v2v', 'v2s'
mode_schedulingScheduling ModestrOptimization level for charging the commodity system's commodities: Available options are uncoordinated charging ('uc'), three different rulebased strategies (equal distribution of the available power - 'equal', first come first served - 'fcfs', soc based charging - 'soc') and optimized charging ('oc'). If 'uc', 'equal', fcfs' or 'soc' are chosen, "lvl_cap" has to be 'ud'.'uc', equal', fcfs', 'soc', 'oc'
forecast_hoursForecast hoursfloatOnly relevant for rulebased charging strategies: Defines how much time in advance a trip can be seen by the charging scheduler in order to adjust the target SOC based on "soc_target_high" and "soc_target_low"[0, inf[
power_lim_staticStatic power limitfloatStatic power limit limiting the cumulative (dis-)charging power of the commodity system. Neglected for uncoordinated charging strategies.'None', [0, inf[
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
rex_csRange extender commodity systemstrOnly relevant if DES is activated. Name of a BatteryCommoditySystem which can be used as Range Extender.string with name of BatteryCommoditySystem
agingAgingboolBattery aging calculation after each horizon. Aging results are taken into account for the next horizon'True', 'False'
chemistryChemistrystrCell chemistry of the storage to select the correct aging model for aging calculation'NMC', 'LFP'
temp_batteryBattery temperaturefloat or strBattery temperature used as stress factor in aging model. Can be set to a constant value or defined using the timeseries of a PVSource block as this contains a temperature timeseriesstring with name of block of class PVSource or ]-inf, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
q_loss_cal_initInitial capacity loss due to calendric agingfloatInitial capacity loss of the storage at simulation start due to calendric aging given as fraction of the total capacity. The capacity-related initial SOH is calculated by 1 - (q_loss_cal_init + q_loss_cyc_init)[0, 1]
q_loss_cyc_initInitial capacity loss due to cyclic agingfloatInitial cyclic loss of the storage at simulation start due to calendric aging given as fraction of the total capacity. The capacity-related initial SOH is calculated by 1 - (q_loss_cal_init + q_loss_cyc_init)[0, 1]
soc_initInitial SOCfloatInitial SOC of the storage at simulation start[0, 1]
soc_target_highHigher target SOCfloatOnly relevant for rulebased charging strategies: SOC to which the commodity is charged if charging to "soc_target_low" would lead to a SOC lower than "soc_return" after the trip for the upcoming trip[0, 1]
soc_target_lowLower target SOCfloatOnly relevant for rulebased charging strategies: Default target SOC[0, 1]
soc_returnReturn SOCfloatMinimum SOC after the trip. For DES this is used to calculate (a) the usable range of a battery and (b) the numbers of necessary Range Extender batteries if available. For rulebased charging strategies this is used to choose the high or low target SOC.[0, 1]
dsoc_bufferDelta SOC bufferfloatBuffer given as SOC to compensate for aging occurring during the simulation and self discharge during a trip. Parameter is neglected for every other simulation paradigm than Rolling Horizon.[0, 1]
capex_specSpecific capital expendituresfloatSpecific capital expenditures: cost in currency per installed nominal traction battery storage capacity in Wh[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures: cost in currency per year per installed nominal traction battery storage capacity in Wh[0, inf[
opex_specSpecific operational expendituresfloat or strSpecific operational expenditures: cost in currency per energy stored in the storage in Wh. Energy is measured at storage inflow. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_sys_chgSpecific operational expenditures for system chargingfloat or strSpecific operational expenditures for system charging: cost in currency per energy charged into commodity system in Wh. This can be used to simulate different operators for commodities and local energy grid. Negative costs can lead to unwanted behavior (e.g. wasting energy)! Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_sys_disSpecific operational expenditures for system dischargingfloat or strSpecific operational expenditures for system discharging: cost in currency per energy discharged from commodity system in Wh. This can be used to simulate different operators for commodities and local energy grid. Negative costs can lead to unwanted behavior (e.g. wasting energy)! Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_ext_acSpecific operational expenditures for external AC chargingfloat or strSpecific operational expenditures for external AC charging: cost in currency per charged energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_ext_dcSpecific operational expenditures for external DC chargingfloat or strSpecific operational expenditures for external DC charging: cost in currency per charged energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
crev_spec_timeSpecific customer revenues per timefloatSpecific customer revenues per time: Revenues from vehicle utilization specified as revenue in currency per used time in hours. Total revenue is calculated by summing up time and distance revenue[0, inf[
crev_spec_distSpecific customer revenues per distancefloatSpecific customer revenues per distance: Revenues from vehicle utilization specified as revenue in currency per driven distance in km. Total revenue is calculated by summing up time and distance revenue[0, inf[
pwr_chgMaximum charging powerfloatMaximum charging power when connected to local energy system in W[0, inf[
pwr_disMaximum discharging powerfloatMaximum discharging power when connected to local energy system in W[0, inf[
pwr_ext_acMaximum power for external AC chargingfloatMaximum charging power when connected to an external AC charger in W[0, inf[
pwr_ext_dcMaximum power for external DC chargingfloatMaximum charging power when connected to an external DC charger in W[0, inf[
factor_pwr_desFactor for maximum charging power in DESfloatFactor to reduce the maximum charging power which is used to calculate blocking times for commodity recharging in the DES. A smaller factor will lead to more flexibility in charging scheduling but to a reduced number of fulfilled trip requests[0, 1]
eff_storage_roundtripStorage roundtrip efficiencyfloatRoundtrip efficiency of the commodity's storage measured at the connection between the commodity's bus and the storage[0, 1]
eff_chg_acAC charging efficiencyfloatEfficiency of the commodity's On-Board-Charger (OBC) in charging direction. Taken into account for AC charging ath the local grid and external AC charging[0, 1]
eff_chg_dcDC charging efficiencyfloatEfficiency of a DC charging station in charging direction. Taken into account for DC charging at the local grid only[0, 1]
eff_dis_acAC discharging efficiencyfloatEfficiency of the commodity's On-Board-Charger (OBC) in discharging direction. Taken into account for AC discharging at the local grid and external AC discharging[0, 1]
eff_dis_dcDC discharging efficiencyfloatEfficiency of a DC charging station in discharging direction. Taken into account for DC discharging at the local grid only[0, 1]
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, 1]
sdrSelf discharge ratefloatSelf discharge rate of storage components per month (30 days)[0, inf[
BatteryCommoditySystemdata_sourceData sourcestrDefine whether usage timeseries should be (a) generated through mobility and dispatch simulation when given a usecase file, (b) generated through dispatch simulation only given a demand file or (c) read directly from a log file, forgoing a priori simulations'usecases', 'demand', 'log'
filenameFilenamestrFilename of csv file containing existing log or usecase definition for DESstring with filename
numNumberintNumber of commodities within the commodity system[0, inf[
size_existingExisting sizefloatInstalled nominal capacity of the commodity's storage in Wh per single commodity for all commodities within the commodity system[0, inf[
capex_existingConsider existing block size in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
size_maxMaximum sizefloatMaximum size per commodity including existing size. To enable unlimited investment set this parameter to None[0, inf[ or None
investInvestmentboolEnable additional investment into the commodities' storagesTrue, False
lvl_capCapability levelstrPhysical capability level of the commodity system's commodities for power feedback into the local energy grid. Available options are unidirectional charging ('ud'), vehicle-to-vehicle (restricted to commodities within the same commodity system, 'v2v') and vehicle-to-site ('v2s)'ud', 'v2v', 'v2s'
mode_schedulingScheduling ModestrScheduling mode for charging the commodity system's commodities: Available options are uncoordinated charging ('uc'), three different rulebased strategies (equal distribution of the available power - 'equal', first come first served - 'fcfs', soc based charging - 'soc') and optimized charging ('oc'). If 'uc', 'equal', fcfs' or 'soc' are chosen, "lvl_cap" has to be 'ud'.'uc', equal', fcfs', 'soc', 'oc'
forecast_hoursForecast hoursfloatOnly relevant for rulebased charging strategies: Defines how much time in advance a trip can be seen by the charging scheduler in order to adjust the target SOC based on "soc_target_high" and "soc_target_low"[0, inf[
power_lim_staticStatic power limitfloatStatic power limit limiting the (dis-)cumulative charging power of the commodity system. Neglected for uncoordinated charging strategies.'None', [, inf[
systemSystemstrThe bus (AC or DC) the block is connected to'AC', 'DC'
agingAgingboolBattery aging calculation after each horizon. Aging results are taken into account for the next horizon'True', 'False'
chemistryChemistrystrCell chemistry of the storage to select the correct aging model for aging calculation'NMC', 'LFP'
temp_batteryBattery temperaturefloat or strBattery temperature used as stress factor in aging model. Can be set to a constant value or defined using the timeseries of a PVSource block as this contains a temperature timeseriesstring with name of block of class PVSource or ]-inf, inf[
lsLifespanfloatLifespan of the block in years after which it will be replaced[1, inf[
q_loss_cal_initInitial capacity loss due to calendric agingfloatInitial capacity loss of the storage at simulation start due to calendric aging given as fraction of the total capacity. The capacity-related initial SOH is calculated by 1 - (q_loss_cal_init + q_loss_cyc_init)[0, 1]
q_loss_cyc_initInitial capacity loss due to cyclic agingfloatInitial cyclic loss of the storage at simulation start due to calendric aging given as fraction of the total capacity. The capacity-related initial SOH is calculated by 1 - (q_loss_cal_init + q_loss_cyc_init)[0, 1]
soc_initInitial SOCfloatInitial SOC of the storage at simulation start[0, 1]
soc_targetTarget SOCfloatOnly relevant for rulebased charging strategies: SOC to which the commodity is charged[0, 1]
soc_returnReturn SOCfloatMinimum SOC after the trip. For DES this is used to calculate (a) the usable range of a battery and (b) the numbers of necessary Range Extender batteries if available. For rulebased charging strategies this is used to choose the high or low target SOC.[0, 1]
capex_specSpecific capital expendituresfloatSpecific capital expenditures: cost in currency per installed nominal traction battery storage capacity in Wh[0, inf[
mntex_specSpecific maintenance expendituresfloatSpecific maintenance expenditures: cost in currency per year per installed nominal traction battery storage capacity in Wh[0, inf[
opex_specSpecific operational expendituresfloat or strSpecific operational expenditures: cost in currency per energy stored in the storage in Wh. Energy is measured at storage inflow. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_sys_chgSpecific operational expenditures for system chargingfloat or strSpecific operational expenditures for system charging: cost in currency per energy charged into commodity system in Wh. This can be used to simulate different operators for commodities and local energy grid. Negative costs can lead to unwanted behavior (e.g. wasting energy)! Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_sys_disSpecific operational expenditures for system dischargingfloat or strSpecific operational expenditures for system discharging: cost in currency per energy discharged from commodity system in Wh. This can be used to simulate different operators for commodities and local energy grid. Negative costs can lead to unwanted behavior (e.g. wasting energy)! Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_ext_acSpecific operational expenditures for external AC chargingfloat or strSpecific operational expenditures for external AC charging: cost in currency per charged energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
opex_spec_ext_dcSpecific operational expenditures for external DC chargingfloat or strSpecific operational expenditures for external DC charging: cost in currency per charged energy in Wh. Can be given as float or filename of a csv file containing a timeseriesstring with filename or [0, inf[
crev_spec_timeSpecific customer revenues per timefloatSpecific customer revenues per time: Revenues from battery utilization specified as revenue in currency per used time in hours[0, inf[
pwr_chgMaximum charging powerfloatMaximum charging power when connected to local energy system in W[0, inf[
pwr_disMaximum discharging powerfloatMaximum discharging power when connected to local energy system in W[0, inf[
pwr_ext_acMaximum power for external AC chargingfloatMaximum charging power when connected to an external AC charger in W[0, inf[
pwr_ext_dcMaximum power for external DC chargingfloatMaximum charging power when connected to an external DC charger in W[0, inf[
factor_pwr_desFactor for maximum charging power in DESfloatFactor to reduce the maximum charging power which is used to calculate blocking times for commodity recharging in the DES. A smaller factor will lead to more flexibility in charging scheduling but to a reduced number of fulfilled trip requests[0, 1]
eff_storage_roundtripStorage roundtrip efficiencyfloatRoundtrip efficiency of the commodity's storage measured at the connection between the commodity's bus and the storage[0, 1]
eff_chg_acAC charging efficiencyfloatEfficiency of the commodity's On-Board-Charger (OBC) in charging direction. Taken into account for AC charging ath the local grid and external AC charging[0, 1]
eff_chg_dcDC charging efficiencyfloatEfficiency of a DC charging station in charging direction. Taken into account for DC charging at the local grid only[0, 1]
eff_dis_acAC discharging efficiencyfloatEfficiency of the commodity's On-Board-Charger (OBC) in discharging direction. Taken into account for AC discharging at the local grid and external AC discharging[0, 1]
eff_dis_dcDC discharging efficiencyfloatEfficiency of a DC charging station in discharging direction. Taken into account for DC discharging at the local grid only[0, 1]
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, 1]
sdrSelf discharge ratefloatSelf discharge rate of storage components per month (30 days)[0, inf[
ICEVSystemdata_sourceData sourcestrDefine whether usage timeseries should be (a) generated through mobility and dispatch simulation when given a usecase file, (b) generated through dispatch simulation only given a demand file or (c) read directly from a log file, forgoing a priori simulations'usecases', 'demand', 'log'
filenameFilenamestrFilename of csv file containing existing log or usecase definition for DESstring with filename
numNumberintNumber of commodities within the commodity system[0, inf[
lsLifespanintLifespan of the block in years after which it will be replaced[0, inf[
capex_existingConsider initial block cost in capexboolTrigger whether to consider existing component size in initial capex calculation. Replacement capex are unaffected.True, False
capex_pcAbsolute capital expenditures per vehiclefloatAbsolute capital expenditures: cost in currency per installed vehicle[0, inf[
mntex_pcAbsolute maintenance expenditures per vehiclefloatAbsolute maintenance expenditures: cost in currency per year per installed vehicle[0, inf[
opex_spec_distSpecific operational expendituresfloatSpecific operational expenditures: cost in currency per distance unit covered[0, inf[
crev_spec_timeSpecific customer revenue per timefloatcustomer revenues per time: Revenues from vehicle rentals specified as revenue in currency per used time in hours[0, inf[
crev_spec_distSpecific customer revenue per distancefloatSpecific customer revenues per distance: Revenues from vehicle utilization specified as revenue in currency per driven distance in km. Total revenue is calculated by summing up time and distance revenue[0, inf[
ccrCost change ratiofloatCost change ratio of the block's nominal price per year to be considered for replacement after its lifespan[0, 1]
<!EXIT_POINT_SCENARIOS_TABLE>

Settings Input Parameters

The settings file defines all common parameters for the scenarios in a simulation run. Its structure is much simpler than with the scenario file. The following table specifies each parameter of a complete settings file, all of which are required for every run.

<!ENTRY_POINT_SETTINGS_TABLE>
ParameterTypeDescriptionValid values or format
solverstrName of the solver to be used by pyomo for linear optimizationTested: ['cbc', 'gurobi', 'gplk']
parallelboolTrigger whether to use parallelization through python's multiprocessing library or work through the scenarios sequentially on a single core. If "paralllel" is True with only one scenario, sequential mode is selected automatically and a corresponding warning is logged. The benefit of parallelization of scenarios is naturally greatest in runs with many scenarios defined.['True', 'False']
max_process_numint,strMaximum number of processes to be used in case "parallel" is True. This should not exceed the number of threads of the processor(s) used to ensure computational efficiency. Especially in the "go" strategy, REVOL-E-TION is RAM heavy, therefore an even lower setting might make sense in runs with many "go" scenarios. Parameter is ignored if "parallel" is False.'max', [0,inf[
path_input_datastrDirectory to search for input data. If path is specified as 'example' the example project from the package directory will be executed, if specified as 'scenario_file_dir' input data will be search in the directory of the scenario file. Otherwise the path specified for this parameter will be used.'example', 'scenario_file_dir' or any path
path_output_datastrDirectory to save output data. If path is specified as 'package' the default directory within the package directory is used. Otherwise the path specified for this parameter will be used.'package' or any path
save_resultsboolTrigger whether to save the result summary (covering all scenarios) and timeseries (separately for every scenario) into the selected or default result directory.['True', 'False']
save_des_resultsboolTrigger whether to save the DES results (i.e. the resulting log and process dataframe) as separate csv files per CommoditySystem and scenario into the selected or default result directory for later usage in other simulations.['True', 'False']
print_resultsboolTrigger whether to print core result values of a scenario (e.g. the LCOE) and each block (e.g. the optimum size) to the terminal after the scenario has successfully completed.['True', 'False']
save_plotsboolTrigger whether to save the dispatch plot of each scenario (containing roughly the same information as the timeseries results in visual form) as a separate html file into the selected or default result directory. Since the resulting files are easily in the megabyte range, setting this option to True results in considerable storage requirements. This option is independent of the show_plots option.['True', 'False']
show_plotsboolTrigger whether to open each scenario's dispatch plot immediately upon generation using the default web browser. This option is independent of the save_plots option.['True', 'False']
save_system_graphsboolTrigger whether to save a separate pdf file of a graph representation of every scenario's energy system in the selected or default result directory. Mainly useful for debugging purposes of block definitions.['True', 'False']
dump_modelboolTrigger whether to save a .lp file containing the mathematical optimization model for later solving through pyomo.['True', 'False']
debugmodeboolTrigger whether to log and print solver progress information during the solving process. This is resource intensive and should therefore be avoided unless explicitly necessary.['True', 'False']
<!EXIT_POINT_SETTINGS_TABLE>

Grid markets

Blocks of class GridConnection, which model a physical grid connection, allow to define different grid markets to sell and buy energy. Each of these markets is characterized by the following parameters specified in a file specified by the parameter "filename_markets":

PVSource

The PVSource block models a photovoltaic system. If the insulation data is retrieved from an API (PVGIS or solcast) a API-specific parameter file can be passed to REVOL-E-TION to further specify the PV system. Examples for these files are ./example/pvgis_api_params.csv and ./example/solcast_api_params.csv This file is structured as follows if the PVGIS API is chosen:

ParameterTypeDefault ValueDescriptionValid values or format
raddatabasestrPVGIS-SARAH3Name of the radiation database. Dependent on location and chosen simulation timeframe. 'PVGIS-SARAH' for Europe, Africa and Asia or 'PVGIS-NSRDB' for the Americas between 60°N and 20°S, 'PVGIS-ERA5' and 'PVGIS-COSMO' for Europe (including high-latitudes), and 'PVGIS-CMSAF' for Europe and Africa (will be deprecated)'PVGIS-SARAH2', 'PVGIS-SARAH3', 'PVGIS-NSRDB', 'PVGIS-ERA5', 'PVGIS-COSMO', 'PVGIS-CMSAF'
pvtechchoicestrcrystSiPV technology'crystSi', 'CIS', 'CdTe', 'Unknown'
mountingplacestrfreeType of mounting for PV system. Options of 'free' for free-standing and 'building' for building-integrated.'free', 'building'
optimalanglesboolTrueCalculate the optimum tilt and azimuth angles. Ignored for two-axis tracking. Not possible in combination with specified user horizon'True', 'False'
optimal_surface_tiltboolTrueCalculate the optimum tilt angle. Ignored for two-axis tracking'True', 'False'
surface_azimuthfloat0Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270). This is offset 180 degrees from the convention used by PVGIS. Ignored for tracking systems.[0, 360[
surface_tiltfloat0Tilt angle from horizontal plane. Ignored for two-axis tracking.[0, 90]
trackingtypeint0Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.0, 1, 2, 3, 4, 5
usehorizonboolFalseInclude effects of horizon'True', 'False'
userhorizonlistNoneOptional user specified elevation of horizon in degrees, at equally spaced azimuth clockwise from north, only valid if usehorizon is True, if usehorizon is True but userhorizon is set to None PVGIS will calculate the horizon. Not possible in combination with activated optimalangleslist of floats (has to be specified surrounded by " ") e.g. "[45, 30, 0, 0]"

For the solcast API the following parameters are required. Set values to 'None' to use the default values from the API:

ParameterTypeDefault ValueDescriptionValid values or format
azimuthfloat180An azimuth of 0 means the system is facing true north. Positive values are anticlockwise (-90: east-facing, 135: southwest-facing).[-180, 180]
tiltfloat23Only used when array_type is 'fixed'. The angle (degrees) that the PV system is tilted off the horizontal (0 faces directly upwards, 90: vertical and facing the horizon).[0, 90]
array_typestrfixedTracking type of the pv array. Can be 'fixed' or 'horizontal_single_axis''fixed', 'horizontal_single_axis'
terrain_shadingboolFalseCalculate the optimum tilt and azimuth angles. Ignored for two-axis tracking. Not possible in combination with specified user horizon'True', 'False'

EV-Specific submodules

Since REVOL-E-TION's main purpose is optimum EV integration, this is where focus lies in modelling detail, resulting in the DES and a priori power scheduling submodules. The following sections give more detail on these submodules:

Discrete Event Simulation (DES)

The DES takes stochastically defined mobility or energy demand in multiple use cases and timeframes, samples an actual demand and assigns it to a CommoditySystem (more specifically to the individual MobileCommodities within it) in a first-come-first-serve approach. This enables to model the mobility/energy demand independently from the commodity fleet size. However, the DES is run a priori to the dispatch/sizing optimization, so no consideration of whether the resulting commodity dispatch is beneficial to the energy system is taken and limitations through battery aging and/or other limitations have to be covered by safety margins in dispatch to achieve a feasible energy system. Through the sampling, the DES also makes REVOL-E-TION outputs non-deterministic once it is activated even though the actual core optimization is deterministic. The DES is run separately for every scenario in a simulation run, but only once per scenario, as some CommoditySystems might be linked and can therefore not be simulated independently. It is built on the simpy library and is implemented in the commodity_des.py file. A modification is made to simpy in order to enable processes to require multiple resources at once, which is necessary for battery commodity use cases requiring high energy.

The core element of the DES is a so-called environment which is populated with processes that each represent one rental of a commodity from a store holding those commodities. The request time for each rental is sampled from a dual normal distribution over time of day defined for each timeframe and use case in the use case definition csv file. An example usecase file is distributed with REVOL-E-TION for both VehicleCommoditySystems and BatteryCommoditySystems (explanation see chapter "Classes of Blocks") in the respective input directories. Inside the code for the DES, RentalSystem instances are created for each CommoditySystem in the scenario as well as a RentalProcess instance for each process.

Each process not only covers the actual rental time (which itself is made up of an active part and idle time, both of which are sampled stochastically), but also a block time to give the energy system enough time to recharge before renting the commodity out again to a new request. For VehicleCommoditySystems, this block time is placed before each rental, while for BatteryCommoditySystems it is placed after. <mark>explanation of block time placement not clear</mark>.

Since VehicleCommoditySystems can be linked to BatteryCommoditySystems through the scenario parameter "rex_cs" for range extension, VehicleRentalSystems can also populate BatteryRentalSystems with additional processes representing range extension as a use case. Such a process then has a primary and secondary commodity, both of which need to be available for the process to be successful. For each RentalSystem, the primary commodity is the one from that RentalSystem, while the secondary is from the linked one. This results in range extension batteries being treated as primary in the BatteryRentalSystem and as secondary in the VehicleRentalSystem.

Once all stores have been populated with commodities and all processes have been created, the environment is run and determines which processes are successful (i.e. get their required commodities) and which ones fail. The successful processes are then converted to a time based log format for the core energy system optimization to use as input. This contains columns of availability in the energy system(called "<commodity_name>_atbase"), energy consumption while not at base, availability of external AC and DC charging and the Delta SOC ("<commodity_name>_dsoc") of a rental for every commodity and timestep. For VehicleCommoditySystems, this is expanded by a column with the trip distance, as even with a constant consumption this is no more traceable from the energy consumption due to the possibility of range extension. Only if the dispatch of the commodities is left to the optimizer (as opposed to the a priori power scheduling) myopically (i.e. in the "rh" strategy"), the dsoc column is actually transferred to a hard minimum SOC constraint for the optimizer, as all other cases handle this intrinsically.

A Priori Power Scheduling

Dependent on the chosen scheduling method ("mode_scheduling") of a commodity system a charging schedule for the commodity system's commodities is calculated before the linear optimization starts (a priori). This approach is applied to commodities in commodity systems with optimization level of all types of uncoordinated charging ('uc') and rulebased strategies ('equal', 'fcfs', 'soc'). All optimization levels causing an a priori calculation of the commodity's charging power require a unidirectional ('ud') integration level ("lvl_cap").
In addition to the optimization level, rule-based systems may implement a static load management system by defining the maximum available power using the "power_lim_static" parameter. If "power_lim_static" is set to 'None', static load management is disabled, and the system defaults to dynamic load management. For all commodities within uncoordinated or rulebased commodity systems in addition to the charging power when being plugged in at the local energy system the required charging power on-route at external charging infrastructure is calculated. The precomputed charging schedules are then enforced in the linear optimization model by applying them as fixed power constraints to the relevant model flows.

General Approach of A Priori Power Scheduling

The a priori power scheduling process is iterative and operates on a per-timestep basis as the State of Charge (SOC) at each timestep is influenced by the previous timestep. Within a single timestep in a first step the charging powers for all commodities plugged in to the local energy system (column 'atbase' in log file is set to True) are calculated. Initially, the charging power calculation for uncoordinated commodities connected to the local energy system is determined, followed by rulebased commodity systems with static load management. In the next step the remaining available power within the local energy system is allocated to all commodities being part of the dynamic load management. The linear optimization algorithm subsequently handles the allocation of any excess power. Lastly, the external AC and DC charging power is calculated for commodities for which this infrastructure is currently available (indicated by the 'atac' or 'atdc' columns being True in the log file).

Load management system: static vs. dynamic ("power_lim_static")

For rule-based commodity systems, a static power limit can be defined in the scenario file, which restricts the cumulative charging power of all commodities within the system. If no static power limit is set, the commodity system's commodities will be part of a dynamic load management. In this case, the available power within the local energy system is distributed among all commodities which are part of the dynamic load management. The available power is calculated by calculated subtracting the required power of FixedDemand blocks and the power already allocated to all unccordinated commodities and rulebased commodity systems with static load management from the maximum power output of GridConnection, PVSource, WindSource, and ControllableSource blocks. All rulebased commodity systems without a static power limit have to be of the same integration level as they are all controlled by the same dynamic load management system (can be seen as one large commodity system) and the rulebased charging strategy is applied as described. If this integration level is supposed to be 'equal' furthermore all commodity systems have to be connected to the same bus. As a dynamic load management system requires knowledge about the available power within the local energy system for each timestep, it is not possible to combine a dynamic load management system with a StationaryEnergyStorage block as this would require an a priori calculation of the StationaryEnergyStorage's SOC which is not possible in a straight-forward way, due to different prioritization of power sources based on their current opex and the efficiency of the SystemCore.

Charge Scheduling Modes ("mode_scheduling")

External charging

The power for all commodities with available external charging infrastructure (column 'atac' or 'atdc' in log file is set to True) is calculated.

A Posteriori Aging Model (also available for StationaryEnergyStorage)

Simple semi-empirical aging models are implemented for the BatteryCommoditySystem and StationaryEnergyStorage classes. More specifically, these are the Naumann model (publication 1 and publication 2) for LFP batteries and the Schmalstieg model for NMC batteries. They are both contained within the battery.py file and work on superposing calendric and cycle aging. The latter is based on cycling parameters (e.g. depths of discharge) determined using a rainflow algorithm for each horizon.

Results of the aging model (if activated through the scenario file parameter "aging") are evaluated and the capacity degradation applied as a restricted usable SOC window after every horizon. This results in a dependency of the aging model output on the horizon resolution (i.e. length) with the extreme case of the "go" strategy, where only the State of Health at the end of the simulation timeframe is evaluated. Please note that the lifetime used for economic extrapolation of simulation results is not connected to the aging model and sizing the battery block on its results is infeasible due to it being run a posteriori and nonlinearly. Therefore, the aging model's output does not have any influence on the economic results of the simulation, but is only of an informative character.

REVOL-E-TION Outputs

REVOL-E-TION creates a uniquely named (containing the runtimestamp and the scenario file name) result directory for every run. There, the following files are saved (some of them optionally):