Home 21090308 › Forums › Numerical Method › Optimization › SQP: unable to solve subquadratic programming problem error
 This topic is empty.

AuthorPosts

July 8, 2018 at 2:06 pm #5958harshit1998Member
Looks the SQPActiveSetMinimizer fails to solve optimization even for simple linear constraints. The content inside the RealScalarFunction() must not matter given it just abstracts the mapping from some 3vector to a double.Yet i have provided the full code. The greater than constraints have been printed and can be seen on the console.There is definitely a solution space carved by the inequalities for which F must have a minimum value.
The whole signature of the error is given in O/P.
Code:1234567891011121314<code>RealScalarFunction F=new RealScalarFunction(){public int dimensionOfDomain() {return 3;}public int dimensionOfRange() { return 1;}@Overridepublic Double evaluate(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector x) {DenseVector xx=new DenseVector(x);return xx.innerProduct(Gradmat)+xx.innerProduct(Hmat.multiply(xx));}};SQPActiveSetOnlyInequalityConstraintMinimizer SQP=newSQPActiveSetOnlyInequalityConstraintMinimizer(0.001, 1000);System.out.println(greater.toString());IterativeSolution<Vector> minimizer=SQP.solve(F,greater);Vector x=minimizer.search(new DenseVector(100.,10.,10.),new DenseVector(5,5));System.out.println("x=" +x);</code>O/P:
3×3
[,1] [,2] [,3]
[1,] 0.539247, 0.526988, 0.012283,
[2,] 0.539247, 0.526988, 0.012283,
[3,] 0.539247, 0.526988, 0.012283, >=
[87.788746, 86.671254, 12.210156]
java.lang.RuntimeException: unable to solve a sub quadratic programming problem:
java.lang.RuntimeException: unable to solve a sub quadratic programming problem:
at com.numericalmethod.suanshu.optimization.multivariate.constrained.general.sqp.activeset.SQPActiveSetMinimizer$Solution.step(uj:108)
at com.numericalmethod.suanshu.optimization.multivariate.constrained.general.sqp.activeset.SQPActiveSetMinimizer$Solution.search(uj:500)
at com.numericalmethod.suanshu.optimization.multivariate.constrained.general.sqp.activeset.SQPActiveSetOnlyInequalityConstraintMinimizer$Solution.search(xjb:195)
at com.numericalmethod.suanshu.optimization.multivariate.constrained.general.sqp.activeset.SQPActiveSetOnlyInequalityConstraintMinimizer$Solution.search(xjb:230) This topic was modified 7 months ago by hessinemaaoui.
July 9, 2018 at 4:15 am #5961harshit1998MemberIt is also noticed that for the same 3 constraints and with different initial point, the algorithm says “No Solution: the system of linear equations is inconsistent” as well sometimes. upon first hand observation of the constraints one can easily say that it is not so. There definitely exists so many points which satisfy all constraints. The optimization procedure just needs to find which of these solutions give the minimum value for the same RealScalarFunction ,which it fails to do and gives weird comments as output!!!
October 2, 2018 at 11:31 am #5964webmasterMemberHi harshit1998,
Could you please also provide the values of “Gradmat” and “Hmat” for us to investigate? Thanks.
 This reply was modified 7 months ago by hessinemaaoui.
October 2, 2018 at 12:29 pm #5966haksunliKeymasterBoth the objective function and the constraints are missing, please post the values.

AuthorPosts
 You must be logged in to reply to this topic.