Skip to main content

pyGOBLET: A Python Global Optimization Benchmarking Library for Evaluation and Testing

pyGOBLET is a Python package for benchmarking global optimization algorithms.

Features

  • A large collection of standard benchmark functions
  • Benchmark functions inspired by real-world energy applications
  • Tools for running solvers on benchmark problems
  • Postprocessing tools for analyzing benchmark results
  • Example scripts and tutorials demonstrating library usage

Installation

Install from source:

pip install pygoblet

Available Problems

pyGOBLET includes standard benchmark problems and real-world inspired problems:

  • Standard benchmark problems: pygoblet.problems.standard
  • FLORIS wind farm optimization problems: pygoblet.problems.floris

Function Classification

Each standard benchmark function is tagged with one or more classification tags, which are used to organize and filter the available functions. The tags include:

  • Unconstrained / Constrained: Whether the function has constraints
  • Multimodal / Unimodal: Number of local/global minima
  • Continuous / Discontinuous: Whether the function is continuous - functions with sharp ridges or drops are classified as discontinuous
  • Differentiable / Non_differentiable: Whether the function is differentiable
  • Separable / Non_separable: Whether the function can be separated into independent subproblems
  • 1D, 2D, nD: Dimensionality of the function

You can access groups of functions by tag using the get_standard_problems function:

import pygoblet

# All 2D functions
problems = pygoblet.get_standard_problems(["2D"])

# All problems that are multimodal, unconstrained, and n-Dimensional
problems = pygoblet.get_standard_problems(["Multimodal", "Unconstrained", "nD"])

Usage

Accessing Benchmark Functions

The pygoblet.problems.standard module provides standard benchmark functions for testing solvers. For example:

import pygoblet

# Create an Ackley function instance in 2D
ackley = pygoblet.problems.standard.Ackley(2)

# Evaluate at a point
x = [0.5, -0.3]
result = ackley.evaluate(x)
print(f"f({x}) = {result}")

# Get problem information
print(f"Minimum value: {ackley.min()}")
print(f"Minimizer: {ackley.argmin()}")
print(f"Bounds: {ackley.bounds()}")

Benchmarking a Solver

import scipy.optimize as opt
import pygoblet
from pygoblet.optimizer import BaseOptimizer, OptimizationResult

# Select test problems
problems = pygoblet.get_standard_problems(["2D", "Unconstrained"])

# Define solver to benchmark
class DualAnnealing(BaseOptimizer):
    deterministic = False
    n_points = 0
    def optimize(self, func, bounds, x0=None, constraints=None, **kwargs):
        result = opt.dual_annealing(func, bounds, **kwargs)
        return OptimizationResult(result.x, result.fun, algorithm="Dual Annealing")

solvers = [DualAnnealing()]

# Run benchmark and generate COCO data
pygoblet.run_solvers(solvers, problems, test_dimensions=[2, 4, 5, 8, 10, 12], n_iters=5)

# Run postprocessing
pygoblet.postprocessing.postprocess_data(["output_data/DualAnnealing"], energy_file="output_data/energy_data.csv")

Documentation

Complete documentation is available at https://pages.github.com/NREL/pyGOBLET/.

Contributing

Contributions are welcome! Please open issues or pull requests for bug fixes, new features, or improvements.

License

This project is licensed under the BSD-3-Clause License.


NREL Software Record number: SWR-25-118

Metadata

Release files for pygoblet 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygoblet 0.1.0
File Size Uploaded
pygoblet-0.1.0.tar.gz 42.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pygoblet 0.1.0
File Interpreter ABI Platform
pygoblet-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 84.3 kB

Release files / pygoblet-0.1.0.tar.gz

Download URL pygoblet-0.1.0.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8669af8a6d892cc6f5d6c13f8000e1daad51943a063b1ec1a6c17a1471615261
BLAKE2b-256 checksum
How to use checksums
27dd7d68c1d366a58df8359456978a111b63c5c8c3a28b278b8a1b54df7eb13e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2025.

Transparency log

Release files / pygoblet-0.1.0-py3-none-any.whl

Download URL pygoblet-0.1.0-py3-none-any.whl
Size 41.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
058477928db4b2afc4335c9bffb543bc22545fcfaa05a1bab88904401387f59b
BLAKE2b-256 checksum
How to use checksums
24dcdc324519601fa9b745e57bbdb1ae3d42125ba6a2950cfc082dacc5880744
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page