Open ras9841 opened 5 years ago
The equality constraints are not used in the global sampling step of shgo, they are passed to the local solver routine (therefore they will only work if the chosen local minimization algorithm supports equality constraints, the default SLSQP (also the default of scipy.optimize.minimize) does support equality constraints).
If the final solutions of your problem instances are not KKT feasible points I would recommend trying different local solver methods from those available in scipy.optimize.minimize.
Ideally I would like to add methods to shgo reduce the dimensionality of the global problem by handling arbitrary equality constraints (through, for example, the implicit function theorem) since this will drastically speed up the problem and reduce sampling size, however, currently the only way to do this is to reformulate the objective function itself.
(I apologise for the late reply, annoyingly I have not been getting any of my feed notifications from Github lately).
It seems that the equality constraints, referenced in the documentation as
eq
, are not support. See https://github.com/Stefan-Endres/shgo/blob/master/shgo/_shgo.py#L495.If I've missed how to specify, please let me know.