Trying to generate random numbers from a triangular distribution for input for an Entity Server Block in a SimEvents model created using Matlab R2016b
이전 댓글 표시
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
James Tursa
2017년 1월 12일
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!