Skip to main content

Bayesian optimization of particle packing fractions.

Project description

Bayesian Optimization of Particle Packing Fractions (BOPPF)

DOI

Bayesian optimization of particle packing fractions for solid rocket propellant fuels. The objective function (not released here) is based on proprietary code from Northrop Grumman Innovation Systems (NGIS).

To reproduce, this requires a proprietary Windows executable (renamed to particle_packing_sim.exe) and Python functions contained in an unreleased module named proprietary.m for writing the input files and reading the volume fraction from the output files. These files should be placed into the boppf/utils directory.

Installation

A local installation can be performed via:

conda create -n packing python==3.9.*
conda activate packing
git clone https://github.com/sparks-baird/bayes-opt-particle-packing.git
cd bayes-opt-particle-packing
conda install flit
flit install --pth-file

Usage

The following is based on boppf_example.py, which can be run via python examples/boppf_example.py

First, take care of imports.

from boppf.boppf import BOPPF
from boppf.utils.data import load_data

Define how many pseudo-random initial Sobol points to generate (n_sobol, typical is twice the number of parameters), the number of Bayesian optimization iterations n_bayes, and the number of particles to drop in each simulation (particles).

n_sobol = 10
n_bayes = 40
particles = int(2.5e4)

Instantiate the BOPPF class, and call the optimize method.

boppf = BOPPF(n_sobol=n_sobol, n_bayes=n_bayes, particles=particles)
best_parameters, means, covariances, ax_client = boppf.optimize(np.array([]), np.array([]), return_ax_client=True)

The Ax experiment object and a tabular summary are saved to the results directory.

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

boppf-0.1.0.tar.gz (1.1 MB view hashes)

Uploaded Source

Built Distribution

boppf-0.1.0-py3-none-any.whl (20.6 kB view hashes)

Uploaded Python 3

Supported by

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