Import scripts

The easiest way to create a new context is to duplicate an existing one in the long term view.

Import scripts can also be used to create a context by importing a scenario from the database. Assets will be created according to the asset list and their parameters values in this scenario.

Import script are useful in particular to :

  • create contexts with only a few countries or with agregated regions.
  • choose a list of test cases corresponding to historical years for demand and RES time series
  • choose the level of details for the model of assets (see the behaviors section in the library documentation page)

To run an import script, open the Scripting menu at the top left of the screen, open the Console. Then in the File menu, load a script from the list of delivered scripts. Check parameters and change them if necessary (in particular the new context name) before clicking on the green arrow to run the script. Information will be logged in the console.

After importing, a new context box will appear in the main view.

import_gas

A specific top-level import script has been created to import gas scenarios. It has exactly the same structure as the import_scenario_template.py script, but with some predefined parameter values that are used for gas model.

For instance, the granularity of simulation is daily, with a single optimization problem of one year, and the temporal DataBase paths are set to the specific folders used for gas temporal data.

import_power_system

A specific top-level import script has been created to import power system scenarios. It has a similar structure as the import_scenario_template.py, but with additional import parameters used to change some asset parameters before the context creation.

Thanks to these specific parameters, additional behaviors can be activated:

  • useFuelModel: Fuel consumption is explicitly modeled for power plants
  • useReserveModel: Activate the reserve production for all assets. Need to be set to True when power reserve is modelled
  • useClusterModel: Enable cluster model, allowing to take into account dynamic constraints and starting costs
  • useGradients: Enable gradient constraints for energy production
  • useResMustRunModel: Power renewable production is fatal, then RES assets always produce at their maximal available capacity
  • usePmaxInPmaxOut: Use distinct input and output capacities for hydro assets (Hydro fleet and Pumped storage fleet)

import_power_system_with_demand_decomposition_by_end-use

A specific top-level import script has been created to import power system scenarios with power demand decomposed by end-use. It has a similar structure as the import_scenario_template.py, but with additional import parameters used to change some asset parameters before the context creation.

Thanks to these specific parameters, additional behaviors can be activated:

  • useFuelModel: Fuel consumption is explicitly modeled for power plants
  • useReserveModel: Activate the reserve production for all assets. Need to be set to True when power reserve is modelled
  • useClusterModel: Enable cluster model, allowing to take into account dynamic constraints and starting costs
  • useGradients: Enable gradient constraints for energy production
  • useResMustRunModel: Power renewable production is fatal, then RES assets always produce at their maximal available capacity
  • usePmaxInPmaxOut: Use distinct input and output capacities for hydro assets (Hydro fleet and Pumped storage fleet)

There is also a dedicated part for power demand assets:

  • useDemandModule: If set to True, the power demand is decomposed by end-use
  • useFlexibleDemandAsset: If set to True, all possible flexible end-uses are flexible (smart recharge for electric vehicles and sanitary hot water, smart thermal storage for heat pumps, ...)

import_scenario_template

This script allows to import scenario with a standard format:

  • One to four import Excel files:

    • assets.xlsx
    • contracts.xlsx
    • transmissions.xlsx
    • modelObjects.xlsx

    They are not compulsory, and the user have the possibility to import a subset of these files.

  • A single temporal DataBase (with a single source tag)

This script is divided in two files:

  • import_scenario_template.py for the import parameters definition
  • execution_scenario_template.py to fetch data from the DataBase and create the context