Skip to content

0. Getting Started

Samuel edited this page May 30, 2021 · 1 revision

Installation

  1. Install Python. We recommend Anaconda as an easy-to-use environment that includes many basic packages. Anaconda is available for Windows, Mac OS X and GNU/Linux.
  2. Install all necessary packages as listed in requirements.txt. We recommend building a virtual environment for that. Activate the environment and install the packages for example with pip (“pip install -r requirements.txt”) .
  3. Get a solver for linear optimization. ASAM uses PyPSA for various methods that include linear optimization. There are free solvers (Cbc and GLPK) and commercial solvers (Gurobi, CPLEX, FICO Xpress) that run with PyPSA. See the PyPSA website for installation instructions of the solvers. Note that the commercial solvers currently significantly outperform the open-source solvers. For large models open-source solvers may even fail to provide a solution.
  4. Download ASAM scripts from GitHub.

Preparing simulation

  1. Set-up the input data in a .xlsx template. A template can be found here and a description of the input parameters is available in the wiki Input Parameters.
  2. Open the ASAM class “main” and provide the following directories as well as the name of the input file. You can use an editor such as Spyder.
    • Input directory (directory of input excel file and other input files): Idir = r'input_data/'.
    • Output directory: rdir = r'results/'.
    • Filename: iname = 'example_scenario.xlsx'.

Simulation and results.

  1. Execute “Main” to simulate your scenarios. The number of assets, the number of simulated timestamps, and your solver determine the required simulation time. For stylized scenarios a laptop will suffice. For larger studies it is recommended to use a server for the simulations. This enables also parallel simulation of scenarios or sensitivity analyses. We recommend to use cluster methods to reduce the number of simulated timestamps (see e.g. Time Series Aggregation Model ).
  2. Results are stored in various .png figures and in a .xlsx file. Depending on the settings (e.g. including inter-temporal results) the .xlsx may have a size of several 100 MB. The file may be used for further post-processing, such as scenario comparisons.

Clone this wiki locally