Running yalmip optimization solver in Raspberry Pi through MATLAB

7 vues (au cours des 30 derniers jours)
Suman Maiti
Suman Maiti le 31 Oct 2022
Réponse apportée : Anshuman le 29 Août 2023
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 commentaire
枭 王
枭 王 le 22 Fév 2023
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.

Connectez-vous pour commenter.

Réponses (1)

Anshuman
Anshuman le 29 Août 2023
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:
  1. 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.
  2. 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.
  3. 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!

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by