Skip to content

Commit

Permalink
Add Joss paper (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscaAlves authored Feb 22, 2024
1 parent 2eaccea commit 62dd692
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 19 deletions.
48 changes: 29 additions & 19 deletions docs/joss_paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,56 @@ affiliations:
index: 1
- name: Institute of Science and Innovation in Mechanical and Industrial Engineering, Porto, Portugal
index: 2
date: 7 February 2024
date: 22 February 2024
bibliography: references.bib

---

# Summary
`piglot` is an open-source Python tool taylored for the automated optimisation of responses stemming from numerical solvers. With this tool we aim at providing a simple and user-friendly interface which is also easily extendable, allowing intergration with other solvers within the community. `piglot` provides a versatile solution for solving inverse problems on several research areas, such as structural analysis, material modelling, fluid dynamics, control systems or astrophysics, using, for instance, finite element analysis, spectral methods or Monte Carlo methods. The primary emphasis is on derivative-free optimisation, ensuring compatibility with black-box solvers in scenarios where gradient information is not available, and cases where the function evaluations may be noisy.
`piglot` is an open-source Python tool tailored for the automated optimisation of responses stemming from numerical solvers.
This tool aims to provide a simple and user-friendly interface that seamlessly integrates with a spectrum of community solvers, ensuring effortless extension.
`piglot` emerges as a versatile toolkit for tackling inverse problems spanning diverse research domains, such as structural analysis, material modelling, fluid dynamics, control systems, and astrophysics - fields where methodologies such as finite element analysis, spectral methods, and Monte Carlo simulations are often adopted.
The primary emphasis is on derivative-free optimisation, ensuring compatibility with black-box solvers in scenarios lacking gradient information and when function evaluations may be noisy.



![Logo of `piglot`. \label{fig:piglot_logo}](../source/media/logo.svg){width=35%}

# Statement of need

The increasingly growing interest in computational analysis for engineering problems has been driving the development of more accurate, robust and efficient methods and models.
With the advent of this technology, the application of the so-called inverse problems has been gaining traction over the last years, where one seeks optimised parameters, geometries, configurations or models for numerical problems arising in engineering.
In this context, in the past years, some packages have been developed to automate the identification of parameters [@nevergrad,@optuna_2019].
These packages, however, do not provide an interface for different solvers, so the optimisation of numerical responses is not readily available.
With the advent of this technology, the application of the so-called inverse problems, where one seeks optimised parameters, geometries, configurations or models for numerical problems arising in engineering, has been gaining traction over the last years.
In this context, in the past years, some packages have been developed to automate the identification of parameters [@nevergrad; @optuna_2019], which have been widely applied in many areas.
However, for many applications, the upfront cost of implementing interfaces for these tools is prohibitive, and specific-purpose tools are preferred to these highly flexible frameworks.
Particularly in the scope of structural analysis, quickly identifying parameters of numerical models from experimental data is of utmost importance.
While commercial tools are available for this task [@hyperfit], to the authors' best knowledge, an open-source package to this end is still lacking.

In this work, we present `piglot` an open-source Python package for automated optimisation of numerical responses, such as responses stemming from finite element simulations.
In particular, focus is placed on derivative-free optimisation, to allow compatibility with black-solvers where gradient information may be unavailable.
In this context an extensible interface for coupling with physics solvers is provided.
In this context, an extensible interface for coupling with physics solvers is provided, encouraging contributions from the community to the package.
As long as the solver can return a time-response for the fields of interest, it is possible to optimise it with `piglot`.
Notwithstanding, some solvers are already provided, namely a solver for fitting analytical functions, a solver for the in-house finite element code `Links`, a solver for the finite element software `Abaqus`, and a solver for the clustering-based reduced-order model `CRATE` package [@Ferreira2023].
Currently, interfaces for several solvers are included in the package, namely a solver for fitting analytical functions, and interfaces for our in-house finite element code `Links` (derived from HYPLAS), for the commercial finite element software `Abaqus`, and the open-source clustering-based reduced-order model `CRATE` package [@Ferreira2023].

For the optimisation itself, several optimisation methods are implemented and available, such as DIRECT, LIPO, Bayesian optimisation, among others.
Particularly, a significant effort has been employed into Bayesian optimisation algorithms, backed with an open-source implementation [@balandatBoTorchFrameworkEfficient2020] and allowing for single- and multi-objective optimisation of both noise-free and stochastic objectives.
For the optimisation itself, several methods are implemented and available, such as DIRECT, LIPO, and Bayesian optimisation, among others.
Particularly, a significant effort has been employed in Bayesian optimisation algorithms, backed with an open-source implementation [@balandatBoTorchFrameworkEfficient2020] and allowing for single- and (scalarised) multi-objective optimisation of both noise-free and stochastic objectives.
Furthermore, a novel composite Bayesian optimisation strategy is available for curve-fitting problems, which, in our tests, severely outperforms classical optimisation approaches [@Coelho2023optm].

The package also provides a builtin tool `piglot-plot` to visualise the results of the optimisation.
The package also provides a built-in tool `piglot-plot`, to visualise the results of the optimisation.
There are native plotting utilities for the optimised responses, the parameter history, objective history and, for supported solvers, live plotting of the currently running case.
The package also includes full documentation for a clear installation and usage, supporting a simple framework for new developments.
With this in mind, a thorough automated testing is incorporated, ensuring the compliance of new developments.
The package also includes complete documentation for a straightforward installation and usage, supporting a simple framework for new developments.
With this in mind, thorough automated testing is incorporated, ensuring the compliance of new developments.

With this package, we aim to provide a simple and effective tool for the general optimisation of numerical responses, which can be easily extended for other solvers in the community.
The combination of `piglot` with `piglot-plot` provides an integrated framework that allows for easily solving inverse problems and quickly post-process the results.

In \autoref{fig:piglot_example} a scheme of the workflow of `piglot` is illustrated.
# Methodology and use cases

In \autoref{fig:piglot_example}, a scheme of the workflow of `piglot` is illustrated.
There are two modes of initialisation available: using `.yaml` configuration files, or building the optimisation problem in a Python script.
The use of configuration files is the simplest and recommended approach of using `piglot`.
During the optimisation there is a continuous exchange of information between the physics solvers, `piglot`, and the optimisers.
Whereas the optimisers are responsible for providing a candidate solution for the parameters, $\boldsymbol{\theta}$, based on the loss function value, $J(\boldsymbol{\theta})$, the physics solvers receive the parameters, $\boldsymbol{\theta}$, and compute the numerical response, $\boldsymbol{\sigma}$, accordingly.
The results of the optimisation can be then visualise using the `piglot-plot` tool.
Configuration files are the simplest and recommended approach to using `piglot`, and its usage is extensively documented.
During the optimisation, there is a continuous exchange of information between the physics solvers, `piglot`, and the optimisers.
Whereas the optimisers are responsible for providing a candidate solution for the parameters, $\boldsymbol{\theta}$, based on the objective function value, $J(\boldsymbol{\theta})$, the physics solvers receive the parameters, $\boldsymbol{\theta}$, and compute the numerical response, here denoted as $\boldsymbol{\sigma}$, accordingly.
The results of the optimisation can then be visualised using the `piglot-plot` tool.


![Schematic illustration of `piglot`. \label{fig:piglot_example}](piglot.svg){width=100%}
Expand All @@ -73,8 +85,6 @@ The `piglot` package has been successfully used for the identification of consti
Moreover, this tool has also demonstrated its potential in the material design of different microstructures, such as particulate PC/ABS polymer blends.


With this package, we aim to provide a simple and effective tool for general optimisation of numerical responses, which can be easily extended for other solvers in the community.


# Acknowledgements

Expand Down
8 changes: 8 additions & 0 deletions docs/joss_paper/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ @misc{nevergrad
}


@misc{hyperfit,
author = {Pavel Skacel},
title = {{HYPERFIT}},
year = {2011},
howpublished = {\url{http://hyperfit.wz.cz/home.php}}
}



@inproceedings{optuna_2019,
title={Optuna: A Next-generation Hyperparameter Optimization Framework},
Expand Down

0 comments on commit 62dd692

Please sign in to comment.