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.4.0.tar.gz (75.0 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.4.0-py3-none-any.whl (53.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: daisypy_optim-0.4.0.tar.gz
  • Upload date:
  • Size: 75.0 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.4.0.tar.gz
Algorithm Hash digest
SHA256 a82a5d5aa383802032504d9a96ecf61ccb48a8291230fbf434e0cdf5875b1288
MD5 53b8ad835ac67b24d3deb316d9bc3148
BLAKE2b-256 3bb003360d61fc12a97933a500b63e91848a3e814d0b3f84c36cb17e5d9e65df

See more details on using hashes here.

Provenance

The following attestation bundles were made for daisypy_optim-0.4.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: daisypy_optim-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 53.5 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c280e36531f11bbfe59b32e4e30da10dae2f534e1a4f4e6667c31f3fd4aec268
MD5 1bd880689f09afaf0d83cf53b6a66a68
BLAKE2b-256 c0ef37c94dc689d079fb72fce46ec7435b40d796b3d5672eec3707048478d01d

See more details on using hashes here.

Provenance

The following attestation bundles were made for daisypy_optim-0.4.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