geraintpalmer / DetectingDeadlockInQingNetworkSimulation

0 stars 0 forks source link

Further investigate validation of results #16

Closed drvinceknight closed 9 years ago

drvinceknight commented 9 years ago
geraintpalmer commented 9 years ago

plotviol_vary_r12 Not fantastic, still a bit out?

geraintpalmer commented 9 years ago

Not sure if increasing number of runs is going to improve results: plot mean against number of iterations (for 10000 iterations) movingmean0 85r12 movingmean0 7r12 movingmean0 05r12 movingmean0 1r12

drvinceknight commented 9 years ago

Add the expected value to this plots.

geraintpalmer commented 9 years ago

Makes it look even worse... movingmean0 85r12 movingmean0 7r12 movingmean0 05r12 movingmean0 1r12

geraintpalmer commented 9 years ago

Continuous markov chain simulation in blue, queueing network simulation in green: simvsanalsim (Couldn't quite get the axis right atm) So probably nothing to do with discretisation

drvinceknight commented 9 years ago

That's a shame... :( What are you going to try next?

On Thu, Jun 25, 2015 at 3:22 PM Geraint Palmer notifications@github.com wrote:

Continuous markov chain simulation in blue, queueing network simulation in green: [image: simvsanalsim] https://cloud.githubusercontent.com/assets/9679702/8356542/ec08bcb8-1b4d-11e5-945f-07dc3dc14156.png (Couldn't quite get the axis right atm) So probably nothing to do with discretisation

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

geraintpalmer commented 9 years ago

Run it with 1 node, see if same happens there (1 node system has same simulation, but different markov chain, may be able to deduce where the problem lies)

drvinceknight commented 9 years ago

Yeah good idea.

On Thu, Jun 25, 2015 at 3:44 PM Geraint Palmer notifications@github.com wrote:

Run it with 1 node, see if same happens there (1 node system has same simulation, but different markov chain, may be able to deduce where the problem lies)

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

geraintpalmer commented 9 years ago

Hang on, might have found bug in simulation....

drvinceknight commented 9 years ago
On Thu, Jun 25, 2015 at 3:50 PM Geraint Palmer notifications@github.com wrote: > Hang on, might have found bug in simulation.... > > — > Reply to this email directly or view it on GitHub > https://github.com/geraintpalmer/DetectingDeadlockInQingNetworkSimulation/issues/16#issuecomment-115282623 > .
paulharper72 commented 9 years ago

Btw, missing an epsilon in code, such that time to deadlock minus epsilon (epsilon suitably chosen to get analytical and simulation results to match) unfortunately is not classed as a bug ;)

geraintpalmer commented 9 years ago

Results of 1 node network:::::: plotviolr11 plotvioln1 plotviolmu1 plotvioll1

geraintpalmer commented 9 years ago

Don;t know what's going on with mu1 though....

drvinceknight commented 9 years ago

So that's showing a perfect match right?

On Wed, 8 Jul 2015 12:42 Geraint Palmer notifications@github.com wrote:

Don;t know what's going on with mu1 though....

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

geraintpalmer commented 9 years ago

Yep, perfect. So either:

So I'm running the 2 node simulation with the corrections now, see if that affects anything

drvinceknight commented 9 years ago

Ok cool... Let us know if that changes anything...

On Wed, 8 Jul 2015 13:02 Geraint Palmer notifications@github.com wrote:

Yep, perfect. So either:

  • markov chain of 2 node is incorrect OR
  • the mistakes I found in simulation (that should've only affected 1 node simulation) actually was affecting the 2 node simulation

So I'm running the 2 node simulation with the corrections now, see if that affects anything

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

geraintpalmer commented 9 years ago

Simulation running now. VERY EARLy results (only a few data points, rest still running) not looking good: earlyresults Probably the MC

drvinceknight commented 9 years ago

:(

I think the MC might be forgetting something... Have you gotten anywhere with trying to fit something to the error?

On Wed, Jul 8, 2015 at 2:37 PM Geraint Palmer notifications@github.com wrote:

Simulation running now. VERY EARLy results (only a few data points, rest still running) not looking good: [image: earlyresults] https://cloud.githubusercontent.com/assets/9679702/8571449/caee5976-257e-11e5-8103-1ccccb64b102.png Probably the MC

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

geraintpalmer commented 9 years ago

Not yet, trying to derive the MC again (again) atm. Then I'll look into that.

drvinceknight commented 9 years ago

Cool.

On Wed, Jul 8, 2015 at 2:44 PM Geraint Palmer notifications@github.com wrote:

Not yet, trying to derive the MC again (again) atm. Then I'll look into that.

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

geraintpalmer commented 9 years ago

1Node network: The effect of varying r11 on the effect of mu1: varymu1r11

drvinceknight commented 9 years ago

Write down here the interpretation we came to.

On Fri, 10 Jul 2015 19:38 Geraint Palmer notifications@github.com wrote:

1Node network: The effect of varying r11 on the effect of mu1: [image: varymu1r11] https://cloud.githubusercontent.com/assets/9679702/8626196/2bc33574-273b-11e5-9fbc-a6ed7ea12606.png

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

geraintpalmer commented 9 years ago

So:

drvinceknight commented 9 years ago

:+1:

On Fri, 10 Jul 2015 20:20 Geraint Palmer notifications@github.com wrote:

So:

  • At low service rates (below a threshold, say 2.2) the arrival rate is relatively large, and so we can assume a saturated system. At this point services where the customer leaves do not affect the system, but services where a customer gets blocked leads to deadlock. And so increasing the service rate just increases the chances of getting blocked, and so deadlocked.
  • Above this threshold, the service rate is large enough that we cannot assume a saturated system. And that services where customers exit the system does affect the number of people in the system. Thus increasing the service rate removes people from the system, and less chance of getting blocked, and so deadlocked.

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

geraintpalmer commented 9 years ago

Results from another simulation model (1000 iterations): varyl1plot

geraintpalmer commented 9 years ago

Plotting MPE against varying parameters: varying n1, n2, L1, L2 not interesting, however varying r12, r21, mu1 and mu2 produce these:

mpe_r21 mpe_r12 mpe_mu2 mpe_mu1

So I think the MC is missing something with the transitions from one node to another.

geraintpalmer commented 9 years ago

Formulating the MC without using (i, j) formulation for the 2 node network: plotvaryl newform

geraintpalmer commented 9 years ago

And the other parameter changes:: plotl2nf plotmu1nf plotmu2nf plotn1nf plotn2nf plotr12nf plotr21nf

drvinceknight commented 9 years ago

:+1:

On Mon, 20 Jul 2015 13:41 Geraint Palmer notifications@github.com wrote:

And the other parameter changes:: [image: plotl2nf] https://cloud.githubusercontent.com/assets/9679702/8775920/d403fb32-2ee4-11e5-9086-66868c852388.png [image: plotmu1nf] https://cloud.githubusercontent.com/assets/9679702/8775923/dc6c9144-2ee4-11e5-937a-752ce4460d28.png [image: plotmu2nf] https://cloud.githubusercontent.com/assets/9679702/8775925/e21983fe-2ee4-11e5-8b8b-95156231cd55.png [image: plotn1nf] https://cloud.githubusercontent.com/assets/9679702/8775930/e7ab3510-2ee4-11e5-870d-87c6f8758bc3.png [image: plotn2nf] https://cloud.githubusercontent.com/assets/9679702/8775932/ebe089aa-2ee4-11e5-903d-3413ef2397fa.png [image: plotr12nf] https://cloud.githubusercontent.com/assets/9679702/8775938/f322bdfa-2ee4-11e5-8e30-2531a8511314.png [image: plotr21nf] https://cloud.githubusercontent.com/assets/9679702/8775940/f7d96ace-2ee4-11e5-8090-26fd4cdc9ef0.png

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

geraintpalmer commented 9 years ago

This has now all been fixed by e3cf4346b742e9655bcfb5c48cd019d27a53fdec.

The mistake: The two states that lead to deadlock (n1, n2+2) and (n1+2, n1) also had transitions to the state (n1+1, n2+1) as well as to (-1). The wasn't obvious as I thought that this was all tied up in the nice state space but wasn't.

Graphs of final MC:::

plotl1fixed plotl2fixed plotmu1fixed plotmu2fixed plotn1fixed plotn2fixed plotr12fixed plotr21fixed

drvinceknight commented 9 years ago

:fireworks: