- exprnd: https://www.mathworks.com/help/stats/exprnd.html
- cumsum: https://www.mathworks.com/help/matlab/ref/cumsum.html
Poisson process: exponential inter arrival time vs exponential holding time
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Inter arrival times in a Possion process is exponentially distributed. So I assume when I use the below command the ouputs follow that definition.
services= poissrnd(20,1,4) %like for 4 time units. t=1,2,3,4
But I want a traffic generation where each traffic service also has a service duration which is exponentially distributed. I believe this is different from the exp inter-arrival time aspect.
So, how can I generate a duration for each service that is exp distributed so that I can depart it from the system once that duration is over. Do I need separate exp distribution? How can i connect the two then?
For e.g."Poisson process with an avg. arrival rate of λ requests per time-unit, and the lifetime of each request following negative exponential distribution with an average of 1/μ time units. So that the traffic load is λ/μ"
0 Kommentare
Antworten (1)
Hornett
am 19 Sep. 2024
To simulate a system where arrivals follow a Poisson process and service durations are exponentially distributed, you'll use MATLAB's exprnd function for both inter-arrival times and service durations, not poissrnd. Here's a brief guide:
Generating Inter-Arrival Times
For an average arrival rate λ:
lambda = 5; % Example average arrival rate
numServices = 4; % Number of services
interArrivalTimes = exprnd(1/lambda, 1, numServices);
Generating Service Durations
For an average service rate μ:
mu = 10; % Example service rate
serviceDurations = exprnd(1/mu, 1, numServices);
Connecting Both
Calculate arrival times by summing the inter-arrival times:
arrivalTimes = cumsum(interArrivalTimes);
This way, you have interArrivalTimes for when services enter the system and serviceDurations for how long each service lasts, modeling a system with traffic load characterized by λ/μ.
Follwing documentation might help you in your implementation
Hope this helps!
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!