Skip to main content

Optimization framework for Daisy

Project description

daisypy-optim

Framework for optimization of Daisy parameters.

Features

  • Optimization using a greedy sequential optimizer, CMA-ES, or Bayesian optimizers
  • Optimization across multiple scenarios
  • Single or multi-objective optimization
  • Optimization of parameters in both .dai and .py files

See doc/examples for examples of how to run optimizations.

See https://github.com/orting/interactive-decision-maps for visualization of multi-objective optimization results.

Overview

The framework can be used in two ways

  1. As a self-contained environment
  2. As a regular python module

Self contained optimization environment

The idea of self-contained environment is to create a repository that contains everything that is needed for the optimization (except the Daisy binary). This allow easy sharing, version control and archiving. This type of optimization is defined by

  • a single dai file template
  • zero or more python file templates
  • a python script that runs the simulation

A tool is included that generates the python script based on user input. Once generated, it can be adapted to specific needs. To start using daisypy-optim this way look at

Regular python modules

To use daisypy-optim as a regular python module. Simply install from pypi with

pip install daisypy-optim

To enable CMA-ES

pip install daisypy-optim[cma]

To enable Ax (this pulls a lot of dependencies)

pip install daisypy-optim[ax]

All of the above

pip install daisypy-optim[cma,ax]

And look at the doc/examples and tests to see how to setup an optimization

Chossing an optimization method

There are several optimization methods available

  • sequential : A greedy approach that fixes one parameter at a time. Works well when optimizing few paramaters.
  • cma : CMA-ES. Works well for larger number of parameters and when the outcome depends strongly on parameter combinations. Does not work for single parameters.
  • ax : Ax. Bayesian optimization. Supports multi-objective optimization.

Continuous/categorical parameters

Both continuous and categorical parameters are supported. Currently, the sequential method treats everything as categorial parameters (by sampling a fixed number of values from the continuous parameters). CMA-ES requires continuous parameters. Ax should wotk with both.

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

daisypy_optim-0.3.0.tar.gz (70.1 kB view details)

Uploaded Source

Built Distribution

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

daisypy_optim-0.3.0-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file daisypy_optim-0.3.0.tar.gz.

File metadata

  • Download URL: daisypy_optim-0.3.0.tar.gz
  • Upload date:
  • Size: 70.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for daisypy_optim-0.3.0.tar.gz
Algorithm Hash digest
SHA256 51c399f9947b184a34b50e7d456c90289467cf333f10532df20e95f43d40d8f6
MD5 374a4a3411e28915c14e25483c4746ba
BLAKE2b-256 3b8ab2b9ed22f17080b2f8cb827b2599cc9bb4f8c7b32b64fcedb0567d0e49d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for daisypy_optim-0.3.0.tar.gz:

Publisher: python-publish.yml on daisy-model/daisypy-optim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file daisypy_optim-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: daisypy_optim-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for daisypy_optim-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 222cc3dc79899eb94131c9618353806e1f49feeed7afb009fc19683b9d8357d0
MD5 a62b2ef022f43cf3f7fe7028a90ea197
BLAKE2b-256 c407c07def987edf86e99114de716c0a4f306e1d980b3d8f10f3586a77c4be4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for daisypy_optim-0.3.0-py3-none-any.whl:

Publisher: python-publish.yml on daisy-model/daisypy-optim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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