probability data distribution randomly or with some probability

1 回表示 (過去 30 日間)
MUKESH KUMAR
MUKESH KUMAR 2017 年 11 月 15 日
コメント済み: MUKESH KUMAR 2017 年 11 月 15 日
I have 10,000 Electric vehicles(EVs) now I want to distribute them in 24hours(day) one-hour interval, this shows the arrival time of vehicles like mostly Evs comes nearby 9-10 hours(9-10am)(40-50%) and then in afternoon around 13-14 hours (1-2pm) it may be 20-30% and remaining in evening time maximum at 16-17 hours(4-5pm). or can I distribute these EVs according to this following curve patterns(only consider yellow curve) in matlab,

回答 (1 件)

Torsten
Torsten 2017 年 11 月 15 日
編集済み: Torsten 2017 年 11 月 15 日
Let a(j) be the number of vehicles arriving between hour j-1 and hour j (j=1,...,24). So a is a row vector with 24 element.
Then do the following:
b(1)=0;
b(2:25)=cumsum(a(1:24));
b=b/b(25);
r=rand(1,10000);
random=interp1(b,linspace(0,24,25),r);
"random" gives you 10000 arrival times which lie between 0 and 24. If random(i) lies between integers j-1 and j (1<=j<=24)) means that the car arrives between hour j-1 and hour j.
Best wishes
Torsten.
  3 件のコメント
Torsten
Torsten 2017 年 11 月 15 日
But the number of EVs between hour j-1 and j (thus a(j)) is the y-value of your graphics from above, isn't it ?
Best wishes
Torsten.
MUKESH KUMAR
MUKESH KUMAR 2017 年 11 月 15 日
but I also can not plot the curve and how to find a particular EV located in which particular hour to assign it a energy consumption value at charging station ? thanks for reply

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeProbability Distributions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by