minimize Algorithmen Problem with boundarys
Hello everybody, i have a Problem, with three minimize Algorithmen in scipy. I need Algorithmen to support a minimize Algorithmen with boundarys. My favorits are the 'lbfgsb', 'slsqp' and 'tnc' but all of them give a failure meanwhile solve my problem.
By call the methode SLSQP it give me failure back out of methode in file slsqp.py in the line 397 of code: "failed in converting 8th argument 'g' of _slsqp.slsqp to C/Fortran".
my Jacobi Matrix ist a differentiate from the jccurve(in the Code below) formula and i code this in Lambda formalism. The Variable "x" are the optimize Parameter in this case also x[0]=a,x[1]=b,x[2]=n,x[3]=c In my case sigma and epsilon is the flow curve of metal and i optimize the JohnsonCook curve with this Code. That mean sigma ist a array with 128 elements also epsilon is a array with 128 elements. The Paramete a,b,n,c are number in this case.
The Solver lbfgsb give me a failure back out of the methode in the file lbfgsb.py in the line 264 in the function g=fac(x,*args). That function is a referenz to my Jacobimatrix "jcjac" and it give me a TypeError "'builtin_function_or_method' object has no attribute '__getitem__'" I donĀ“t what that mean. This failure also in the Solver from TNC.
I hope i could explain my Problem and everbody can help me.
Here begin my extract from code:
jcjac = lambda x,sig,eps,peps : array[(1+x[3]*log(peps/1)), ((eps**x[2])+(eps**x[2])*log(peps/1)+ x[0]*log(peps/1)), ( x[0]*log(peps/1)), (x[1]*(eps**x[2])*log(eps)+(eps**x[2])*log(eps)*log(peps/1))]
def __jccurve__(self,a,b,n,c,epsilon,pointepsilon): sig_jc=(a+b*epsilon**n)*(1+c*numpy.log(pointepsilon/1)) return sig_jc def __residuals__(self,const,sig,epsilon,pointepsilon): return sigself.__jccurve__(const[0],const[1],const[2],const[3],epsilon,pointepsilon)
p_guess=a1,b1,n1,c max_a=a1+(a1*0.9) min_a=a1(a1*0.9) min_a=0 max_b=b1+(b1*0.9) min_b=b1(b1*0.9) min_b=0 max_n=n1+(n1*10) min_n=n1(n1*10) min_n=0 max_c=c+(c*100) min_c=c(c*100) min_c=0
optimize.minimize(self.__residuals__,p_guess,args=(sigma,epsilon,pointepsilon),method='slsqp',jac=jcjac, hess=None,hessp=None,bounds=((min_a,max_a),(min_b,max_b),(min_n,max_n),(min_c,max_c)))
best greets Lars
 View this message in context: http://numpydiscussion.10968.n7.nabble.com/minimizeAlgorithmenProblemwit... Sent from the Numpydiscussion mailing list archive at Nabble.com.
participants (1)

Vertigo