Closed drvinceknight closed 9 years ago
Not fantastic, still a bit out?
Not sure if increasing number of runs is going to improve results: plot mean against number of iterations (for 10000 iterations)
Add the expected value to this plots.
Makes it look even worse...
Continuous markov chain simulation in blue, queueing network simulation in green: (Couldn't quite get the axis right atm) So probably nothing to do with discretisation
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 .
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)
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 .
Hang on, might have found bug in simulation....
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 ;)
Results of 1 node network::::::
Don;t know what's going on with mu1 though....
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 .
Yep, perfect. So either:
So I'm running the 2 node simulation with the corrections now, see if that affects anything
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 .
Simulation running now. VERY EARLy results (only a few data points, rest still running) not looking good: Probably the MC
:(
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 .
Not yet, trying to derive the MC again (again) atm. Then I'll look into that.
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 .
1Node network: The effect of varying r11 on the effect of mu1:
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 .
So:
:+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 .
Results from another simulation model (1000 iterations):
Plotting MPE against varying parameters: varying n1, n2, L1, L2 not interesting, however varying r12, r21, mu1 and mu2 produce these:
So I think the MC is missing something with the transitions from one node to another.
Formulating the MC without using (i, j) formulation for the 2 node network:
And the other parameter changes::
:+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 .
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:::
:fireworks: