<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.simulace.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xzigm03</id>
	<title>Simulace.info - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.simulace.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xzigm03"/>
	<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php/Special:Contributions/Xzigm03"/>
	<updated>2026-07-27T06:06:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>http://www.simulace.info/index.php?title=Queueing_theory&amp;diff=9079</id>
		<title>Queueing theory</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Queueing_theory&amp;diff=9079"/>
		<updated>2015-01-25T22:23:57Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The queueing theory is a '''mathematical method for analyzing the congestions and delays of waiting in line'''. The theory takes into consideration every component involved in waiting in line: process to serve, number of servers and number of customers. By reducing the theoretical results into Markov chains, it is possible to prove the correctness of its theorems. Usual task of the queueing theory is to '''predict''' the '''queue lengths''' and '''waiting times''' and '''optimize''' these '''results''' by changing its properties (i.e. type of the queue, number of servers-shop assistants). Its first thoughts were made by a Danish mathematician Agner Krarup Erlang at the '''beginning of the 20th century'''.&lt;br /&gt;
&lt;br /&gt;
==Motivation - why learn queueing theory?==&lt;br /&gt;
&lt;br /&gt;
[[File: Autobus_mhd.jpg|thumb|upright=1.25| '''Did you know...?''' - Application of the queueing theory simulations helped the Prague Public Transportation save five bus vehicles a day on the longest distance line. &amp;lt;ref name=&amp;quot;praguemhd&amp;quot;&amp;gt;[ ČESKÁ TELEVIZE. Teorie front. 2007. Available at: http://www.ceskatelevize.cz/porady/10121359557-port/81-teorie-front/video/]&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
Everyone hates waiting in queues, while everyone is forced to do it often. The queueing theory helps both parts of market - the customer has to wait shorter time, while the merchandiser has to pay less shop assistants. But the field of study doesn't focus only on the queues in the shopping malls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where is the queueing theory usually applied? These are the most common fields:&lt;br /&gt;
&lt;br /&gt;
* '''Optimize the number of shop assistants''' in big shopping centers, so that the customers may wait shorter time, but the sellers may also use less shop assistants and therefore save money.&lt;br /&gt;
* Improve '''processes at banks or post offices''' - it is possible to simulate, what type of lines are the most appropriate under certain circumstances.&lt;br /&gt;
* Very often, it is used for '''improving manufacturing processes'''. Simulation of the production of items can result in more budget-wise systems, which can produce more goods in shorter time, thanks the the reduction of possible bottlenecks.&lt;br /&gt;
* '''Transportation systems simulations''' - by simulation of junctions, traffic lights can be configured, so that they help making the traffic as smooth as possible.&lt;br /&gt;
* '''Call centers''' - simulation can help predicting the number of incoming calls and the number of necessary operators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Disclaimer: This chapter is written primarily for beginners and ones, who have only light background in operations research, computer science and industrial engineering. It is intended to be used as a study text, therefore you can find questions at the end of each part to make sure you understand the topic correctly. Important information are written in '''bold'''. Interesting - not necessary to remember -  information can be found in box &amp;quot;Did you know...?&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Name three different possible situations, where the queueing theory may help optimize the process.&lt;br /&gt;
* Let's say you're in a post office. What are the advantages of having only one line which belongs to multiple reception desks?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classification==&lt;br /&gt;
&lt;br /&gt;
Classification tree: '''Mathematics''' &amp;gt; '''Applied mathematics''' &amp;gt; '''Operations research''' &amp;gt; '''Queueing theory'''&lt;br /&gt;
&lt;br /&gt;
The queuing theory is considered as a branch of operations research, which belongs to the applied mathematics. Operations research is usually taught in faculties of engineering, public policy or business. This field focuses on the human-technology interaction and put an emphasizes on practical usage, searching for the best possible result (usually the maximum - profit, performance; or minimum - loss, risk, cost). Between other major operations research disciplines usually belongs: Computing and information technologies, &lt;br /&gt;
financial engineering, manufacturing, service sciences, supply chain management, marketing engineering, policy modeling and public sector work, revenue management, simulation, stochastic models and transportation. &amp;lt;ref name=&amp;quot;opresearch&amp;quot;&amp;gt;[ What is Operations Research. Lancester University [online]. 2014 [cit. 2015-01-24]. Available at: http://www.lancaster.ac.uk/lums/study/masters/programmes/msc-operational-research-management-science/what-is-operational-research/&lt;br /&gt;
 ]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=infobox width=350px&lt;br /&gt;
|style=&amp;quot;background:yellow;color:#000&amp;quot;|&amp;lt;center&amp;gt;'''Quick tip''' &amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Questions in the end of each part should help you summarize what you know and challenge a little bit. Not sure how to answer one? Read suggested resources and look it up on Google.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Name at least two other subdisciplines of the Operations research and one subdiscipline of Applied mathematics.&lt;br /&gt;
* Which other mathematical disciplines may be useful to know for studying the queueing theory?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
[[Image:Erlang.jpg|thumb|left|275px|Agner Krarup Erlang - father of Queuing theory]]&lt;br /&gt;
[[Image:workers.jpg|thumb|right|250px|At the beginning of the 20th century, most telephone exchange stations were using human operators and cord boards for switching telephone calls using jack plugs.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It all started in 1909 in a Copenhagen phone company, where an engineer '''Agner Erlang''' (1878-1929) asked himself: How many trunk lines are necessary to adequately service an entire city. &amp;lt;ref name=&amp;quot;erlang&amp;quot;&amp;gt;[ Agner Krarup Erlang. Plus Magazine - living mathematics [online]. 1997 [cit. 2015-01-24]. Available at: http://plus.maths.org/content/os/issue2/erlang/index]&amp;lt;/ref&amp;gt; You could use just one, but that would result into huge delays, because the people would have to wait until the trunk is empty. Or you could install one for each phone, which would be extremely expensive and wasteful, since most people only call short time of the day. The telephone company needed a perfect compromise. Erlang found out, that knowing the average number of calls in an hour and the average call duration, one can estimate the number of trunk lines needed. The problem comes from the fact that the people can call in bunches, meaning that more people call at one time, and less later. Somebody can also block the trunk line longer than expected. Erlang came with a solution. He was able to count the number of trunk lines and get the percentage of callers with blocked calls, which made it possible to predict the adequate numbers for different time periods. And that was the beginning of queuing theory - when he published his work The Theory of Probabilities and Telephone Conversations.&lt;br /&gt;
&lt;br /&gt;
Another important name connected with the theory, is '''David George Kendall''' (1918-2007), an English statistician, working mainly in field of probability. Kendall was the first to use the term Queuing theory, in his work &amp;quot;Some Problems in the Theory of Queues&amp;quot; (1951) &amp;lt;ref name=&amp;quot;kendall&amp;quot;&amp;gt;[ David George Kendall. St. Andrews University [online]. 1998 [cit. 2015-01-24]. Available at: http://www-history.mcs.st-andrews.ac.uk/Biographies/Kendall.html]&amp;lt;/ref&amp;gt;. He is well known for coming up with so-called '''Kendall's notation'''. It is a standard system used for describing and classifying a queuing node.&lt;br /&gt;
&lt;br /&gt;
Even the Soviets contributed to the field of queueing theory more than little. Mathematicians '''Andrey Kolmogorov''' (1903-1987), '''Alexander Khinchin''' (1903-1987) were directly interested in this theory, often extending the theory of '''Andrey Markov''' (1856-1922) - Markov chains and Markov processes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Who is considered as the first to work on the queueing theory?&lt;br /&gt;
* What is a Kendall's notation?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Types of queueing systems==&lt;br /&gt;
Queueing systems may have different structure. For example, there can be one line, multiple lines, one sever or more servers with complicated connection.&lt;br /&gt;
&lt;br /&gt;
Queueing systems can be divided by these criteria&amp;lt;ref name=&amp;quot;que&amp;quot;&amp;gt;[ ADAN, Ivo a Jacques RESING. Queueing Theory. Queueing Theory. 2002, n. 1. Available at:h ttp://www.win.tue.nl/~iadan/queueing.pdf ]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
===Source of customers===&lt;br /&gt;
* '''Finite''' - the source of customers is finite, when it is possible and practical to count with the maximum possible number of customers.&lt;br /&gt;
* '''Infinite''' - usually, the source is considered as infinite, because the theoretical maximum value is too high.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Arrival of customers to the system===&lt;br /&gt;
It can be described by two properties:&lt;br /&gt;
* '''Intensity of new customers''' - number of customers per one time unit.&lt;br /&gt;
* '''Interval between single tasks''' - time between two subsequent customers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When we know one of these information, it is easy to figure out the second. The intensity and intervals may be divided in two possible types:&lt;br /&gt;
* '''Deterministic''' - the intervals between two subsequent customers (tasks) are fixed. This usually happens in manufactures.&lt;br /&gt;
* '''Stochastic''' - The arrivals vary, being described by some probabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Service time distribution===&lt;br /&gt;
The time spent while '''being serviced''' can be also either '''deterministic''' or '''stochastic'''. Most often, an exponential spread of a random variable X is being used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Network of servers===&lt;br /&gt;
The number of servers is crucial for the entire system. The goal of the queueing theory is to find the ideal number of servers, to satisfy both the customers and the owner.&lt;br /&gt;
* '''One server '''- this is the easiest type. Just one check desk in a small local shop for example.&lt;br /&gt;
* '''More servers parallel'' - the servers offer the same service. Typical example are the checking desks in big supermarkets. These can be further divided into another two categories: Having '''separate waiting line''' for each server, or having '''one line for all''', which then spreads.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Queue characteristics===&lt;br /&gt;
This information shows, what rules are applied for letting the customer in the queue be served.&lt;br /&gt;
* '''FIFO - First In, First Out '''- the most common type. The one, who comes first, is also the first to be served. Classical queue in a shop.&lt;br /&gt;
* '''LIFO - Last In, First Out''' - servers always accept the ones, who are in the queue the shortest time.&lt;br /&gt;
* '''SIRO - Select in Random Order''' - the order, in which the customers joined the queue, is irrelevant, because the servers pick the customers randomly.&lt;br /&gt;
* '''PRI - Priorities '''- it is possible to set some priorities, which will help to decide, who goes first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special characteristics of queues===&lt;br /&gt;
* '''Limit of queue capacity''' - shows the maximum capacity of the line, not allowing anyone else joining it, if reached.&lt;br /&gt;
* '''Patience of customers '''- it is possible (and also often very important), to take into account customer's patience. When the system doesn't care about it, it can be said, that the '''customers' patience is unlimited.''' It means, that they will wait in the queue as long as needed. But when the patience is '''limited''', it is possible, that the customer simply rejects to join the line (and doesn't buy anything), because it is too long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* What would happen, if LIFO type of queues were used in supermarkets?&lt;br /&gt;
* What are the advantages and disadvantages of single and multiple servers (cheking desks) in supermarkets?&lt;br /&gt;
* Name one process at place, where PRI type of queues is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Kendall's notation==&lt;br /&gt;
Kendall's notation is a commonly used system for describing and classifying queues. Originally, these nodes were described by three factors A/S/c. Later, it has been extended to six factors - A/S/c/K/N/D:&lt;br /&gt;
* '''A''' = time between arrivals to the queue. Possible codes are: M (Markovian or memoryless - Poisson process), M&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt; (batch Markov), MAP (Markovian arrival process), BMAP (Batch Markovian arrival process), MMPP (Markov modulated poisson process), D (Degenerate distribution), E&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; (Erlang distribution), G (General distribution), PH (Phase-type distribution).&lt;br /&gt;
* '''S '''= service time distribution. Possible codes: M (Markovian or memoryless), M&amp;lt;sup&amp;gt;Y&amp;lt;/sup&amp;gt; (bulk Markov), MMPP (Markov modulated poisson process), D (Degenerate distribution), E&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; (Erlang distribution), G (General distribution), PH (Phase-type distribution).&lt;br /&gt;
* '''c '''= number of servers (service channels)&lt;br /&gt;
* '''K''' = capacity of the queue - the maximum capacity of customers in whole system (including the ones being served)&lt;br /&gt;
* '''D ''' = queueing discipline - how to customers in the queue are being served&lt;br /&gt;
* '''N''' = size of population - the number of people who can possibly get into the system and become customers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* What does the M/m/1 queue in the Kendall's notation mean?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Suitable software==&lt;br /&gt;
===Java Modelling Tools===&lt;br /&gt;
[[Image:jmt.jpg|400px|thumb|right|Java Modelig Tools in action - designing of Markov Chain]]&lt;br /&gt;
[[Image:Jmtgui.png|300px|thumb|left|Java Modelig Tools in action - JSIMgraph - the graphical user interface for simulating queues systems]]&lt;br /&gt;
Java Modelling Tools (JMT) areapplications developed by Politecnico di Milano and Imperial College London, released under GPL license. At this time (January 2015), they include six applications:&lt;br /&gt;
* '''JSIMgraph '''- Queueing network models simulator with GUI &lt;br /&gt;
* '''JSIMwiz '''- Queueing network models simulator with wizard-based UI&lt;br /&gt;
* '''JMVA '''- Mean Value Analysis and Approximate solution algorithms for queueing models &lt;br /&gt;
* '''JABA '''- Asymptotic Analysis and bottlenecks identification of queueing network models &lt;br /&gt;
* '''JWAT '''- Workload characterization from log data &lt;br /&gt;
* '''JMCH '''- Markov chain simulator&lt;br /&gt;
&lt;br /&gt;
Java Modelling Tools is platform-independent and requires only the Java Runtime Environment (version 1.6 or later). &amp;lt;ref name=&amp;quot;jmt&amp;quot;&amp;gt;[ Java Modelling Tools. JMT [online]. 2015 [cit. 2015-01-24]. Available at: http://jmt.sourceforge.net/&lt;br /&gt;
 ]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===MATLAB===&lt;br /&gt;
[[Image:matlab.png|200px|thumb|right|Using MATLAB - visualization of the number of customers, waiting in a queue]]&lt;br /&gt;
&lt;br /&gt;
If you're interested in mathematics, solving difficult tasks and visualizing data, you probably know the MATLAB software. It can also be used for simulating the queues and application of it's theories.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modelling == &lt;br /&gt;
To make a mathematical model of the queue system, we need to use these variables:&lt;br /&gt;
* Entry of items&lt;br /&gt;
* Length of serving&lt;br /&gt;
* Network of servers&lt;br /&gt;
* Rules for leaving the queues to be served&lt;br /&gt;
* Specific parts of the system&lt;br /&gt;
&lt;br /&gt;
{| class=infobox width=350px&lt;br /&gt;
|style=&amp;quot;background:#33CC33;color:#FFFFFF&amp;quot;|&amp;lt;center&amp;gt;'''Did you know...?'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| If you want to make simple calculations based on the queueing theory faster, you can use an automatic online tool. After opening the webpage, you have to choose the queueing model and input all required values. After the fast calculation is done, you get the results described in this chapter.&lt;br /&gt;
&lt;br /&gt;
The tool can be accessed here: http://www.supositorio.com/rcalc/rcalclite.htm&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
What sort of questions the mathematical model should answer about the line:&lt;br /&gt;
* How long does the service takes on average.&lt;br /&gt;
* How long do the people wait on average.&lt;br /&gt;
* What are the odds of the line being empty.&lt;br /&gt;
* How long is the line on average.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* How would you count, how long the service takes on average?&lt;br /&gt;
* Open the tool &amp;quot;Supositorio&amp;quot; and try it out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Real world examples==&lt;br /&gt;
These are two chosen examples from real world, where the application of the queueing theory had significant impact:&lt;br /&gt;
&lt;br /&gt;
===Prague public transportation===&lt;br /&gt;
Queueing theory's results are used for setting traffic lights up. Engineers use several micro-simulation software programs, which can adequately simulate the movement of cars and people. It is possible to specify all necessary attributes like number of cars per time unit, size of the road, size of the cars, type of drivers (whether they are aggressive or not...). Traffic lights can also reply to current traffic situation, and for example let public transportation vehicles go faster, by allowing them to pass the junction quicker than the other roads. Using these optimizations saved 20 seconds in average for each bus and each optimised junction it is crossing, which can lead to millions of saved Czech crowns per year. &amp;lt;ref name=&amp;quot;praguemhd&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Disney-world management of waiting lines===&lt;br /&gt;
[[Image:disney.png|300px|thumb|right|Entrance to the Disney Park in Florida.]]&lt;br /&gt;
It wouldn't be very interesting to describe the process of optimizing and simulating of the waiting lines in Disney Parks, because it would be very similar to all such simulations. What they focus much more on is the psychological aspects of waiting. MIT professor Dick Larson says, that the main problem isn't the delay itself, but how it is experienced. “Disney has been the absolute master of this aspect of queue psychology,” says Larson. “You might wait 45 minutes for an 8-minute ride at Disney World. But they’ll make you feel like the ride has started while you’re still on line. They build excitement and provide all kinds of diversions in the queue channel.” It is possible thanks to series of chambers that the queue is passing, using LCD display's with interesting animations and other interactive tools.&amp;lt;ref name=&amp;quot;stevenson&amp;quot;&amp;gt;[ STEVENSON, Seth. What You Hate Most About Waiting in Line. Slate.com [online]. 2014 [cit. 2015-01-24]. Available at: http://www.slate.com/articles/business/operations/2012/06/queueing_theory_what_people_hate_most_about_waiting_in_line_.html]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Can you name three possibilities, how to make waiting in a queue more comfortable?&lt;br /&gt;
* Do you know some examples of comfortable waiting lines in your neighborhood?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
http://people.brunel.ac.uk/~mastjjb/jeb/or/queue.html&lt;br /&gt;
&lt;br /&gt;
https://books.google.cz/books?id=ogVwgWwXJbIC&amp;amp;pg=PA4&amp;amp;lpg=PA4&amp;amp;dq=Andrey+Kolmogorov+queueing+theory&amp;amp;source=bl&amp;amp;ots=zgSwxk3oeb&amp;amp;sig=u-Xnvqa49sYYgTigidkEYwk_qr4&amp;amp;hl=cs&amp;amp;sa=X&amp;amp;ei=kJDEVI_dE4boywPKvYHgBg&amp;amp;ved=0CDUQ6AEwAg#v=onepage&amp;amp;q=Andrey%20Kolmogorov%20queueing%20theory&amp;amp;f=false&lt;br /&gt;
&lt;br /&gt;
http://www.win.tue.nl/~iadan/queueing.pdf&lt;br /&gt;
&lt;br /&gt;
http://wwwhome.math.utwente.nl/~boucherierj/onderwijs/Advanced%20Queueing%20Theory/AQTsheetshc1.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.mathworks.com/discovery/queuing-theory.html&lt;br /&gt;
&lt;br /&gt;
https://mattachak.wordpress.com/2014/02/28/understanding-erlang-and-queuing-theory/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Queueing_theory&amp;diff=9075</id>
		<title>Queueing theory</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Queueing_theory&amp;diff=9075"/>
		<updated>2015-01-25T22:14:11Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: Created page with &amp;quot;The queuing theory is a '''mathematical method for analyzing the congestions and delays of waiting in line'''. The theory takes into consideration every component involved in ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The queuing theory is a '''mathematical method for analyzing the congestions and delays of waiting in line'''. The theory takes into consideration every component involved in waiting in line: proccess to serve, number of servers and number of customers. By reducing the theoretical results into Markov chains, it is possible to prove the correctness of its theorems. Usual task of the queuing theory is to '''predict''' the '''queue lengths''' and '''waiting times''' and '''optimise''' these '''results''' by changing its properties (i.e. type of the queue, number of servers-shop assistants). Its first thoughs were made by a Danish mathematician Agner Krarup Erlang at the '''beginning of the 20th century'''.&lt;br /&gt;
&lt;br /&gt;
==Motivation - why learn queuing theory?==&lt;br /&gt;
&lt;br /&gt;
[[File: Autobus_mhd.jpg|thumb|upright=1.25| '''Did you know...?''' - Application of the queuing theory simulations helped the Prague Public Transportation save five bus vehicles a day on the longest distance line. &amp;lt;ref name=&amp;quot;praguemhd&amp;quot;&amp;gt;[ ČESKÁ TELEVIZE. Teorie front. 2007. Available at: http://www.ceskatelevize.cz/porady/10121359557-port/81-teorie-front/video/]&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
Everyone hates waiting in queues, while everyone is forced to do it often. The queuing theory helps both parts of market - the customer has to wait shorter time, while the merchandiser has to pay less shop assistants. But the field of study doesn't focus only on the queues in the shopping malls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where is the queuing theory usually applied? These are the most common fields:&lt;br /&gt;
&lt;br /&gt;
* '''Optimise the number of shop assistants''' in big shopping centers, so that the customers may wait shorter time, but the sellers may also use less shop assistants and therefore save money.&lt;br /&gt;
* Improve '''processes at banks or post offices''' - it is possible to simulate, what type of lines are the most appropriate under certain circumstances.&lt;br /&gt;
* Very often, it is used for '''improving manufacturing processes'''. Simulation of the production of items can result in more budget-wise systems, which can produce more goods in shorter time, thanks the the reduction of possible bottlenecks.&lt;br /&gt;
* '''Transportation systems simulations''' - by simulation of junctions, traffic lights can be configured, so that they help making the traffic as smooth as possible.&lt;br /&gt;
* '''Call centers''' - simulation can help predicting the number of incoming calls and the number of necessary operators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Disclaimer: This chapter is written primarily for beginners and ones, who have only light background in operations research, computer science and industrial engineering. It is intended to be used as a study text, therefore you can find questions at the end of each part to make sure you understand the topic correctly. Important information are written in '''bold'''. Interesting - not necessary to remember -  information can be found in box &amp;quot;Did you know...?&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Name three different possible situations, where the queueing theory may help optimise the proccess.&lt;br /&gt;
* Let's say you're in a post office. What are the advantages of having only one line which belongs to multiple reception desks?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classification==&lt;br /&gt;
&lt;br /&gt;
Classification tree: '''Mathematics''' &amp;gt; '''Applied mathematics''' &amp;gt; '''Operations research''' &amp;gt; '''Queuing theory'''&lt;br /&gt;
&lt;br /&gt;
The queuing theory is considered as a branch of operations research, which belongs to the applied mathematics. Operations research is usually taught in faculties of engineering, public policy or business. This field focuses on the human-technology interaction and put an emphasises on practical usage, searching for the best possible result (usually the maximum - profit, performance; or minimum - loss, risk, cost). Between other major operations research disciplines usually belongs: Computing and information technologies, &lt;br /&gt;
financial engineering, manufacturing, service sciences, supply chain management, marketing engineering, policy modeling and public sector work, revenue management, simulation, stochastic models and transportation. &amp;lt;ref name=&amp;quot;opresearch&amp;quot;&amp;gt;[ What is Operations Research. Lancester University [online]. 2014 [cit. 2015-01-24]. Available at: http://www.lancaster.ac.uk/lums/study/masters/programmes/msc-operational-research-management-science/what-is-operational-research/&lt;br /&gt;
 ]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=infobox width=350px&lt;br /&gt;
|style=&amp;quot;background:yellow;color:#000&amp;quot;|&amp;lt;center&amp;gt;'''Quick tip''' &amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Questions in the end of each part should help you summarize what you know and challenge a little bit. Not sure how to answer one? Read suggested resources and look it up on Google.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Name at least two other subdisciplines of the Operations research and one subdiscipline of Applied mathematics.&lt;br /&gt;
* Which other mathematical disciplines may be usefull to know for studying the queueing theory?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
[[Image:Erlang.jpg|thumb|left|275px|Agner Krarup Erlang - father of Queuing theory]]&lt;br /&gt;
[[Image:workers.jpg|thumb|right|250px|At the beginning of the 20th century, most telephone exchange stations were using human operators and cord boards for switching telephone calls using jack plugs.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It all started in 1909 in a Copenhagen phone company, where an engineer '''Agner Erlang''' (1878-1929) asked himself: How many trunk lines are necessary to adequately service an entire city. &amp;lt;ref name=&amp;quot;erlang&amp;quot;&amp;gt;[ Agner Krarup Erlang. Plus Magazine - living mathematics [online]. 1997 [cit. 2015-01-24]. Available at: http://plus.maths.org/content/os/issue2/erlang/index]&amp;lt;/ref&amp;gt; You could use just one, but that would result into huge delays, bacause the people would have to wait until the trunk is empty. Or you could install one for each phone, which would be extremely expensive and wasteful, since most people only call short time of the day. The telephone company needed a perfect compromise. Erlang found out, that knowing the average number of calls in an hour and the average call duration, one can estimate the number of trunk lines needed. The problem comes from the fact that the people can call in bunches, meaning that more people call at one time, and less later. Somebody can also block the trunk line longer than expected. Erlang came with a solution. He was able to count the number of trunk lines and get the percentage of callers with blocked calls, which made it possible to predict the adequate numbers for different time periods. And that was the beginning of queuing theory - when he published his work The Theory of Probabilities and Telephone Conversations.&lt;br /&gt;
&lt;br /&gt;
Another important name connected with the theory, is '''David George Kendall''' (1918-2007), an English statistician, working mainly in field of probability. Kendall was the first to use the term Queuing theory, in his work &amp;quot;Some Problems in the Theory of Queues&amp;quot; (1951) &amp;lt;ref name=&amp;quot;kendall&amp;quot;&amp;gt;[ David George Kendall. St. Andrews University [online]. 1998 [cit. 2015-01-24]. Available at: http://www-history.mcs.st-andrews.ac.uk/Biographies/Kendall.html]&amp;lt;/ref&amp;gt;. He is well known for coming up with so-called '''Kendall's notation'''. It is a standard system used for describing and classifying a queuing node.&lt;br /&gt;
&lt;br /&gt;
Even the Soviets contributed to the field of queueing theory more than little. Matematicians '''Andrey Kolmogorov''' (1903-1987), '''Alexander Khinchin''' (1903-1987) were directly interested in this theory, often extending the theory of '''Andrey Markov''' (1856-1922) - Markov chains and Markov processes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Who is considered as the first to work on the queuing theory?&lt;br /&gt;
* What is a Kendall's notation?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Types of queuing systems==&lt;br /&gt;
Queueing systems may have different structure. For example, there can be one line, multiple lines, one sever or more servers with complicated connection.&lt;br /&gt;
&lt;br /&gt;
Queueing systems can be divided by these criterias&amp;lt;ref name=&amp;quot;que&amp;quot;&amp;gt;[ ADAN, Ivo a Jacques RESING. Queueing Theory. Queueing Theory. 2002, n. 1. Available at:h ttp://www.win.tue.nl/~iadan/queueing.pdf ]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
===Source of customers===&lt;br /&gt;
* '''Finite''' - the source of customers is finite, when it is possible and practical to count with the maximum possible number of customers.&lt;br /&gt;
* '''Infinite''' - usually, the source is considered as infinite, because the theoretical maximum value is too high.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Arrival of customers to the system===&lt;br /&gt;
It can be described by two properties:&lt;br /&gt;
* '''Intensity of new customers''' - number of customers per one time unit.&lt;br /&gt;
* '''Interval between single tasks''' - time between two subsequent customers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When we know one of these information, it is easy to figure out the second. The intensity and intervals may be divided in two possible types:&lt;br /&gt;
* '''Deterministic''' - the intervals between two subsequent customers (tasks) are fixed. This usually happens in manufactures.&lt;br /&gt;
* '''Stochastic''' - The arrivals vary, being described by some probabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Service time distribution===&lt;br /&gt;
The time spent while '''being serviced''' can be also either '''deterministic''' or '''stochastic'''. Most often, an exponencial spread of a random variable X is being used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Network of servers===&lt;br /&gt;
The number of servers is crucial for the entire system. The goal of the queueing theory is to find the ideal number of servers, to satisfy both the customers and the owner.&lt;br /&gt;
* '''One server '''- this is the easiest type. Just one check desk in a small local shop for example.&lt;br /&gt;
* '''More servers parallely'' - the servers offer the same service. Typical example are the checking desks in big supermarkets. These can be further divided into another two categories: Having '''separate waiting line''' for each server, or having '''one line for all''', which then spreads.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Queue characteristics===&lt;br /&gt;
This information shows, what rules are applied for letting the customer in the queue be served.&lt;br /&gt;
* '''FIFO - First In, First Out '''- the most common type. The one, who comes first, is also the first to be served. Classical queue in a shop.&lt;br /&gt;
* '''LIFO - Last In, First Out''' - servers always accept the ones, who are in the queue the shortest time.&lt;br /&gt;
* '''SIRO - Select in Random Order''' - the order, in which the customers joined the queue, is irrelevant, because the servers pick the customers randomly.&lt;br /&gt;
* '''PRI - Priorities '''- it is possible to set some priorities, which will help to decide, who goes first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special characteristics of queues===&lt;br /&gt;
* '''Limit of queue capacity''' - shows the maximum capacity of the line, not allowing anyone else joining it, if reached.&lt;br /&gt;
* '''Patience of customers '''- it is possible (and also often very important), to take into account customer's patience. When the system doesn't care about it, it can be said, that the '''customers' patience is unlimited.''' It means, that they will wait in the queue as long as needed. But when the patience is '''limited''', it is possible, that the customer simply rejects to join the line (and doesn't buy anything), because it is too long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* What would happen, if LIFO type of queues were used in supermarkets?&lt;br /&gt;
* What are the advantages and disadvantages of single and multiple servers (cheking desks) in supermarkets?&lt;br /&gt;
* Name one proccess ar place, where PRI type of queues is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Kendall's notation==&lt;br /&gt;
Kendall's notation is a commonly used system for describing and classifying queues. Originally, these nodes were described by three factors A/S/c. Later, it has been extended to six factors - A/S/c/K/N/D:&lt;br /&gt;
* '''A''' = time between arrivals to the queue. Possible codes are: M (Markovian or memoryless - Poisson process), M&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt; (batch Markov), MAP (Markovian arrival process), BMAP (Batch Markovian arrival process), MMPP (Markov modulated poisson process), D (Degenerate distribution), E&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; (Erlang distribution), G (General distribution), PH (Phase-type distribution).&lt;br /&gt;
* '''S '''= service time distribution. Possible codes: M (Markovian or memoryless), M&amp;lt;sup&amp;gt;Y&amp;lt;/sup&amp;gt; (bulk Markov), MMPP (Markov modulated poisson process), D (Degenerate distribution), E&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; (Erlang distribution), G (General distribution), PH (Phase-type distribution).&lt;br /&gt;
* '''c '''= number of servers (service channels)&lt;br /&gt;
* '''K''' = capacity of the queue - the maximum capacity of customers in whole system (including the ones being served)&lt;br /&gt;
* '''D ''' = queueing discipline - how to customers in the queue are being served&lt;br /&gt;
* '''N''' = size of population - the number of people who can possibly get into the system and become customers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* What does the M/m/1 queue in the Kendall's notation mean?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Suitable software==&lt;br /&gt;
===Java Modelling Tools===&lt;br /&gt;
[[Image:jmt.jpg|400px|thumb|right|Java Modelig Tools in action - designing of Markov Chain]]&lt;br /&gt;
[[Image:Jmtgui.png|300px|thumb|left|Java Modelig Tools in action - JSIMgraph - the graphical user interface for simulating queues systems]]&lt;br /&gt;
Java Modelling Tools (JMT) areapplications developed by Politecnico di Milano and Imperial College London, released under GPL license. At this time (January 2015), they include six applications:&lt;br /&gt;
* '''JSIMgraph '''- Queueing network models simulator with GUI &lt;br /&gt;
* '''JSIMwiz '''- Queueing network models simulator with wizard-based UI&lt;br /&gt;
* '''JMVA '''- Mean Value Analysis and Approximate solution algorithms for queueing models &lt;br /&gt;
* '''JABA '''- Asymptotic Analysis and bottlenecks identification of queueing network models &lt;br /&gt;
* '''JWAT '''- Workload characterization from log data &lt;br /&gt;
* '''JMCH '''- Markov chain simulator&lt;br /&gt;
&lt;br /&gt;
Java Modelling Tools is platform-independent and requires only the Java Runtime Environment (version 1.6 or later). &amp;lt;ref name=&amp;quot;jmt&amp;quot;&amp;gt;[ Java Modelling Tools. JMT [online]. 2015 [cit. 2015-01-24]. Available at: http://jmt.sourceforge.net/&lt;br /&gt;
 ]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===MATLAB===&lt;br /&gt;
[[Image:matlab.png|200px|thumb|right|Using MATLAB - visualisation of the number of customers, waiting in a queue]]&lt;br /&gt;
&lt;br /&gt;
If you're interested in mathematics, solving difficult tasks and visualising data, you probably know the MATLAB software. It can also be used for simulating the queues and application of it's theories.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modelling == &lt;br /&gt;
To make a mathematical model of the queue system, we need to use these variables:&lt;br /&gt;
* Entry of items&lt;br /&gt;
* Length of serving&lt;br /&gt;
* Network of servers&lt;br /&gt;
* Rules for leaving the queues to be served&lt;br /&gt;
* Specific parts of the system&lt;br /&gt;
&lt;br /&gt;
{| class=infobox width=350px&lt;br /&gt;
|style=&amp;quot;background:#33CC33;color:#FFFFFF&amp;quot;|&amp;lt;center&amp;gt;'''Did you know...?'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| If you want to make simple calculations based on the queueing theory faster, you can use an automatic online tool. After opening the webpage, you have to choose the queueing model and input all required values. After the fast calculation is done, you get the results described in this chapter.&lt;br /&gt;
&lt;br /&gt;
The tool can be accessed here: http://www.supositorio.com/rcalc/rcalclite.htm&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
What sort of questions the mathematical model should answer about the line:&lt;br /&gt;
* How long does the service takes on average.&lt;br /&gt;
* How long do the people wait on average.&lt;br /&gt;
* What are the odds of the line being empty.&lt;br /&gt;
* How long is the line on average.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* How would you count, how long the service takes on average?&lt;br /&gt;
* Open the tool &amp;quot;Supositorio&amp;quot; and try it out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Real world examples==&lt;br /&gt;
These are two chosen examples from real world, where the application of the queueing theory had significant impact:&lt;br /&gt;
&lt;br /&gt;
===Prague public transportation===&lt;br /&gt;
Queueing theory's results are used for setting traffic lights up. Engineers use several micro-simulation software programs, which can adequately simulate the movement of cars and people. It is possible to specify all necessary attributes like number of cars per time unit, size of the road, size of the cars, type of drivers (whether they are aggressive or not...). Traffic lights can also reply to current traffic situation, and for example let public transportation vehicles go faster, by allowing them to pass the junction quicker than the other roads. Using these optimisations saved 20 seconds in average for each bus and each optimised junction it is crossing, which can lead to millions of saved Czech crowns per year. &amp;lt;ref name=&amp;quot;praguemhd&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Disney-world management of waiting lines===&lt;br /&gt;
[[Image:disney.png|300px|thumb|right|Entrance to the Disney Park in Florida.]]&lt;br /&gt;
It wouldn't be very interesting to describe the proccess of optimising and simulating of the waiting lines in Disney Parks, because it would be very simmilar to all such simulations. What they focus much more on is the psychological aspects of waiting. MIT professor Dick Larson says, that the main problem isn't the delay itself, but how it is experienced. “Disney has been the absolute master of this aspect of queue psychology,” says Larson. “You might wait 45 minutes for an 8-minute ride at Disney World. But they’ll make you feel like the ride has started while you’re still on line. They build excitement and provide all kinds of diversions in the queue channel.” It is possible thanks to series of chambers that the queue is passing, using LCD display's with interesting animations and other interactive tools.&amp;lt;ref name=&amp;quot;stevenson&amp;quot;&amp;gt;[ STEVENSON, Seth. What You Hate Most About Waiting in Line. Slate.com [online]. 2014 [cit. 2015-01-24]. Available at: http://www.slate.com/articles/business/operations/2012/06/queueing_theory_what_people_hate_most_about_waiting_in_line_.html]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Make sure you know enough...'''&lt;br /&gt;
* Can you name three possibilities, how to make waiting in a queue more comfortable?&lt;br /&gt;
* Do you know some examples of comfortable waiting lines in your neighborhoo?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
http://people.brunel.ac.uk/~mastjjb/jeb/or/queue.html&lt;br /&gt;
&lt;br /&gt;
https://books.google.cz/books?id=ogVwgWwXJbIC&amp;amp;pg=PA4&amp;amp;lpg=PA4&amp;amp;dq=Andrey+Kolmogorov+queueing+theory&amp;amp;source=bl&amp;amp;ots=zgSwxk3oeb&amp;amp;sig=u-Xnvqa49sYYgTigidkEYwk_qr4&amp;amp;hl=cs&amp;amp;sa=X&amp;amp;ei=kJDEVI_dE4boywPKvYHgBg&amp;amp;ved=0CDUQ6AEwAg#v=onepage&amp;amp;q=Andrey%20Kolmogorov%20queueing%20theory&amp;amp;f=false&lt;br /&gt;
&lt;br /&gt;
http://www.win.tue.nl/~iadan/queueing.pdf&lt;br /&gt;
&lt;br /&gt;
http://wwwhome.math.utwente.nl/~boucherierj/onderwijs/Advanced%20Queueing%20Theory/AQTsheetshc1.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.mathworks.com/discovery/queuing-theory.html&lt;br /&gt;
&lt;br /&gt;
https://mattachak.wordpress.com/2014/02/28/understanding-erlang-and-queuing-theory/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2014/2015&amp;diff=9074</id>
		<title>WS 2014/2015</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2014/2015&amp;diff=9074"/>
		<updated>2015-01-25T22:11:11Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2014/2015. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2014/2015|assignment approved]].&lt;br /&gt;
&lt;br /&gt;
==Simulations==&lt;br /&gt;
&lt;br /&gt;
--[[User:Zhua00|Andriy Zhubryd]] 14:24, 15 January 2015 (CET) [[E-Sim Optimal Equipment Selection]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Xgubk00|Xgubk00]] 12:24, 17 January 2015 (CET) [[Flood evacuation]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Xzasj00|Xzasj00]] 00:07, 18 January 2015 (CET) [[Formula 1 teams economic situation]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Qnovm21|Qnovm21]] 10:33, 18 January 2015 (CET) [[Simulation of the surgery staff in a hospital]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Xzigm03|Xzigm03]] 23:40, 18 January 2015 (CET) [[Poker probabilities and variance simulation]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Xkraj119|Xkraj119]] 14:41, 24 January 2015 (CET) [[Software Support Lifecycle]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Xcesj04|Xcesj04]] 23:00, 25 January 2015 (CET) [[Ideal latency between a metro trains]]&lt;br /&gt;
&lt;br /&gt;
==Papers==&lt;br /&gt;
&lt;br /&gt;
--[[User:Xgubk00|Xgubk00]] 12:24, 17 January 2015 (CET) [[Game theory]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Qnovm21|Qnovm21]] 16:40, 21 January 2015 (CET) [[Causal loop diagram]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Xkraj119|Xkraj119]] 10:32, 24 January 2015 (CET) [https://en.wikipedia.org/wiki/Growth_and_underinvestment Growth and Underinvestment Archetype]&lt;br /&gt;
&lt;br /&gt;
--[[User:Xzasj00|Xzasj00]] 18:57, 24 January 2015 (CET) [https://en.wikipedia.org/wiki/Escalation_Archetype Escalation Archetype]&lt;br /&gt;
&lt;br /&gt;
--[[User:Xzigm03|Xzigm03]] 23:11, 25 January 2015 (CET) [[Queueing theory]]&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Disney.png&amp;diff=9072</id>
		<title>File:Disney.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Disney.png&amp;diff=9072"/>
		<updated>2015-01-25T19:38:36Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Matlab.png&amp;diff=9053</id>
		<title>File:Matlab.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Matlab.png&amp;diff=9053"/>
		<updated>2015-01-25T17:56:33Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Jmtgui.png&amp;diff=9049</id>
		<title>File:Jmtgui.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Jmtgui.png&amp;diff=9049"/>
		<updated>2015-01-25T17:38:48Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Jmt.jpg&amp;diff=9041</id>
		<title>File:Jmt.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Jmt.jpg&amp;diff=9041"/>
		<updated>2015-01-25T17:12:54Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Workers.jpg&amp;diff=8959</id>
		<title>File:Workers.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Workers.jpg&amp;diff=8959"/>
		<updated>2015-01-25T03:34:05Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Erlang.jpg&amp;diff=8958</id>
		<title>File:Erlang.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Erlang.jpg&amp;diff=8958"/>
		<updated>2015-01-25T03:15:53Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: http://www.polytechphotos.dk&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.polytechphotos.dk&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Autobus_mhd.jpg&amp;diff=8957</id>
		<title>File:Autobus mhd.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Autobus_mhd.jpg&amp;diff=8957"/>
		<updated>2015-01-25T02:34:14Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: Aktron / Wikimedia&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Aktron / Wikimedia&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Poker_probabilities_and_variance_simulation&amp;diff=8289</id>
		<title>Poker probabilities and variance simulation</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Poker_probabilities_and_variance_simulation&amp;diff=8289"/>
		<updated>2015-01-18T23:04:36Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: Only added images (I have noticed that they didn't show up, no text or content changes after deadline)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction =&lt;br /&gt;
The goal of my research, called „Poker probabilities and variance simulation“, is to make an own simulator tool in a traditional programming language, which will be able to simulate winning probabilities of starting poker cards. The main part of the research stands in graphical outputs of the simulator. The program will be able to produce graphs, which will be showing the results variance during Monte Carlo simulations of compared starting cards. This research describes the technology used for producing the tool and provides the readers with graphical results. I decided for the poker topic because it’s my favourite card game. And as a software developer, I see making an own simulator as a challange. The code itself is hosted as a .zip file, link provided.&lt;br /&gt;
&lt;br /&gt;
•	Project name: Poker probabilities and variance simulation&lt;br /&gt;
&lt;br /&gt;
•	Class: 4IT496 Simulation of Systems (WS 2014/2015)&lt;br /&gt;
&lt;br /&gt;
•	Author: Marian Zikmund&lt;br /&gt;
&lt;br /&gt;
•	Model type: Monte Carlo&lt;br /&gt;
&lt;br /&gt;
•	Technologies used: Programming language JavaScript (NodeJS), software MS Office Excel 2013 for small tables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
In this part, the technogolies, which were used for making the simulator, are described. The simulator is accessible as a webpage (Single page application). &lt;br /&gt;
&lt;br /&gt;
The programming part of this project can be divided in two parts – frontend and backend. For the frontend, languages HTML, CSS, JavaScript and CoffeeScript, with libraries Bootstrap, jQuery and D3.js were used. The project is built to make the possibility of counting the results both on the frontend in the browser or on the backend server. That is possible thanks to the sharing of the same JavaScript code on the server and in the browser. Technologies NodeJS, Gulp, CoffeeScript and Browserify are used to make this happen.&lt;br /&gt;
&lt;br /&gt;
==Programming workflow was as follows:==&lt;br /&gt;
===Setup the whole project===&lt;br /&gt;
By this, several small procedures are meant. It is necessary and practical for later faster development to initiate a Git repository (for version control) and set the development environment correctly. I chose NodeJS environment as the most suitable one for this task. When starting a new project using NodeJS, it is very useful to use a tool called Gulp. It makes all tasks, which need to be made periodically, automatic.&lt;br /&gt;
&lt;br /&gt;
===Make the user interface===&lt;br /&gt;
The UI is simple, using the classical Twitter Bootstrap CSS framework,which makes it look clean and simple. Therefore, no graphical tools (like Adobe Photoshop) were needed.&lt;br /&gt;
&lt;br /&gt;
===Develop frontend JavaScript code===&lt;br /&gt;
All the code was written on the server side in NodeJS environment. To make this code usable in the browser, it had to be compiled and bundled. That was made automatically by the Gulp and Browserify tools. Most of the code was even written not in the JavaScript itself, but in the CoffeeScript, a language, which has to be compiled to the JavaScript before running (it was also made by the Gulp tool).&lt;br /&gt;
&lt;br /&gt;
===Develop backend JavaScript code===&lt;br /&gt;
Backend JavaScript code also runs in the NodeJS environment. In this part, it was necessary to sketch used files (classes) and remember the dependencies. The actual Monte Carlo simulation strategy was also made in this part – further described in the next part called „Model“.&lt;br /&gt;
&lt;br /&gt;
===Glossary of the described terms:===&lt;br /&gt;
HTML, CSS – the simulator works as a classical webpage, which can be opened in a web browser, so these technologies are necessary&lt;br /&gt;
&lt;br /&gt;
JavaScript  - to make the application interactive on the client-side (in the browser), JavaScript is the only possible technology to use nowadays&lt;br /&gt;
&lt;br /&gt;
Git – version control&lt;br /&gt;
&lt;br /&gt;
CoffeeScript – language, which has to be compiled to JavaScript. Widely used for it’s beautiful syntax and faster coding possibilities&lt;br /&gt;
&lt;br /&gt;
Gulp – tool for automatization of repeatedly maked tasks &lt;br /&gt;
&lt;br /&gt;
Browserify – tool for transforming server side JavaScript to a front end JavaScript&lt;br /&gt;
&lt;br /&gt;
NodeJS – server side environment for JavaScript code&lt;br /&gt;
&lt;br /&gt;
Twitter Bootstrap – frontend CSS framework for easier coding without caring too much about the design&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=User interface=&lt;br /&gt;
==New simulation==&lt;br /&gt;
When a new sumulation is being configured, the user interface is maximally simple, al lit asks for are the Hero’s preflop cards, Villain’s preflop cards and number of rounds to simulate (Monte Carlo method).&lt;br /&gt;
&lt;br /&gt;
[[File:Ui1.png]]&lt;br /&gt;
&lt;br /&gt;
==Results of the simulation==&lt;br /&gt;
After the simulation is started (clicking on the „Count the probability“ button), whole box smoothly travels to the top (to make more space), and the result percentages and graphics appear.&lt;br /&gt;
&lt;br /&gt;
[[File:Ui2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
This is the actual structure of the simulator and the description of its logic:&lt;br /&gt;
&lt;br /&gt;
The main classes: App – Simulate – AllCards - GenerateCard&lt;br /&gt;
&lt;br /&gt;
The JavaScript actually doesn’t have classes like more traditional languages (like Java), but for the description, it is possible to call these files classes, they work as the classes in the same sense.&lt;br /&gt;
&lt;br /&gt;
At the beginning, the user provides the application with the starting hands for two players (these are the hands, for which strength we are looking for). These are the starting parameters of the simulation. After this, an XMLHttpRequest is being made on the server, with exactly these parameters, plus the number of rounds for the Monte Carlo simulation. These parameters get to the main class – App. Here, the method simulate(parameters) from the class Simulate is invoked. &lt;br /&gt;
&lt;br /&gt;
==Class Simulate==&lt;br /&gt;
This class has the main method simulate(parameters), which invokes method play(parameters) with the same parameters. Method play is the bootstraping part. It calls the methods makeBoard(startingCards) and getBoard() on the class AllCards.&lt;br /&gt;
&lt;br /&gt;
==Class AllCards==&lt;br /&gt;
The two main methods here are makeBoard(startingCards) and getBoard(). As static variables, an array of all possible cards in the game is made. When the function makeBoard(startingCards) is invoked, it makes a new array of randomly generated cards. The parameter startingCards are the cards, already being held by the two players (the compared cards), therefore these cards cannot be generated anymore. This function also „generates“ the five cards on the board (as in the Texas Hold’em variant of poker game). It does so by calling method addCard(cardsAlready,allCards) from the class GenerateCard.&lt;br /&gt;
&lt;br /&gt;
Method getBoard() simply returns the array with the randomly generated cards on the board.&lt;br /&gt;
&lt;br /&gt;
==Class GenerateCard==&lt;br /&gt;
The main method of this class is AddCard(cardsAlready, allCards). The first parameter is supposed to be an array with cards, which cannot be generated anymore (are either in the player’s hands or generated in the preceding generating for the board). Parameter allCards stands for all the possible cards in the game, as being defined earlier.&lt;br /&gt;
&lt;br /&gt;
==Class Server==&lt;br /&gt;
This is the hearth of the server side of this simulator. After calling the script from the frontend part via AJAX, the method http.createServer() is invoked. At the beginning of this method, the basic parameters of the simulation are read: heroCards, villainCards and rounds for Monte Carlo simulation. Knowing these, the actual simulation may begin. This method contains a loop,which is run as many times as it is set in the rounds property. Each iteration, the board is generated  (as described in the AllCards class). For each of these iterations, the result has to be counted. By the result, I mean – who wins this current round (iteration). This number is held in the property herowon. In the end, we get the percentage by dividing the property herowon by the number of rounds.&lt;br /&gt;
&lt;br /&gt;
For comparison of the cards strengths, a special module called „poker-evaluator“ is used. It was made a school project by a student from the USA. It is just a small class, with a main method evaluate(hands[]), which takes all of the cards and calculates the best possible combination and returns a value of its strength. This is made for both players and the one with higher value wins.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
Table of randomly chosen cards and rounds with the results probabilities:&lt;br /&gt;
&lt;br /&gt;
[[File:Tableres.png]]&lt;br /&gt;
&lt;br /&gt;
Graphs showing randomly chosen cards and how the variance is reduced with the number of simulated rounds (using Monte Carlo method, results of player 1 – hero - shown ):&lt;br /&gt;
&lt;br /&gt;
As9s vs. Ts8s, 10 rounds, 80%&lt;br /&gt;
&lt;br /&gt;
[[File:Sim11.png]]&lt;br /&gt;
&lt;br /&gt;
Ts9s vs. 7h4d, 30 rounds, 63,333333%&lt;br /&gt;
&lt;br /&gt;
[[File:Sim2.png]]&lt;br /&gt;
&lt;br /&gt;
JsJd vs. Ah2d, 100 rounds, 76%&lt;br /&gt;
&lt;br /&gt;
[[File:Sim3.png]]&lt;br /&gt;
&lt;br /&gt;
QsAd vs. Kh5d, 500 rounds, 65.8 %&lt;br /&gt;
&lt;br /&gt;
[[File:Sim4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
The simulator provides the requested results with an automatically generated image line graph for variance demonstration. The simulator tool itself can be downloaded directly from the provided GitHub directory (beware of the necessity of having NodeJS preinstalled).&lt;br /&gt;
&lt;br /&gt;
It is interesting to see the numbers of iterations, which are necessary for the Monte Carlo simulation to provide us with at least a quite precise result.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
You can view the prepared code, with necessary plugins and so on here: https://dl.dropboxusercontent.com/u/63085939/poker.zip  (it is only necessary to have NodeJS environment preinstalled).&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
https://github.com/mbostock/d3/wiki/Gallery&lt;br /&gt;
&lt;br /&gt;
http://coffeescript.org/&lt;br /&gt;
&lt;br /&gt;
https://github.com/chenosaurus/poker-evaluator&lt;br /&gt;
&lt;br /&gt;
http://www.codeproject.com/Articles/569271/A-Poker-hand-analyzer-in-JavaScript-using-bit-math&lt;br /&gt;
&lt;br /&gt;
http://www.pokerology.com/lessons/starting-hand-selection/&lt;br /&gt;
&lt;br /&gt;
http://www.goldsim.com/Web/Introduction/Probabilistic/MonteCarlo/&lt;br /&gt;
&lt;br /&gt;
https://www.npmjs.com/package/browserify&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Sim4.png&amp;diff=8288</id>
		<title>File:Sim4.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Sim4.png&amp;diff=8288"/>
		<updated>2015-01-18T22:59:31Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Sim3.png&amp;diff=8287</id>
		<title>File:Sim3.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Sim3.png&amp;diff=8287"/>
		<updated>2015-01-18T22:59:22Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Sim2.png&amp;diff=8286</id>
		<title>File:Sim2.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Sim2.png&amp;diff=8286"/>
		<updated>2015-01-18T22:59:13Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Sim11.png&amp;diff=8285</id>
		<title>File:Sim11.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Sim11.png&amp;diff=8285"/>
		<updated>2015-01-18T22:59:03Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Ui2.png&amp;diff=8284</id>
		<title>File:Ui2.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Ui2.png&amp;diff=8284"/>
		<updated>2015-01-18T22:58:53Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Ui1.png&amp;diff=8283</id>
		<title>File:Ui1.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Ui1.png&amp;diff=8283"/>
		<updated>2015-01-18T22:58:44Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Tableres.png&amp;diff=8280</id>
		<title>File:Tableres.png</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Tableres.png&amp;diff=8280"/>
		<updated>2015-01-18T22:55:16Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Poker_probabilities_and_variance_simulation&amp;diff=8279</id>
		<title>Poker probabilities and variance simulation</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Poker_probabilities_and_variance_simulation&amp;diff=8279"/>
		<updated>2015-01-18T22:54:41Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: whole article :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction =&lt;br /&gt;
The goal of my research, called „Poker probabilities and variance simulation“, is to make an own simulator tool in a traditional programming language, which will be able to simulate winning probabilities of starting poker cards. The main part of the research stands in graphical outputs of the simulator. The program will be able to produce graphs, which will be showing the results variance during Monte Carlo simulations of compared starting cards. This research describes the technology used for producing the tool and provides the readers with graphical results. I decided for the poker topic because it’s my favourite card game. And as a software developer, I see making an own simulator as a challange. The code itself is hosted as a .zip file, link provided.&lt;br /&gt;
&lt;br /&gt;
•	Project name: Poker probabilities and variance simulation&lt;br /&gt;
&lt;br /&gt;
•	Class: 4IT496 Simulation of Systems (WS 2014/2015)&lt;br /&gt;
&lt;br /&gt;
•	Author: Marian Zikmund&lt;br /&gt;
&lt;br /&gt;
•	Model type: Monte Carlo&lt;br /&gt;
&lt;br /&gt;
•	Technologies used: Programming language JavaScript (NodeJS), software MS Office Excel 2013 for small tables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
In this part, the technogolies, which were used for making the simulator, are described. The simulator is accessible as a webpage (Single page application). &lt;br /&gt;
&lt;br /&gt;
The programming part of this project can be divided in two parts – frontend and backend. For the frontend, languages HTML, CSS, JavaScript and CoffeeScript, with libraries Bootstrap, jQuery and D3.js were used. The project is built to make the possibility of counting the results both on the frontend in the browser or on the backend server. That is possible thanks to the sharing of the same JavaScript code on the server and in the browser. Technologies NodeJS, Gulp, CoffeeScript and Browserify are used to make this happen.&lt;br /&gt;
&lt;br /&gt;
==Programming workflow was as follows:==&lt;br /&gt;
===Setup the whole project===&lt;br /&gt;
By this, several small procedures are meant. It is necessary and practical for later faster development to initiate a Git repository (for version control) and set the development environment correctly. I chose NodeJS environment as the most suitable one for this task. When starting a new project using NodeJS, it is very useful to use a tool called Gulp. It makes all tasks, which need to be made periodically, automatic.&lt;br /&gt;
&lt;br /&gt;
===Make the user interface===&lt;br /&gt;
The UI is simple, using the classical Twitter Bootstrap CSS framework,which makes it look clean and simple. Therefore, no graphical tools (like Adobe Photoshop) were needed.&lt;br /&gt;
&lt;br /&gt;
===Develop frontend JavaScript code===&lt;br /&gt;
All the code was written on the server side in NodeJS environment. To make this code usable in the browser, it had to be compiled and bundled. That was made automatically by the Gulp and Browserify tools. Most of the code was even written not in the JavaScript itself, but in the CoffeeScript, a language, which has to be compiled to the JavaScript before running (it was also made by the Gulp tool).&lt;br /&gt;
&lt;br /&gt;
===Develop backend JavaScript code===&lt;br /&gt;
Backend JavaScript code also runs in the NodeJS environment. In this part, it was necessary to sketch used files (classes) and remember the dependencies. The actual Monte Carlo simulation strategy was also made in this part – further described in the next part called „Model“.&lt;br /&gt;
&lt;br /&gt;
===Glossary of the described terms:===&lt;br /&gt;
HTML, CSS – the simulator works as a classical webpage, which can be opened in a web browser, so these technologies are necessary&lt;br /&gt;
&lt;br /&gt;
JavaScript  - to make the application interactive on the client-side (in the browser), JavaScript is the only possible technology to use nowadays&lt;br /&gt;
&lt;br /&gt;
Git – version control&lt;br /&gt;
&lt;br /&gt;
CoffeeScript – language, which has to be compiled to JavaScript. Widely used for it’s beautiful syntax and faster coding possibilities&lt;br /&gt;
&lt;br /&gt;
Gulp – tool for automatization of repeatedly maked tasks &lt;br /&gt;
&lt;br /&gt;
Browserify – tool for transforming server side JavaScript to a front end JavaScript&lt;br /&gt;
&lt;br /&gt;
NodeJS – server side environment for JavaScript code&lt;br /&gt;
&lt;br /&gt;
Twitter Bootstrap – frontend CSS framework for easier coding without caring too much about the design&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=User interface=&lt;br /&gt;
==New simulation==&lt;br /&gt;
When a new sumulation is being configured, the user interface is maximally simple, al lit asks for are the Hero’s preflop cards, Villain’s preflop cards and number of rounds to simulate (Monte Carlo method).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Results of the simulation==&lt;br /&gt;
After the simulation is started (clicking on the „Count the probability“ button), whole box smoothly travels to the top (to make more space), and the result percentages and graphics appear.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
This is the actual structure of the simulator and the description of its logic:&lt;br /&gt;
&lt;br /&gt;
The main classes: App – Simulate – AllCards - GenerateCard&lt;br /&gt;
&lt;br /&gt;
The JavaScript actually doesn’t have classes like more traditional languages (like Java), but for the description, it is possible to call these files classes, they work as the classes in the same sense.&lt;br /&gt;
&lt;br /&gt;
At the beginning, the user provides the application with the starting hands for two players (these are the hands, for which strength we are looking for). These are the starting parameters of the simulation. After this, an XMLHttpRequest is being made on the server, with exactly these parameters, plus the number of rounds for the Monte Carlo simulation. These parameters get to the main class – App. Here, the method simulate(parameters) from the class Simulate is invoked. &lt;br /&gt;
&lt;br /&gt;
==Class Simulate==&lt;br /&gt;
This class has the main method simulate(parameters), which invokes method play(parameters) with the same parameters. Method play is the bootstraping part. It calls the methods makeBoard(startingCards) and getBoard() on the class AllCards.&lt;br /&gt;
&lt;br /&gt;
==Class AllCards==&lt;br /&gt;
The two main methods here are makeBoard(startingCards) and getBoard(). As static variables, an array of all possible cards in the game is made. When the function makeBoard(startingCards) is invoked, it makes a new array of randomly generated cards. The parameter startingCards are the cards, already being held by the two players (the compared cards), therefore these cards cannot be generated anymore. This function also „generates“ the five cards on the board (as in the Texas Hold’em variant of poker game). It does so by calling method addCard(cardsAlready,allCards) from the class GenerateCard.&lt;br /&gt;
&lt;br /&gt;
Method getBoard() simply returns the array with the randomly generated cards on the board.&lt;br /&gt;
&lt;br /&gt;
==Class GenerateCard==&lt;br /&gt;
The main method of this class is AddCard(cardsAlready, allCards). The first parameter is supposed to be an array with cards, which cannot be generated anymore (are either in the player’s hands or generated in the preceding generating for the board). Parameter allCards stands for all the possible cards in the game, as being defined earlier.&lt;br /&gt;
&lt;br /&gt;
==Class Server==&lt;br /&gt;
This is the hearth of the server side of this simulator. After calling the script from the frontend part via AJAX, the method http.createServer() is invoked. At the beginning of this method, the basic parameters of the simulation are read: heroCards, villainCards and rounds for Monte Carlo simulation. Knowing these, the actual simulation may begin. This method contains a loop,which is run as many times as it is set in the rounds property. Each iteration, the board is generated  (as described in the AllCards class). For each of these iterations, the result has to be counted. By the result, I mean – who wins this current round (iteration). This number is held in the property herowon. In the end, we get the percentage by dividing the property herowon by the number of rounds.&lt;br /&gt;
&lt;br /&gt;
For comparison of the cards strengths, a special module called „poker-evaluator“ is used. It was made a school project by a student from the USA. It is just a small class, with a main method evaluate(hands[]), which takes all of the cards and calculates the best possible combination and returns a value of its strength. This is made for both players and the one with higher value wins.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
Table of randomly chosen cards and rounds with the results probabilities:&lt;br /&gt;
&lt;br /&gt;
Graphs showing randomly chosen cards and how the variance is reduced with the number of simulated rounds (using Monte Carlo method, results of player 1 – hero - shown ):&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
The simulator provides the requested results with an automatically generated image line graph for variance demonstration. The simulator tool itself can be downloaded directly from the provided GitHub directory (beware of the necessity of having NodeJS preinstalled).&lt;br /&gt;
&lt;br /&gt;
It is interesting to see the numbers of iterations, which are necessary for the Monte Carlo simulation to provide us with at least a quite precise result.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
You can view the prepared code, with necessary plugins and so on here: https://dl.dropboxusercontent.com/u/63085939/poker.zip  (it is only necessary to have NodeJS environment preinstalled).&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
https://github.com/mbostock/d3/wiki/Gallery&lt;br /&gt;
&lt;br /&gt;
http://coffeescript.org/&lt;br /&gt;
&lt;br /&gt;
https://github.com/chenosaurus/poker-evaluator&lt;br /&gt;
&lt;br /&gt;
http://www.codeproject.com/Articles/569271/A-Poker-hand-analyzer-in-JavaScript-using-bit-math&lt;br /&gt;
&lt;br /&gt;
http://www.pokerology.com/lessons/starting-hand-selection/&lt;br /&gt;
&lt;br /&gt;
http://www.goldsim.com/Web/Introduction/Probabilistic/MonteCarlo/&lt;br /&gt;
&lt;br /&gt;
https://www.npmjs.com/package/browserify&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2014/2015&amp;diff=8273</id>
		<title>WS 2014/2015</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2014/2015&amp;diff=8273"/>
		<updated>2015-01-18T22:41:53Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2014/2015. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2014/2015|assignment approved]].&lt;br /&gt;
&lt;br /&gt;
==Simulations==&lt;br /&gt;
&lt;br /&gt;
--[[User:Zhua00|Andriy Zhubryd]] 14:24, 15 January 2015 (CET) [[E-Sim Optimal Equipment Selection]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Xgubk00|Xgubk00]] 12:24, 17 January 2015 (CET) [[Flood evacuation]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Xzasj00|Xzasj00]] 00:07, 18 January 2015 (CET) [[Formula 1 teams economic situation]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Qnovm21|Qnovm21]] 10:33, 18 January 2015 (CET) [[Simulation of the surgery staff in a hospital]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Xzigm03|Xzigm03]] 23:40, 18 January 2015 (CET) [[Poker probabilities and variance simulation]]&lt;br /&gt;
&lt;br /&gt;
==Papers==&lt;br /&gt;
&lt;br /&gt;
--[[User:Xgubk00|Xgubk00]] 12:24, 17 January 2015 (CET) [[Game theory]]&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2014/2015&amp;diff=8272</id>
		<title>WS 2014/2015</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2014/2015&amp;diff=8272"/>
		<updated>2015-01-18T22:41:35Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2014/2015. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2014/2015|assignment approved]].&lt;br /&gt;
&lt;br /&gt;
==Simulations==&lt;br /&gt;
&lt;br /&gt;
--[[User:Zhua00|Andriy Zhubryd]] 14:24, 15 January 2015 (CET) [[E-Sim Optimal Equipment Selection]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Xgubk00|Xgubk00]] 12:24, 17 January 2015 (CET) [[Flood evacuation]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Xzasj00|Xzasj00]] 00:07, 18 January 2015 (CET) [[Formula 1 teams economic situation]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:Qnovm21|Qnovm21]] 10:33, 18 January 2015 (CET) [[Simulation of the surgery staff in a hospital]]&lt;br /&gt;
-- [[User:Xzigm03|Xzigm03]] 23:40, 18 January 2015 (CET) [[Poker probabilities and variance simulation]]&lt;br /&gt;
&lt;br /&gt;
==Papers==&lt;br /&gt;
&lt;br /&gt;
--[[User:Xgubk00|Xgubk00]] 12:24, 17 January 2015 (CET) [[Game theory]]&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Xzigm03&amp;diff=7948</id>
		<title>Xzigm03</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Xzigm03&amp;diff=7948"/>
		<updated>2015-01-11T19:25:21Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: Created page with &amp;quot;To make the probability of approving higher, I've prepared two possible simulations:   == 1. Poker starting combinations probabilities ==   '''Assignment'''  * '''Project name...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To make the probability of approving higher, I've prepared two possible simulations:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1. Poker starting combinations probabilities ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
&lt;br /&gt;
* '''Project name: Poker starting combinations probabilities'''&lt;br /&gt;
* '''Software used: own script (in JavaScript, C++ or PHP) and Excel for reporting'''&lt;br /&gt;
* '''Model type: Monte Carlo'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What will be simulated'''&lt;br /&gt;
&lt;br /&gt;
I will write my own small program, which will simulate probabilities of winning for different starting hands in Texas Hold’em poker. It would be almost impossible to do in any used software in our lectures. After the data are ready, I will use Excel for making graphs, especially for showing, how many simulations are necessary for getting the expected correct result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Goal of the simulation'''&lt;br /&gt;
&lt;br /&gt;
The goal of this simulation is to see which cards have which probabilities of winning and how many simulation it takes to be sure of this result with some probability (shown in Sigmas). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2. Football stadium entrances simulation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Short description: This simulation should answer the best possible number of entrances to the football stadium of Sparta Prague, taking into concideration many variables like minimum price of stuff and maximum satisfaction of fans.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
&lt;br /&gt;
* '''Project name: Football stadium entrances simulation&lt;br /&gt;
* '''Software used: NetLogo&lt;br /&gt;
* '''Model type: Discrete simulation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What will be simulated&lt;br /&gt;
&lt;br /&gt;
There’s a football stadium for approximately 21000 people. When there is a match taking place, it is practical to know, how many entrances should be open. Normally, it would be easy – the more the better. But it is necessary to take more variables into account. Goal of the owner is to pay as little for the stuff as possible. But if there is too little entrances open, people would be unsatisfied and with some probability stopped visiting the stadium. &lt;br /&gt;
&lt;br /&gt;
The simulation will have the possibility to write down all important variables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Goal of the simulation&lt;br /&gt;
&lt;br /&gt;
The goal of this simulation is to find out, how many entrances should the Sparta Prague’s stadium have open for different numbers of visitors, so that the fans are satisfied and the owner of the club doesn’t pay more than necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Global variables&lt;br /&gt;
* '''Number of visitors'''&lt;br /&gt;
* '''Number of entrances'''&lt;br /&gt;
* '''Price of one employee'''&lt;br /&gt;
* '''Number of employees for one entrance'''&lt;br /&gt;
* '''Speed of employee letting visitor go'''&lt;br /&gt;
* '''Maximum accepted waiting time of a visitor'''&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Assignments_WS_2014/2015&amp;diff=7947</id>
		<title>Assignments WS 2014/2015</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Assignments_WS_2014/2015&amp;diff=7947"/>
		<updated>2015-01-11T19:19:09Z</updated>

		<summary type="html">&lt;p&gt;Xzigm03: /* Assignments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Assignments WS 2014/2015}}&lt;br /&gt;
&lt;br /&gt;
{{Ambox&lt;br /&gt;
| text  = &amp;lt;div&amp;gt;&lt;br /&gt;
Please, put here your assignments. Do not forget to sign them. You can use &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; (four tildas) for an automatic signature. Use Show preview in order to check the result before your final sumbition.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Ambox&lt;br /&gt;
| text  = &amp;lt;div&amp;gt;&lt;br /&gt;
Please, strive to formulate your assignment carefully. We expect an adequate effort to formulate the assignment as it is your semestral paper. Do not forget that your main goal is a research paper. It means your simulation model must generate the results that are specific, measurable and verifiable. Think twice how you will develop your model, which entities you will use, draw a model diagram, consider what you will measure. No sooner than when you have a good idea about the model, submit your assignment. And of course, read [[How to deal with the simulation assignment/en|How to deal with the simulation assignment]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Ambox&lt;br /&gt;
| type  = content&lt;br /&gt;
| text  = &amp;lt;div&amp;gt;&lt;br /&gt;
In order to avoid possible confusion, please, check if you have added '''approved''' in bold somewhere in our comment under your submission. If there is no '''approved''', it means the assignment was not approved yet.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Assignments ==&lt;br /&gt;
[[xcesj04 ]]&lt;br /&gt;
&amp;lt;div&amp;gt;[[qnovm21 ]]&amp;lt;/div&amp;gt;&lt;br /&gt;
[[xpalj24]]&lt;br /&gt;
&lt;br /&gt;
[[xzasj00]]&lt;br /&gt;
&lt;br /&gt;
[[zhua00]]&lt;br /&gt;
&lt;br /&gt;
[[rock00]]&lt;br /&gt;
&lt;br /&gt;
[[kado00]]&lt;br /&gt;
&lt;br /&gt;
[[xgubk00]]&lt;br /&gt;
&lt;br /&gt;
[[xkraj119]]&lt;br /&gt;
&lt;br /&gt;
[[xzigm03]]&lt;/div&gt;</summary>
		<author><name>Xzigm03</name></author>
		
	</entry>
</feed>