3. Quick Facts
• Outcome of the ETSAP R&D Project “Open source TIMES Excel
Reader” (finished April 2024)
• Based on times-excel-reader started at Microsoft
• Enables the use of Excel-based TIMES models in a non-
interactive, automatable, and reproducible manner
• Available via pip and on https://github.com/etsap-times/xl2times
4. Functionality Overview
Model files
xl2times
ts.dd
milestonyr.dd
output.dd
• Generation of GAMS input files
• Automated comparison with
“ground truth” (e.g. to assess
interpretation accuracy of
existing models)
• Generation of textual
representation of model data
in Excel files (used by the
TIMES-NZ team)
5. Development Approach
• Automated regression testing
on DemoS 01-12, TIM and
TIMES-NZ models (with every
pull request).
• Manual testing on proprietary
or really big models (e.g.
TIMES-GEO)
• Over 90% accuracy on most
tested models
6. Recent updates
• ca. 70 PR since the initial release:
https://github.com/etsap-TIMES/xl2times/compare/v0.1.0...v0.3.0
• Improvements include:
• Performance (e.g. allowed including TIMES-NZ in benchmarks)
• Accuracy (e.g. all DemoS are ~100%)
• Usability (e.g. different level of logging)
• Special in version 0.3.0:
• Exposure of TimesModel object (e.g. for using in Jupyter Notebooks)
• Separation of the *.dd creation step (e.g. can be supplemented by other
formats)
8. TimesModel for Scenario Analysis
Use xl2times to
generate
TimesModel from
*.xlsx files
Make changes to
TimesModel in a
python script or
Jupyter Notebook
Generate *.dd
files, run GAMS
and analyse the
results
9. Demonstration
• A basic example is available with xl2times:
https://github.com/etsap-
TIMES/xl2times/blob/main/tests/notebook-demo.ipynb
• It can be experimented with on Google colab:
https://colab.research.google.com/github/etsap-
TIMES/xl2times/blob/main/tests/notebook-demo.ipynb
• Or locally…
10. Possible API extensions
• Ease of use
• TimesModel.add_process()
• TimesModel.add_commodity()
• TimesModel.add_attribute()
• TimesModel.add_constraint()
• …
• The method could include
• Default values
• Data input feedback
• Validation
11. Benefits
• Create a transparent record of the steps necessary to carry out a
specific scenario analysis
• No clatter added to the core model
• Easy to reproduce the analysis (incl. with a different model version)
• Documentation of the analysis
• Allow users without familiarity of Veda to carry out the analysis
• Leverage preexisting skills in python and/or pandas
• Start working on the study right away (i.e. without learning new software)
• Orchestrate (programmatically) advanced scenario analysis
12. Getting started / Contributing / Ideas
• Bulk test your TIMES model (guide available on
https://xl2times.readthedocs.io)
• Submit issues to https://github.com/etsap-TIMES/xl2times/issues
• Open PRs with code improvements
• Contribute ideas / code to develop the API
• Develop a package for passing various TIMES settings/options
• Try it with LLMs (e.g. https://github.com/cdgaete/pypsa-mcp)
• Reach out!