Skip to content
/ doe Public

Python package for flexible generation of D-optimal experimental designs

License

Notifications You must be signed in to change notification settings

basf/doe

Repository files navigation

DoE

Warning: DoE is now part of BoFire. This repository is no longer maintained, please use BoFire for the latest version.

DoE is a python package for generating (D-)optimal experimental designs. It uses opti and formulaic for specifying the design space and model.

You can find the documentation here.

Install

DoE can be installed with

pip install git+https://github.com/basf/doe.git

Please make sure to have cyipopt installed. With conda the easiest way to get this package is using

conda install -c conda-forge cyipopt

See this link for more information on other ways to install cyipopt.

Usage

import opti
import doe

problem = opti.Problem(
   inputs = opti.Parameters([opti.Continuous(f"x{i+1}", [0, 1]) for i in range(3)]),
   outputs = [opti.Continuous("y")],
   constraints = [
       opti.LinearEquality(names=["x1","x2","x3"], rhs=1),
       opti.LinearInequality(["x2"], lhs=[-1], rhs=-0.1),
       opti.LinearInequality(["x3"], lhs=[1], rhs=0.6),
       opti.LinearInequality(["x1","x2"], lhs=[5,4], rhs=3.9),
       opti.LinearInequality(["x1","x2"], lhs=[-20,5], rhs=-3)
   ]
)

design = find_local_max_ipopt(problem, "linear")

doe_example


Code contributors

Additional math contributors

  • David Hajnal
  • Jorge Diaz