Hi I am doing a minimization problem and I wanted to try the 'trust-constr'
method, with scipy function optimize.minimize
, to compare it with the 'SLSQP' results. Unfortunatly I don't know why when I set my method to 'trust-constr'
, it tells me that :
ValueError: constraint
of an unknown type is passed.
The code is the following:
con1 = {'type':'eq', 'fun': eq2}
con2 = {'type':'ineq', 'fun' : ieq_bck2}
con3 = {'type':'ineq', 'fun' : ineq_rb2}
con4 = {'type':'ineq', 'fun' : ls2}
con = ([con1, con2, con3, con4])
scipy.optimize.minimize(fitness2, opt, method = 'trust-constr', jac =
'cs', hess = h1, constraints = con)
Any idea of how to solve it?