Skip to content

Create your scenario

Babu Kumaran Nalini edited this page Nov 5, 2020 · 7 revisions

The term scenarios in OpenTUMflex mean cases or examples.

  • For example, we have created a scenario called scenario_residential_house. This is just an example case where OpenTUMflex runs flexibility calculation for a household with a PV, BSS and HP.

  • You can create scenarios of your own or modify/use the existing scenarios. The file inside OpenTUMflex->Scenario->scenario.py serves as the main file to decide which scenarios are available.

Methods to create a new scenario:

There are two ways to create a new scenario (example).

Using .xlsx/.csv:

  • Inside the input folder, we have added an example .xlsx file to understand the input format.
  • Modify the excel cells based on your scenario.
  • Add zeros to parameters in case the device is unavailable in your scenario.
  • Point the input directory variable input_file=Path to the input .xlsx/.csv
  • Make sure to use opentumflex.scenario_fromfile as the argument while calling run_scenario function. This will automatically consider the scenario present in the file.
  • In order to speed up the total time, we have the option to use CSV. In case you wish to use CSV, we have added an option to save the XLSX file as CSV. More details are available here.
  • Remember this method uses both the sheets available in the .xlsx namely properties and time_series.
  • This method is useful if you wish to run OpenTUMflex for a single case study.

Using functions:

  • Create a new function inside OpenTUMflex->Scenario->scenario.py. As an example, let's say the function name is scenario_happyhouse.
  • Make sure to use opentumflex.scenario_happyhouse as the argument while calling the run_scenario function.
  • It is also possible to test/use the other example scenario functions that we have already created.
  • Remember this method also uses the input file but only the time_series sheet. In case you wish to change the input time series data then it must be done in the .xlsx/.csv input file.
  • This method is useful during analysis when you wish to change the device parameters iteratively.
Clone this wiki locally