Running yalmip optimization solver in Raspberry Pi through MATLAB
6 次查看(过去 30 天)
显示 更早的评论
I am trying to solve an optimization problem in MATLAB using yalmip solver. It is working as expected in the matlab environment. Now, I want to run our program in raspberry pi to check its feasibility. However, our code contains various yalmip functions such as sdpvar, sdpsettings. optimize etc. As a result, I am getting some errors in the code generation step.
I could not find any supporting documents realted to this. It will be really helpful if anyone clarifies if it is possible to run this optimization code in raspberry pi through matlab?
1 个评论
枭 王
2023-2-22
Hi Summan,
Did you solve this issue? I have similar needs but it seems that Yalmiip does not support code generation https://yalmip.github.io/example/simulink/#:~:text=Hence%2C%20it%20fails%20when%20it%20encounters%20any%20kind,target%20%28such%20as%20a%20DSP%20or%20something%20similar%29.
回答(1 个)
Anshuman
2023-8-29
Hi Suman,
Running code that uses YALMIP functions on a Raspberry Pi through MATLAB is not directly supported. YALMIP is a MATLAB toolbox that provides a high-level interface for optimization modeling and solving, but it relies on MATLAB's computational engine and libraries.
However, there are a few potential alternatives you can consider:
- MATLAB Compiler: You can try using MATLAB Compiler to compile your MATLAB code that uses YALMIP functions into a standalone executable or a shared library. This compiled code can then be deployed and run on the Raspberry Pi without requiring a MATLAB installation.
- MATLAB Coder: MATLAB Coder allows you to generate C or C++ code from your MATLAB functions. While YALMIP itself is not directly supported by MATLAB Coder, you can try to rewrite or modify your code to use alternative optimization libraries or functions that are compatible with MATLAB Coder. This way, you can generate C/C++ code that can be compiled and executed on the Raspberry Pi.
- Alternative Optimization Libraries: If the specific optimization problem you are trying to solve using YALMIP functions is not too complex, you can explore alternative optimization libraries that are compatible with the Raspberry Pi. Some popular optimization libraries include CVX, MOSEK, and Gurobi. These libraries have their own interfaces and syntax, so you would need to adapt your code accordingly.
Hope it helps!
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!