You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for cons in constraints:
if cons['type'] is 'ineq':
self.g_cons.append(cons['fun'])
try:
self.g_args.append(cons['args'])
except KeyError:
self.g_args.append(())
self.g_cons = tuple(self.g_cons)
self.g_args = tuple(self.g_args)
If I've missed how to specify, please let me know.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: