필터 지우기
필터 지우기

Standalone compiler (Mabtlab 2022a) integrating Yalmip can't find the solvers

조회 수: 9 (최근 30일)
Yunfeng Lin
Yunfeng Lin 2023년 3월 5일
답변: Walter Roberson 2023년 11월 24일
1. My project works before compiling to standalone application.
2. Yalmip can't find the solver fmincon (optimization toolbox) and Rounder after running standalone app.
3. result = optimize(constraint,f) is the calling optimize method using default parameters.

답변 (3개)

Sachin
Sachin 2023년 3월 14일
Based on my understanding, you are getting error ‘can’t find the solvers’. Assuming that you are using MATLAB R2022b, you can try these points.
  1. Check if you have installed ‘yalmip’ in your system correctly.
  2. If you have installed ‘yalmip’ correctly in your system, then you can try downloading the solver.
Refer the following page for more about ‘yalmip’ installation:
Refer to the following page for installation of solvers:

Huo
Huo 2023년 4월 17일
I've got the same question. I have yalmip and sdpt3 toolbox worked correctly with Matlab2022a, but when I use Library compiler to generate standalone lib(.h, .lib, .dll) for C++ usage, the C++ function can't find the sdpt3 solver anymore. and the screen printed as follows:
I don't know how to solve the problem, and please do me a favor, many thanks!

Walter Roberson
Walter Roberson 2023년 11월 24일
use the function pragma https://www.mathworks.com/help/compiler/function.html to name the solver as being used.
The problem is that yalmip is invoking the solver indirectly, such as by using feval() or constructing a handle using str2func, so the compiler does not see a clear call to the optimizer and does not know to include it.
You could also use the -a command line option to the compiler to specifically add the optimizer to the executable. Or if you use the gui then add the optimizer to the list of required code.

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by