Skip to main content

Python tools for the electricity market model AMIRIS

Project description

PyPI version PyPI license pipeline status

AMIRIS-Py

Python tools for the electricity market model AMIRIS.

Installation

pip install amirispy

You may also use pipx. For detailed information please refer to the official pipx documentation.

pipx install amirispy

Further Requirements

In order to execute all commands provided by amirispy, you also require a Java Development Kit (JDK). JDK must be installed and accessible via your console in which you run amirispy.

To test, run java --version which should show your JDK version (required: 11 or above). If java command is not found or relates to a Java Runtime Environment (JRE), please download and install JDK (e.g. from Adoptium)

Usage

Currently, there are three distinct commands available:

  • amiris install: installation of the latest AMIRIS version and examples to your computer
  • amiris run: perform a full workflow by compiling the .pb file from your scenario.yaml, executing AMIRIS, and converting results
  • amiris batch: perform multiple runs each with scenario compilation, AMIRIS execution, and results extraction
  • amiris comparison: compare the results of two different AMIRIS runs to check them for their equivalence

You may also use the arguments as a list of strings in your script directly, e.g.

from amirispy.scripts import amiris_cli

amiris_cli(["install", "-m", "model"])

amiris install

Downloads and installs the latest open access AMIRIS instance and accompanying examples.

Option Action
-u or --url URL to download AMIRIS from (default: latest AMIRIS artifact from https://gitlab.com/dlr-ve/esy/amiris/amiris
-t or --target Folder to install amiris-core_<version>-jar-with-dependencies.jar to (default: ./)
-f or --force Force install which may overwrites existing AMIRIS installation of same version and existing examples (default: False)
-m or --mode Option to install model and examples all (default), only model, or only examples

amiris run

Compile scenario, execute AMIRIS, and extract results.

Option Action
-j or --jar Path to amiris-core_<version>-jar-with-dependencies.jar
-s or --scenario Path to a scenario yaml-file
-o or --output Directory to write output to, defaults to "./results"
-oo or --output-options Optional arguments to override default output conversion arguments of fameio
-nc or --no-checks Skip checks for Java installation and correct version to increase speed

amiris batch

Perform multiple runs - each with scenario compilation, AMIRIS execution, and results extraction

Option Action
-j or --jar Path to amiris-core_<version>-jar-with-dependencies.jar
-s or --scenarios Path to single or list of: scenario yaml-files or their enclosing directories
-o or --output Directory to write output to
-r or --recursive Option to recursively search in provided Path for scenario (default: False)
-p or --pattern Optional name pattern that scenario files searched for must match
-nc or --no-checks Skip checks for Java installation and correct version to increase speed

amiris compare

Compare if results of two AMIRIS runs and equivalent.

Option Action
-e or --expected Path to folder with expected result .csv files
-t or --test Path to folder with results files (.csv) to test for equivalence
-i or --ignore Optional list of file names not to be compared

Help

You reach the help menu at any point using -h or --help which gives you a list of all available options, e.g.:

amiris --help

Logging

You may define a logging level or optional log file as first arguments in your workflow using any of the following arguments:

Option Action
-l or --log Sets the logging level. Default is error. Options are debug, info, warning, warn, error, critical.
-lf or --logfile Sets the logging file. Default is None. If None is provided, all logs get only printed to the console.

Example: amiris --log debug --logfile my/log/file.txt install

Cite AMIRIS-Py

If you use AMIRIS-Py for academic work, please cite:

Christoph Schimeczek, Kristina Nienhaus, Ulrich Frey, Evelyn Sperber, Seyedfarzad Sarfarazi, Felix Nitsch, Johannes Kochems & A. Achraf El Ghazi (2023). AMIRIS: Agent-based Market model for the Investigation of Renewable and Integrated energy Systems. Journal of Open Source Software. doi: 10.21105/joss.05041

Contributing

Please see CONTRIBUTING.

Available Support

This is a purely scientific project by (at the moment) one research group. Thus, there is no paid technical support available.

If you experience any trouble with AMIRIS, you may contact the developers at the openMod-Forum or via amiris@dlr.de. Please report bugs and make feature requests by filing issues following the provided templates (see also CONTRIBUTING). For substantial enhancements, we recommend that you contact us via amiris@dlr.de for working together on the code in common projects or towards common publications and thus further develop AMIRIS.

Acknowledgement

Work on AMIRIS-Py was financed by the Helmholtz Association's Energy System Design research programme.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amirispy-2.2.1.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

amirispy-2.2.1-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file amirispy-2.2.1.tar.gz.

File metadata

  • Download URL: amirispy-2.2.1.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Windows/10

File hashes

Hashes for amirispy-2.2.1.tar.gz
Algorithm Hash digest
SHA256 460addc1afe0e15dc7e0de823cc988e00ef5ec9a25262b1200f0e2bf314e2597
MD5 4d3abdfa180cb5cc70afa3af2b285a05
BLAKE2b-256 9da2372f4e60d1aefad3e2357c7082f1edcf4b02d6b6cd409dc1bf71c9b9c239

See more details on using hashes here.

File details

Details for the file amirispy-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: amirispy-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Windows/10

File hashes

Hashes for amirispy-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db973c4c08b99a728a72f685e6190922aedb288fb90e75ec5feffd681a872726
MD5 825e0c9608b175a4ae245e26be93e1d4
BLAKE2b-256 444f25302071bc96b3bc0e3933ab321e8165d2c61ca6b3c14c18c23af0ba01ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page