Skip to content

Commit

Permalink
Design optimization plugin update
Browse files Browse the repository at this point in the history
Added Bayesian optimization, genetic algorithms, and particle swarm
optimization methods
Removed MethodRandom and MethodRandomCustom as had become redundant
Expanded DesignSpace with new support methods estimate_cost and
summarize
Redesigned interface with plugin to make it easier for users to batch
simulations for different design search methods
Automated batching of simulations when user provides pre and post
processing functions
Expanded testing for all new features
  • Loading branch information
m-bone committed Sep 17, 2024
1 parent d12ace8 commit 8e5af1f
Show file tree
Hide file tree
Showing 14 changed files with 3,748 additions and 1,963 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added convenience functions `from_terminal_positions` and `from_circular_path` to simplify setup of `VoltageIntegralAxisAligned` and `CustomCurrentIntegral2D`, respectively.
- Added `axial_ratio` to `DirectivityData.axial_ratio` for the `DirectivityMonitor`, defined as the ratio of the major axis to the minor axis of the polarization ellipse.
`ComponentModeler.batch_data` convenience property to access the `BatchData` corresponding to the component modeler run.
- Added optimization methods to the Design plugin. The plugin has been expanded to include Bayesian optimization, genetic algorithms and particle swarm optimization. Explanations of these methods are available in new and updated notebooks.
- Added new support functions for the Design plugin: automated batching of `Simulation` objects, and summary functions with `DesignSpace.estimate_cost` and `DesignSpace.summarize`.

### Changed
- Priority is given to `snapping_points` in `GridSpec` when close to structure boundaries, which reduces the chance of them being skipped.
Expand Down
Binary file added docs/_static/img/design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions docs/api/plugins/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ Design Space Exploration
:toctree: ../_autosummary/
:template: module.rst

tidy3d.plugins.design.Parameter
tidy3d.plugins.design.ParameterFloat
tidy3d.plugins.design.ParameterInt
tidy3d.plugins.design.ParameterAny
tidy3d.plugins.design.Method
tidy3d.plugins.design.MethodGrid
tidy3d.plugins.design.MethodMonteCarlo
tidy3d.plugins.design.MethodRandomCustom
tidy3d.plugins.design.MethodRandom
tidy3d.plugins.design.MethodBayOpt
tidy3d.plugins.design.MethodGenAlg
tidy3d.plugins.design.MethodParticleSwarm
tidy3d.plugins.design.DesignSpace
tidy3d.plugins.design.Results
tidy3d.plugins.design.Result
3,077 changes: 1,664 additions & 1,413 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ jax = { version = "0.4.25", extras = [
"cpu",
], source = "jaxsource", optional = true }

# design
bayesian-optimization = { version = "*", optional = true }
pygad = { version = "3.3.1", optional = true }
pyswarms = { version = "*", optional = true }

# scikit-rf
scikit-rf = { version = "*", optional = true }

Expand Down Expand Up @@ -104,13 +109,13 @@ signac = { version = "*", optional = true }
flax = { version = ">=0.8.2", optional = true }
sax = { version = "^0.11", optional = true }
vtk = { version = ">=9.2.6", optional = true }
pyswarms = { version = "*", optional = true }
sphinxemoji = { version = "*", optional = true }
devsim = { version = "*", optional = true }
cma = { version = "*", optional = true }

[tool.poetry.extras]
dev = [
'bayesian-optimization',
'bump-my-version',
"coverage",
'dill',
Expand All @@ -133,6 +138,7 @@ dev = [
'optax',
'pre-commit',
'pydata-sphinx-theme',
'pygad',
'pylint',
'pyswarms',
'pytest',
Expand Down
Loading

0 comments on commit 8e5af1f

Please sign in to comment.