Rectify me..

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rectify me..

sohini dhar-2
hi,
I have a real time data set for appliance level consumption data.
Now what I need to do is take the on time stamps from the data and the on duration and find out their distribution using matlab. and reproduce the same on repast.
I have got a weibull distribution for the on time stamp,I am writing the code which I have taken for including the weibull distribution.Please rectify me if I am wrong in the code.

public static final RandomEngine generator = AbstractDistribution.makeDefaultGenerator();
public static final double dur = Distributions.nextWeibull(0.0218571, 1.85209, generator);

The above should give me a random value from a Weibull distribution. 

Please rectify me..

Regards,
Sohini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rectify me..

Ozik, Jonathan
Hello,

Yes, that's close. In order to ensure reproducibility when you specify a random seed to your model, you should be using the built in random number generator, like so:

RandomEngine generator = RandomHelper.getGenerator();
double dur = Distributions.nextWeibull(0.0218571, 1.85209, generator);

Jonathan

> On Jul 14, 2017, at 1:53 AM, sohini dhar <[hidden email]> wrote:
>
> hi,
> I have a real time data set for appliance level consumption data.
> Now what I need to do is take the on time stamps from the data and the on duration and find out their distribution using matlab. and reproduce the same on repast.
> I have got a weibull distribution for the on time stamp,I am writing the code which I have taken for including the weibull distribution.Please rectify me if I am wrong in the code.
>
> public static final RandomEngine generator = AbstractDistribution.makeDefaultGenerator();
> public static final double dur = Distributions.nextWeibull(0.0218571, 1.85209, generator);
>
> The above should give me a random value from a Weibull distribution.
>
> Please rectify me..
>
> Regards,
> Sohini
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rectify me..

sohini dhar-2
Thank you so much for your help..


On Fri, Jul 14, 2017 at 10:20 PM, Ozik, Jonathan <[hidden email]> wrote:
Hello,

Yes, that's close. In order to ensure reproducibility when you specify a random seed to your model, you should be using the built in random number generator, like so:

RandomEngine generator = RandomHelper.getGenerator();
double dur = Distributions.nextWeibull(0.0218571, 1.85209, generator);

Jonathan

> On Jul 14, 2017, at 1:53 AM, sohini dhar <[hidden email]> wrote:
>
> hi,
> I have a real time data set for appliance level consumption data.
> Now what I need to do is take the on time stamps from the data and the on duration and find out their distribution using matlab. and reproduce the same on repast.
> I have got a weibull distribution for the on time stamp,I am writing the code which I have taken for including the weibull distribution.Please rectify me if I am wrong in the code.
>
> public static final RandomEngine generator = AbstractDistribution.makeDefaultGenerator();
> public static final double dur = Distributions.nextWeibull(0.0218571, 1.85209, generator);
>
> The above should give me a random value from a Weibull distribution.
>
> Please rectify me..
>
> Regards,
> Sohini
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...