Skip to main content

Fraunhofer IWES optimization tools in Python

Project description

iwopy

Fraunhofer IWES optimization tools in Python

Overview

The iwopy package is in fact a meta package that provides interfaces to other open-source Python optimization packages out there. Currently this includes

iwopy can thus be understood as an attempt to provide the best of all worlds when it comes to solving optimization problems with Python. Obviously all the credit for implementing the invoked optimizers goes to the original package providers.

The basic idea of iwopy is to provide abstract base classes, that can be concretized for any kind of problem by the users, and the corresponding solver interfaces. However, also some helpful problem wrappers and an original optimizer are provided:

  • Problem wrapper LocalFD: Calculates derivatives by finite differences
  • Problem wrapper RegularDiscretizationGrid: Puts the problem on a Grid
  • Optimizer GG: Greedy Gradient optimization with constraints

All calculations support vectorized evaluation of a complete population of parameters. This is useful for heuristic approaches like genetic algorithms, but also for evaluating gradients. It can lead to a vast speed-up and should be invoked whenever possible. Check the examples (or the API) for details.

Documentation: https://fraunhoferiwes.github.io/iwopy.docs/index.html

Source code: https://github.com/FraunhoferIWES/iwopy

PyPi reference: https://pypi.org/project/iwopy/

Requirements

The supported Python versions are:

  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10

Installation

Virtual Python environment

We recommend working in a Python virtual environment and install iwopy there. Such an environment can be created by

python -m venv /path/to/my_venv

and afterwards be activated by

source /path/to/my_venv/bin/activate

Note that in the above commands /path/to/my_venv is a placeholder that should be replaced by a path to a (non-existing) folder of your choice, for example ~/venv/iwopy.

All subsequent installation commands via pip can then be executed directly within the active environment without changes. After your work with iwopy is done you can leave the environment by the command deactivate.

Standard users

As a standard user, you can install the latest release via pip by

pip install iwopy

This in general corresponds to the main branch at github. Alternatively, you can decide to install the latest pre-release developments (non-stable) by

pip install git+https://github.com/FraunhoferIWES/iwopy@dev#egg=iwopy

Developers

The first step as a developer is to clone the iwopy repository by

git clone https://github.com/FraunhoferIWES/iwopy.git

Enter the root directory by cd iwopy. Then you can either install from this directory via

pip install -e .

Alternatively, add the iwopy directory to your PYTHONPATH, e.g. by running

export PYTHONPATH=`pwd`:$PYTHONPATH

from the root iwopy directory, and then

pip install -r requirements.txt

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

iwopy-0.0.15.tar.gz (44.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iwopy-0.0.15-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file iwopy-0.0.15.tar.gz.

File metadata

  • Download URL: iwopy-0.0.15.tar.gz
  • Upload date:
  • Size: 44.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for iwopy-0.0.15.tar.gz
Algorithm Hash digest
SHA256 881b336d9e688c17f1c9fa5ba69b2b817dae3e3bf44c100d79733ec3b38b34ac
MD5 e3e4ca7dd645dbcf8468656084106eea
BLAKE2b-256 59d4be825cdb2f0d70161e2982e22dde343ef5ffc2149e0b4e11bd2b51b5acf0

See more details on using hashes here.

File details

Details for the file iwopy-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: iwopy-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for iwopy-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 287a61c1861b34cff320ef3d20b884fc7b1ddb3b85a69d1b73f048ceac29dc4e
MD5 ce3508ef0ca175f3a5124222ec735130
BLAKE2b-256 83f18edab78e149bb81e141253f92866f75af1c59eea12810aeb967ec3d9442f

See more details on using hashes here.

Supported by

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