geraintpalmer / DetectingDeadlockInQingNetworkSimulation

0 stars 0 forks source link

Verify mean time till absorption. #8

Closed drvinceknight closed 9 years ago

drvinceknight commented 9 years ago

Depends on #7 and being able to identify deadlock in a simulation.

geraintpalmer commented 9 years ago

Markov chain model & simulation model now give same results for the mean times to deadlock from each state

paulharper72 commented 9 years ago

+1

drvinceknight commented 9 years ago

That's awesome Geraint, can you throw some plots on this issue for varying demand? (same plots as for the blog post of mine)

On Tue, 28 Apr 2015 11:47 Paul Harper notifications@github.com wrote:

+1

— Reply to this email directly or view it on GitHub https://github.com/geraintpalmer/DetectingDeadlockInQingNetworkSimulation/issues/8#issuecomment-97013229 .

geraintpalmer commented 9 years ago

image This sort of thing ie? Working on it now

drvinceknight commented 9 years ago

Yeah except you can get a smooth plot for the analytical version and get box plots for the simulation (not two scatter plots). Like this:

drvinceknight commented 9 years ago

You should also plot not just for varying Lambda but for varying exit probabilities etc...

geraintpalmer commented 9 years ago

For n1 = 3, n2 = 2, mu1 = 10, mu2 = 8, r12 = 0.25, r21 = 0.15, L2 = 5 and varying L1: varyingl1

geraintpalmer commented 9 years ago

Will run simulation now, may take a while to run every scenario

drvinceknight commented 9 years ago

Like in my blog post you don't have to run every one for the simulation.

On Tue, 28 Apr 2015 13:12 Geraint Palmer notifications@github.com wrote:

Will run simulation now, may take a while to run every scenario

— Reply to this email directly or view it on GitHub https://github.com/geraintpalmer/DetectingDeadlockInQingNetworkSimulation/issues/8#issuecomment-97039076 .

drvinceknight commented 9 years ago

Also plot on same plot.

On Tue, 28 Apr 2015 14:22 Vincent Knight vincent.knight@gmail.com wrote:

Like in my blog post you don't have to run every one for the simulation.

On Tue, 28 Apr 2015 13:12 Geraint Palmer notifications@github.com wrote:

Will run simulation now, may take a while to run every scenario

— Reply to this email directly or view it on GitHub https://github.com/geraintpalmer/DetectingDeadlockInQingNetworkSimulation/issues/8#issuecomment-97039076 .

geraintpalmer commented 9 years ago

theoretical_vs_simulation_vary_l1 I need to simulate for more iterations though

geraintpalmer commented 9 years ago

For n1 = 3, n2 = 2, mu1 = 10, mu2 = 8, r21 = 0.15, L1 = 4, L2 = 5 and varying r12: theoretical_vs_simulation_vary_r12

drvinceknight commented 9 years ago

Are you plotting these correctly? Should the boxes be nudged over by 1 unit?

geraintpalmer commented 9 years ago

No they are plotted fine, maybe I need more iterations? There are a lot of outliers above.

drvinceknight commented 9 years ago

No they are plotted fine, maybe I need more iterations? There are a lot of outliers above.

100% sure? Of by 1 indexing errors... Double check to be sure.

Yeah could be the outliers, possibly more iterations... How many are you doing now?

geraintpalmer commented 9 years ago

Sure. varying the L1 was 150 iterations, varying r12 was 250 iterations. Isn't the red line median, not mean? So maybe the means do line up, but not medians because of the distribution?

drvinceknight commented 9 years ago

Yeah more iterations would be good...

Good point about median/mean... I still think you should be able to get a closer fit than that.

Way more iterations (order of 10^3 or 10^4 if run time is not stupid).

Be sure that you're not just plotting wrong and off by 1...

geraintpalmer commented 9 years ago

Showing means: theoretical_vs_simulation_vary_r12_showmeans

drvinceknight commented 9 years ago

NICE.

Run for longer just because you can, also I think there's a way to get rid of the outliers in the box plot (might as well do that).

Also throw in a couple for different starting states.

On Tue, 28 Apr 2015 17:15 Geraint Palmer notifications@github.com wrote:

Showing means: [image: theoretical_vs_simulation_vary_r12_showmeans] https://cloud.githubusercontent.com/assets/9679702/7374410/1a3092f2-edca-11e4-9c52-d87bbfe87a89.png

— Reply to this email directly or view it on GitHub https://github.com/geraintpalmer/DetectingDeadlockInQingNetworkSimulation/issues/8#issuecomment-97123979 .