draw a convergence graph when using yalmip
이전 댓글 표시
How to draw a convergence graph when using yalmip to solve optimization problems? And check the number of iterations and the results of each iteration.
답변 (1개)
Prathamesh
2025년 6월 3일
I understand that you want to draw a convergence graph using “yalmip” to solve optimization problem and want to check the number of iterations as well as result of each iteration.
Below are steps to check the number of iterations:
- Enable Verbode output after installing YALMIP in your system.
- Use a solver that supports iteration info. Solver like “IPOPT” provide detail iteration logs. YALMIP itself does not track iterations.
- Capture solver output using “optimize”
sol = optimize(constraints, objective, options);
And then check the solver status using “sol.info” and problem code using “sol.problem”.
- Extract Iteration data
diary on
optimize(constraints, objective, options);
diary off
- Manually track object value and update the model or parameters using “optimize”.
- Plot the convergence graph using MATLAB “plot” function.
Please refer below documentation links for “IPOPT” and “optimize”
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!