Azzera filtri
Azzera filtri

Simevents: entity generator and insert pattern with non periodic sequences

3 visualizzazioni (ultimi 30 giorni)
I am trying to generate an entity with an specific intergeneration time sequence, and I am not able to make it. The tools helps on generating random and periodic sequences but this is not matchng my requested pattern. This is [0.002 0.016 0.016 0.016...]. The value 0016 remains constant to the end, and the simulation has to be launched for 2 minutes...I supose that there is a way to generate this with Matlab programming, but I not famiiar with this. I have two questions: 1/ Could you please can send me the Matlab Code to generate the sequence? 2/ The root cause...could you please send me some information (links, title for books,...) for get the proper expertise for Matlab coding?
Thanks in advance...

Risposte (1)

Adit Kirtani
Adit Kirtani il 23 Mar 2023
Modificato: Adit Kirtani il 23 Mar 2023
Hi José,
For your first question, if you have a sequence of values from which you wish to set an intergeneration time, you can use the "Event Actions Assistant".
You can set your desired sequence and modify the if condition after the sequence definition to ensure the sequence always checks the second index (which in your case is the value of 0.016). By default, it is set to return to the first index.
if idx > numel(SEQ)
idx = 2;
end
As for learning MATLAB, a good resource to learn MATLAB programming would be to complete the MATLAB Onramp. You can view the course here:
I hope this helps,
Adit Kirtani.

Categorie

Scopri di più su Discrete-Event Simulation in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by