MichalisPanayides / PhD-meetings

This is a repository to keep track of the weekly meetings for the purposes of my PhD
0 stars 0 forks source link

2022-05-31 meeting agenda #90

Open MichalisPanayides opened 2 years ago

MichalisPanayides commented 2 years ago

What has been done:

To be discussed:

To be done:

           All hail the holy meeting agenda

( ノ ゚ー゚)ノ( ノ ゚ー゚)ノ( ノ ゚ー゚)ノ( ノ ゚ー゚)ノ     \(゚ー゚\)\(゚ー゚\)\(゚ー゚\)\(゚ー゚\)

MichalisPanayides commented 2 years ago

Two problems with state probabilities matrix and server rates matrix

Original thinking:

Markov chain set of states

image

State probabilities array:

image

Server rates matrix

image

I originally thought that the set of states from the simulation correspond to the server rates exactly. Meaning that I could just look at the current state of the simulation and use the rate from the equivalent position of the server rates matrix.

That is not the case because of two major problems.

Note: Need to think of when a service actually starts

Problem 1 - ciw state tracker is updated AFTER getting the service time

image

When we think about this for the first couple of states it makes sense (kinda). e.g Consider an example where C = 2

Solution: Instead of using ciw's state tracker I am now looking at the number of individuals at each node manually to get the actual state.

--------------------------------------Problem solved--------------------------------------

Problem 2 - ciw releases blocked individuals AFTER getting the service time

image

At our Markov model new individuals are going in service AT THE SAME TIME as releasing blocked individuals. In ciw it's also at the same time but the service computation is written before releasing blocked individuals. This is problematic for states on the threshold column. For a brief moment the system goes to potentially invalid states (i.e. the column of states before the threshold column).

282147149_1238046607020485_7460476949823931328_n

Solution: Where we get the service time, check if we are at those invalid states and force the created distribution to sample from the correct ones.

image

drvinceknight commented 2 years ago

This all sounds excellent @11michalis11.

Regarding problem 1, I believe it's possible to implement and use a bespoke state tracker in ciw (you can pass a bespoke one to the simulation: https://ciw.readthedocs.io/en/latest/Reference/state_trackers.html?highlight=state%20tracker). Is this what you're doing or are you doing, and if not would that be a good idea to do?

MichalisPanayides commented 2 years ago

This all sounds excellent @11michalis11.

Regarding problem 1, I believe it's possible to implement and use a bespoke state tracker in ciw (you can pass a bespoke one to the simulation: https://ciw.readthedocs.io/en/latest/Reference/state_trackers.html?highlight=state%20tracker). Is this what you're doing or are you doing, and if not would that be a good idea to do?

I think currently all the state tracker is doing, is it collects the probability at each state, to be viewed at the end of the simulation. What I want to do is look at the current state of the simulation while running the simulation, which I was able to do without using the state tracker.

The reason why I couldn't use the state tracker (or any other custom tracker) is because ciw runs first self.accept_individual and then self.update_statetracker. That means the service time is sampled before updating the state tracker. I want to sample my service time ($\mu$) from the current state.

If that was confusing I can explain it better in our meeting. Overall this was a fun problem to solve though😄

drvinceknight commented 2 years ago

This makes sense. Thanks.

MichalisPanayides commented 2 years ago

This week's TODO: