Trying to generate random numbers from a triangular distribution for input for an Entity Server Block in a SimEvents model created using Matlab R2016b

5 visualizzazioni (ultimi 30 giorni)
In an attempt to generate random numbers from a triangular distribution for input for the “Entity Server Block” the “Event-Based Random Number Block” was connected to the input port of the “Entity Server Block” in a SimEvents model created using Matlab R2016b. However the following error message appears when running the model. “You cannot use entity blocks from an older release (prior to R2016a) in a model that uses the new versions of entity blocks (R2016a and beyond)." The error message does not appear and the model runs fine when instead of the “Event Based Random Number Block, a “Constant Block” is connected to the input port of the “Entity Server Block.” The error only message only appears when connecting the “Event-Based Random Number Block” to the input port of the “Entity Server Block.” The “Event-Based Random Number Block” comes from the SimEvents “Legacy Block Library” so the word “Legacy” suggests that the “Event-Based Random Number Block” is outdated for use in a SimEvents model created in Matlab R2016b. If this is correct, is there a more appropriate source of event based random numbers of various distributions (including the triangular distribution) to use for a SimEvents model created using Matlab R2014b? I would very much appreciate any comments. John
  1 Commento
James Tursa
James Tursa il 12 Gen 2017
I don't follow most of this description, but FYI just adding two uniform random numbers together will give you a random number with a triangular distribution. You can shift and scale this number as appropriate.

Accedi per commentare.

Risposta accettata

Jordan Ross
Jordan Ross il 23 Gen 2017
Hello John,
The reason that you are getting that error message is that you are trying to use legacy SimEvents blocks with the newer version SimEvent blocks. The release notes for R2016a note that this is not supported. Please refer to the following link:
If you want to convert your model to use the newer version of SimEvent blocks then I would suggest taking a look at the Entity Generator block.
This block can be configured to generate entities using a statistical distribution.
However, if you want to keep you model using the older version of SimEvents (pre R2016a) then you can just have your model consist of the Legacy SimEvent blocks.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by