why I get NaN answer when I use yalmip with mosek solver always even if the problem is very simple ?

17 次查看(过去 30 天)
i have download both yalmip and mosek correctly and i have a licence for mosek and i add it to the path before running the code and the answer always the same NaN
i use R2022a matlab version on macbook air m1/ what could be the problem ?

回答(1 个)

Tushar
Tushar 2023-6-4
Hi Sara,
If you have correctly installed YALMIP, MOSEK, and added the MOSEK license to the MATLAB path, but you are still getting NaN (Not a Number) as the output of your optimization code, there could be a few possible reasons for this issue. Here are some potential troubleshooting steps:
  1. Check the Optimization Problem: Make sure that your optimization problem is well-defined and feasible. NaN can occur when the problem is infeasible or unbounded. Double-check your objective function, constraints, and variable bounds to ensure they are correctly specified.
  2. Verify License and Path: Ensure that your MOSEK license is valid and properly activated. Additionally, confirm that you have correctly added the MOSEK installation directory to the MATLAB path. You can verify this by running the command "which mosekopt" in MATLAB to see if it correctly points to the MOSEK solver.
  3. Update MOSEK Version: Check if there is a more recent version of MOSEK available and consider updating to the latest version. Sometimes, compatibility issues can arise between specific MATLAB versions and solver versions.
  4. Debug Your Optimization Code: Examine your optimization code and check for any potential errors or inconsistencies. Make sure you are using the appropriate YALMIP syntax and correctly defining your optimization variables, constraints, and objective function. You can also try running simpler optimization problems to see if they produce valid results.
  5. Verify Solver Compatibility: Ensure that the version of MOSEK you have installed is compatible with your MATLAB version. Check the MOSEK documentation or contact MOSEK support to confirm compatibility with MATLAB R2022a on the M1 Mac.
  6. Seek MOSEK Support: If the issue persists, consider reaching out to MOSEK support directly. They can provide specific guidance and troubleshooting steps tailored to your setup and license.
  3 个评论
Walter Roberson
Walter Roberson 2023-6-13
The volunteers do not have access to the systems of the people asking questions.
The real problem for the user might be conflicts with drivers for a visual assistive device. Or the real problem for the user might be a bad feedback between two different anti-malware software packages. Or the real problem for the user might be that they are running one of the MacOS versions that mostly disables LD_LIBRARY_PATH . Or the real problem for the user might be the fact that they have installed on an Apple Silicon processor and some portions of the software are running native and some are running under Rosetta 2.
We do not know. We cannot know. Without access to the user's equipment and a bunch of time to test, the best that the volunteers can do is talk about common sources of problems in the kind of configuration the user has.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by