What's Changed
See this example of an optimization with constraint functions compared to the same example where the constraints are provided with the objective (the legacy way) and are approximated with surrogates behind the scene. Constraint functions definition is suited when constraint computation is cheap to avoid surrogate approximation.
To summarize, Egor
handles three types of constraint:
- the ones defined by the bounds of the input domain (hypercube),
- the ones defined with the objective function which are approximated with surrogates
- the ones defined as separate cheap-to-compute functions
Notes:
- Gradient definition of a constraint function is required when using SLSQP as infill optimizer
- Constraint tolerance is defined as a float list of length (nb of surrogated constraints p (cstr) + nb of constraints function q (fcstr)) following the order of definition: [cstr1, ... cstr_p, fcstr_1, ..., fcstr_q]
Full Changelog: 0.25.2...0.26.0