Optimization problem gets stuck before going into solver
이전 댓글 표시
I have defined my constraints and objective function for my optimization problem and I have selected fmincon as the solver using the command
opt = optimoptions('fmincon', 'MaxIterations', 1000, 'Algorithm', 'sqp');
However, the command window does even show the classical message "Solving problem using fmincon" after 30 minutes. So I think that matlab gets stuck even before that. Meanwhile the system is under "busy" condition. Then, when I stop it manually I get the following error:
Operation terminated by user during optim.internal.problemdef.visitor.CompileNonlinearFunction/getArgumentName In optim.internal.problemdef.visitor.CompileReverseADReversePass/getParentJacArgumentName In optim.internal.problemdef.visitor.CompileReverseADReversePass/visitOperatorTimes In optim.internal.problemdef.Times/acceptVisitor In optim.internal.problemdef.visitor.CompileReverseADReversePass/visitBinaryExpressionImpl In optim.internal.problemdef.BinaryExpressionImpl/acceptVisitor In optim.internal.problemdef.visitor.CompileReverseADReversePass/visitTree In optim.internal.problemdef.visitor.CompileReverseADReversePass/visitForest In optim.internal.problemdef.ExpressionForest/compileReverseAD In optim.problemdef.OptimizationExpression/compileReverseAD In optim.internal.problemdef.compile.compileNonlinearExprOrConstrWithAD In optim.internal.problemdef.compile.compileNonlinearObjective In optim.problemdef.OptimizationProblem/compileObjectives In optim.internal.problemdef.ProblemImpl/prob2structImpl In optim.internal.problemdef.ProblemImpl/solveImpl In optim.problemdef.OptimizationProblem/solve In routingGame (line 92) sol = solve(sysProb,x_init,'options',opt);
Does anybody have any idea?
Thanks in advance!
댓글 수: 2
Torsten
2023년 11월 20일
And setting
sol = solve(sysProb)
does not produce this behaviour ?
Nima
2023년 11월 28일
If this is happenning at the "define objective" step, I have exactly faced the same issue recently with the surrogate optimization. It takes quite a while until MATLAB gets to the "solve" step and I haven't found any solution for that yet.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Surrogate Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!