Skip to main content

Everest optimization algorithms for Python

Project description

everest-optimizers

The everest-optimizers repository aims to replace the carolina repository by implementing the two algorithms OPTPP_Q_NEWTON and CONMIN_MFD from Dakota. This removes the need of building Dakota through Carolina every time you need to use these two algorithms. Dakota is huge and quite cumbersome to build, so by replacing this dependency we can gain a lot of time.

Note

History starting from 14cb0a7ef00fa56c19f8a3956785b8c6bdbf2cbd and older were filtered to delete all files/folders under dakota-packages except OPTPP.

Getting Started

CONMIN

To call the CONMIN implementation, we go through the python interface that we have made. Both CONMIN and OPTPP should be called using the minimize() function.

Example:

result = minimize(
    fun=obj,
    x0=x0,
    method="conmin_mfd",
    bounds=bounds,
    constraints=constraints,
    options={"ITMAX": 100},
)

Installation

  1. (Optional) We recommend using a virtual enviroment. This can be created and activated by one of the following approaches:
  • Using uv:
uv venv
source .venv/bin/activate
  • Without uv:
python3 -m venv venv
source venv/bin/activate
  1. Install the project:
pip install .[test]

Alternative installation via Docker

Alternatively, you can use Docker to build and run the project with all dependencies:

# Build the Docker image
docker build -t everest-optimizers .

# Run the container to execute tests
docker run everest-optimizers

This approach automatically sets up all required dependencies and runs the tests in an isolated environment.

Running the tests

To run tests, execute one of the following commands:

  • Recommended:
pytest tests
  • All tests (this is not recommended as there are existing tests in Trilinos which are not working):
pytest
  • One specific test file:
pytest path/to/your_file.py
  • One specific test in a file:
pytest path/to/your_file.py::name_of_test

If you want to add print statements / see the print statements in the terminal, you should run with the -s:

pytest tests -s

Linting and Formatting

Python:

  • We use ruff for python linting. To install ruff, use:
pip install ruff
  • To run ruff, do the following commands:
ruff format .
ruff check --select ALL
  • To only run ruff on a select folder or file, do these commands (example):
ruff format src/
ruff check src/

ruff format src/everest_optimizers_utils/dummy_implementation.py
ruff check src/everest_optimizers_utils/dummy_implementation.py

C++:

  • We use clang-format for c++ formatting. Install clang-format like this:
sudo apt install clang-format
  • To format a c++ or c file (or header file), use
clang-format -i your_file.cpp
  • You can run the following command to format all files in your project!
find . -regex '.*\.\(cpp\|hpp\|cc\|c\|h\)' -exec clang-format -i {} +

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

everest_optimizers-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

everest_optimizers-0.3.0-cp314-cp314-macosx_15_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

everest_optimizers-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

everest_optimizers-0.3.0-cp313-cp313-macosx_15_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

everest_optimizers-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

everest_optimizers-0.3.0-cp312-cp312-macosx_15_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

everest_optimizers-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

everest_optimizers-0.3.0-cp311-cp311-macosx_15_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file everest_optimizers-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d22a5969f606a4c15a92c24ccdea0511f7c583df6fd7e2b71ea8b23bd6d16d1b
MD5 e22de0d6ec0f3de34308665c305a24ae
BLAKE2b-256 eb8e4b7df4bf7571b515f0162ab81203f448bf471c8bd1dfb4a9659c2dfba609

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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

File details

Details for the file everest_optimizers-0.3.0-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e8b928c4d5d99fa5fd389a8dd383d1f69989b5ef0f0e5a1d8dfb254373a2feaf
MD5 aba819fca4e34064af828b6fa4e6b71f
BLAKE2b-256 11cb1ae09a9428f9ee681ead8df09ef445b254e31bcc8a0e2893e55c7f76b6f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp314-cp314-macosx_15_0_arm64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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

File details

Details for the file everest_optimizers-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ccf82ccc564b117ce61f8e29ca230064606723052ffaf4ec41d72de7d92fe53a
MD5 fdc49626f73916c12152895d00a86df7
BLAKE2b-256 f653ab62568a228b7c22efb111fbb4526dc2f915ad916cb9c8b5048d3ba53073

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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

File details

Details for the file everest_optimizers-0.3.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0b43464ab60c68c0b2a19a917f97d22f587329e23301bc78d1fa172e64d93ed6
MD5 12ea708bd92e53bdfe4bc1ebbdb0331c
BLAKE2b-256 c6f54103fadbc31af49d4932195b89fa921a08e69824b095f343be615bffa9ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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

File details

Details for the file everest_optimizers-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d2cb0b236e80b495cb740a7a873e7b26b4130f6f371865888da726b8e46869e4
MD5 8086090010f458ed586cc046be276b6d
BLAKE2b-256 1342489903879be10ecbdb6ebdbea66aeae5e659cadd97d4b9dace9cf7432ab2

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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

File details

Details for the file everest_optimizers-0.3.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9a5ca89315164696933bf5c981618f42e2b735787dc6ba3385bdfd6d0fec5686
MD5 77b6972a93475354f6fb571a4f07c6b6
BLAKE2b-256 b0a4f7125517885ca299c3f363ae3e7351d6cb6552fb9bce11d400ca5de8fc32

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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

File details

Details for the file everest_optimizers-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fc55f13fc8ca3d06f693695b864ae492d5b18134832d97885fdc692fe193509
MD5 54f21bd127c2d3f9ad0cdd88b93b8242
BLAKE2b-256 79a3980c2bf67a8e8b161eb6838f9b68ebe8dfdf661afc3fa8b849e7ab8875dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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

File details

Details for the file everest_optimizers-0.3.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for everest_optimizers-0.3.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3c650f518f7beb67de9b41a8e4cc01afbef660113d23283daa7a63cfe6317274
MD5 f7eb42d824b3c1c1dfe22b0936426890
BLAKE2b-256 4a0b9fc2532b078253fd20b3d1488b3cd8e022f70f2bcab9531f7c12d6fee3c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for everest_optimizers-0.3.0-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: publish.yml on equinor/everest-optimizers

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