SimulationsUsingSimPy
Simulations of UU1, MM1, MM2, and a Network of queues - now with docker support 🐳
Install / Use
/learn @gallettilance/SimulationsUsingSimPyREADME
Queue Simulations
Prerequisites
-
install docker
-
Setup:
-
Get the image:
docker pull galletti/simulations:latest -
Run:
docker run -it simulations:latest /bin/bash
-
-
Alternatively you can build the image locally:
-
cd to this repo and run
docker build -t simulations:latest . -
Then run
docker run -it simulations
-
-
In the new shell, python2.7 and all the requirements will be install and you will be able to run the code as bellow
NetworkOfQueues.py
-
Processes come into CPU with rate 40/s
-
The CPU is an MM2, with service time .02s
-
After being serviced by the CPU, the process moves on to: * the NetWork with probability .4 * the disk with probability .1 * is done with probability .5
-
The Network is an MM1 queue with service time .025
-
The Disk is an MM1 queue with service time .1
-
After being serviced by the Network, the process circles back to get serviced by the CPU with probability 1
-
After being serviced by the disk, the process: * circles back to get serviced by the CPU with probability .5 * moves on to the Network with probability .5
BasicQueueSimulation.py
-
For MM1, compile with:
python BasicQueueSimulation.py --type MM1 -
For UU1, compile with:
python BasicQueueSimultaion.py --type UU1 -
For MM2, compile with:
python BasicQueueSimulation.py --type MM2
To generate a plot of Average Queue Length (w) against Service Time (Ts) add -generateRawResults flag before --type flag
Example:
python BasicQueueSimulation.py -generateRawResults --type MM1
Issues
generateRawResults cannot (yet) display plot from docker container
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
prose
347.0kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
