Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul docs #105

Merged
merged 41 commits into from
Mar 30, 2017
Merged

Overhaul docs #105

merged 41 commits into from
Mar 30, 2017

Conversation

geraintpalmer
Copy link
Member

No description provided.

@geraintpalmer
Copy link
Member Author

Hi @drvinceknight would really appreciate your thoughts on this.

(doctests failing due to some Python2 / Python3 printing differences, I'm thinking about this)

@geraintpalmer
Copy link
Member Author

I'm thinking: Only run doctests on Python3. Run all other tests on both. Make a note in docs that output assumes Python3 although Python2 is also supported?

@drvinceknight
Copy link
Contributor

drvinceknight commented Mar 21, 2017 via email

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b833168 on overhaul-docs into 26d7d32 on master.

docs/index.rst Outdated

Ciw is a discrete event simulation library for open queueing networks. It's core features include the capability to simulate networks of queues, multiple customer classes, and implementation of Type I blocking for restricted networks. A number of other features are also implemented, including priorities, baulking, schedules, and deadlock detection.

The documentation contains a two part tutortial that guides the user through some key concepts and core features of the library. A series of How-to guides instruct on the use and implementation of Ciw's numerous features, and reference pages and background information is available to ensure ease of use and understanding.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this paragraph (not needed).

docs/index.rst Outdated

The documentation contains a two part tutortial that guides the user through some key concepts and core features of the library. A series of How-to guides instruct on the use and implementation of Ciw's numerous features, and reference pages and background information is available to ensure ease of use and understanding.

Please note that Ciw is currently supported for and regularly tested on Python versions 2.7, 3.4 and 3.5. However, for the documentation we assume Python 3 is used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly put this sentence in brackets.

'Baulking_functions': {'Class 0': [my_baulking_function]}



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some rst syntax is broken in this file.

docs/index.rst Outdated
citation.rst
changelog.rst
glossary.rst
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you move this to reference.

docs/index.rst Outdated

.. toctree::
:hidden:

citation.rst
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you move this to a how to.


Ciw's real power comes when modelling networks of queues. That is many service nodes, such that when customers finish service, there is a probability of joining another node, rejoining the current node, or leaving the system. These types of systems arise naturally in communications, manufacturing, and service industries.

Imagine a café that sells both hot and cold food. Customer arrive and can take a few routes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customers


A transition matrix is an :math:`n \times n` matrix (where :math:`n` is the number of nodes in the network) such that the :math:`(i,j)\text{th}` element corresponds to the probability of transitioning to node :math:`j` after service at node :math:`i`. In Python, we write this matrix as a list of lists. The transition matrix for the café system looks like this::

[[0.0, 0.3, 0.7],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write this in maths display mode.


Notice the Service distributions: an average cold food service time of 1 minute is equivalent to a rate of 1/1 = 1 service per minute; an average hot food service time of 2.5 minutes is equivalent to 1/2.5 = 0.4 services per minute; and an average till service time of 2 minutes is equivalent to 0.5 services per minute.

Let's simulate this for one shift of lunchtime of 3 hours (180 mins). At the beginning of lunchtime he café opens, and thus begins from an empty system. Therefore no war-mup time is required. We'll use 20 minutes of cool-down time. We'll run 10 trials, to get a resume of the average number of customers that pass through the system. To find the average number of customers that pass through the system, we can count the number of data records that have passed through Node 3 (the Till)::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the cafe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

measure


We can now get the average number of customers that have passed through the system::

>>> sum(completed_custs)/len(completed_custs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8


Notice the Service distributions: an average cold food service time of 1 minute is equivalent to a rate of 1/1 = 1 service per minute; an average hot food service time of 2.5 minutes is equivalent to 1/2.5 = 0.4 services per minute; and an average till service time of 2 minutes is equivalent to 0.5 services per minute.

Let's simulate this for one shift of lunchtime of 3 hours (180 mins). At the beginning of lunchtime he café opens, and thus begins from an empty system. Therefore no war-mup time is required. We'll use 20 minutes of cool-down time. We'll run 10 trials, to get a resume of the average number of customers that pass through the system. To find the average number of customers that pass through the system, we can count the number of data records that have passed through Node 3 (the Till)::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

war-mup

@coveralls
Copy link

coveralls commented Mar 30, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 0402519 on overhaul-docs into 26d7d32 on master.

@coveralls
Copy link

coveralls commented Mar 30, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 7cd0c99 on overhaul-docs into 26d7d32 on master.

@geraintpalmer geraintpalmer changed the base branch from master to next-release March 30, 2017 18:33
@geraintpalmer geraintpalmer reopened this Mar 30, 2017
@geraintpalmer geraintpalmer merged commit f9dc217 into next-release Mar 30, 2017
@geraintpalmer geraintpalmer deleted the overhaul-docs branch April 4, 2017 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants