Linear programming for simulink code generation
10 views (last 30 days)
Show older comments
I'm trying to do TSP problem in simulink and use it to generate a ROS package. However, when I calculating minimum weight perfect matching, I use linear programming to find the best prefect match, but linprog function is not supported for code generation. I tried with a few other ways such as OPTI tool box and fminsearchcon but none of them works, the first one also not supporting code generation and the second one can't give me a proper result when there is more than 16 nodes and cost too much time. (BTW all the block in my simulink models are matlab function blocks)
So how should I fix the problem? I can't use linprog as an external function since I have to pack it into a ROS package so everything in my model should be able to generate code.
I'm thinking about using C++ to add another block solving the minimum weight perfect matching and transfer the data back to matlab function blocks. Will that works? Is there any better option that I could do? Or is there any tutorial vedio for similar problem that I can go through?
Thanks.
Answers (0)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!