Home
Galen's Blog
Cancel

A Python CLI to Log the Trace

This is just a short script implementing a logger of the trace of a Python program’s execution. import datetime from typing import Optional, Callable, Any, Tuple import sys import click def trac...

When do the bounds on a Poisson's median almost equal the mean?

Question 1 When do the bounds on the median $\nu$ of a Poisson distribution equal (or nearly equal) the mean of the distribution, $\frac{1}{\lambda}$? The bounds of the median are given as [\lam...

The Memoryless Gap

This post is just some spitballing around the idea of quantifying the memory of a distribution. The exponential distribution is the only distribution with the memorylessnss property. What this mea...

A Rust Implementation of a Simple Clock DES

Here is a Rust implementation of a simple event-based discrete event simulation. First we need to import some needed libraries so that events can be implemented to have an order relation, a heap w...

A Ciw Implementation of SimPy's Car Example With a Process Interaction

This post is a continuation of A Ciw Implementation of SimPy’s Car Example, and may be considered a prerequisite for reading this post. The SimPy documentation extends the car example to have the ...

An Overview of Ciw

Attribute Description Original author(s) Geraint Palmer, Vincent Knight, Paul Harper, and Asyl Hawa Developer(s) Ciw Developme...

A Ciw Implementation of SimPy's Car Example

In the SimPy documentation they describe a car process which involves a car which transitions between parking and driving. From being parked it takes 5 units of time to change to being in a state o...

Implementing a M/M/c Queue in Ciw

Ciw is a Python package for simulating queueing networks. A M/M/c queue can be implemented and simulated using Ciw in the following way. import ciw ciw.seed(2018) ARRIVAL_TIME = 1 SERVICE_TIME =...

Implementing a M/M/1 Queue in Ciw

Ciw is a Python package for simulating queueing networks. A M/M/1 queue can be implemented and simulated using Ciw in the following way. import ciw ciw.seed(2018) ARRIVAL_TIME = 1 SERVICE_TIME =...

Implementing a M/G/k Queue in Ciw

Ciw is a Python package for simulating queueing networks. Since G in M/G/k can be any distribution with non-negative support, we will use a gamma distribution for the sake of example. A gamma dist...