Reimplementation using GPyTorch of the linear inequality constraints algorithm by Agrell (2019) especailly useful to combining it with Bayesian optimization and BoTorch. The original NumPy implementation by the author can be found here.
The main features of this algorithm are:
- stable numerical compuation using Cholesky factors
- suitable for multiple constraints (not implemented yet)
- fast sampling when combining it with Botev (2016) as implementent here.
Feel free to use this code, but don't forget to cite Agrell (2019)!
Also, if you are interested, check out our paper
@inproceedings{brunzema2022controller,
title={On controller tuning with time-varying bayesian optimization},
author={Brunzema, Paul and Von Rohr, Alexander and Trimpe, Sebastian},
booktitle={2022 IEEE 61st Conference on Decision and Control (CDC)},
pages={4046--4052},
year={2022},
organization={IEEE}
}
and the corresponding repo where we build on this code to increase the sample efficiency of controller tuning in a time-varying environment by enforcing convexity constraints in the spatial dimension.
The Python implementation provided here uses the efficient pipeline of GPyTorch in contrast to the NumPy implemenation by the author of the algorithm. This is especially useful, for combining the approach with Bayesian optimization and BoTorch. So far only convexity constraints are possible, but extentions to monotonicity constraints and bounds will follow.
There is a jupyter-notebook provided with a 1D example.
The implementation is based on the implemenation by author. Furthermore, the implemenation uses the sampling algorithm by Botev (2016).