MATLAB Answers

0

How to implement dynamic Objects in Simulink?

Asked by Sven Henning on 11 Sep 2015
Latest activity Answered by Sven Henning on 16 Nov 2015
Hey everyone, I'm new to this forum and have a question about a genereal development problem.
I want to to test distributed control algorithms for vehicles and therefore I have created a simulink model. Now the problem is, that I need to generate vehicles (very simple model) for my simulation at a specific rate of entry at multiple inputs. For one vehicle I just need to save the entry time, the speed and the direction to leave. So there will allways be a dynamic number of vehicles within my model. How can I include such a data structure in simulink? I tried the object oriented programming provided by Matlab, since this is the way I would normally implement the problem in a normal higher programming language. But I foccussed several problems, I think Simulink can't handle my self defined data types (the classes). I also thought about creating interfaces to an external application and implement the OO-problem in an C++ application. But I couldn't figure out how to do this properly.
Does anyone have an idea, how to implement this in Simulink?
Thanks in advanced Sven Henning

  0 Comments

Sign in to comment.

2 Answers

Answer by Joachim Schlosser on 10 Nov 2015

You want to simulate the environment/infrastructure for your algorithm? In this case you may want to try out SimEvents for this purpose. It has the ability to create entities at stochastic rates, and allows to influence their properties with Simulink and Stateflo as well as MATLAB algorithms.

  0 Comments

Sign in to comment.


Answer by Sven Henning on 16 Nov 2015

Hi Joachim, thank you for your answer! I will take a look on the suggested SimEvents.
Regards Sven

  0 Comments

Sign in to comment.