The goal of this project is to simulate multiple people using coffee machines throughout a specific period of the day.
This is not a game, but only a configurable simulator which will allow you to calculate how long fellow employees and colleagues can take to have coffee.
You will be able to:
-
Configure the type of coffee they are going to take.
-
Follow realtime the usage of the different coffee machines
-
Storyline and input variables:
This is an office where many engineers, designers, product owners, managers, scrumm masters work.
The following are the global events that will take place at the very first begining:
Find a cup
Put under outlet
Take cup and leave
Every office has it's coffee usage. For this event a specific time frame is given for the simulation.
Each person can choose a variety of coffees and cups.
Each cafeteria is equipped with a specified number of coffee machines.
Each coffee machine provides different types of coffees (examples):
Mocha
Latte
Expresso
Double Expresso
These types of coffee can be specified by task and by concurrency
There are multiple types of payment machines (examples):
You pay before you get your coffee.
You pay whilst your coffee is being made
You don't pay anything at all
You pay after you get your coffee
You will be able to specify diferent types of payment. The solution provided is to be as generic as possible.
For this simulator, socializing times are not considered because they may vary a lot, from non-existent to very lasting.
Essentially you will get an average, mode and standard deviation for the amount you times you decide to run this specific simulation.
- 0.0.0 - 84ed2eeffb8c602bf6aef6eab50b86a6b950977a - Java / JDK11 / Kohsuke
- 1.0.0 - 26aa1d3882be25671d353507b374bfdf13a7cd06 - Kotlin 1.8.0 / JDK19 / Picocli
- Go to target in the coffee-system folder and pick the jar generated file. Then try the following example (or with your own files):
$ java -jar coffee-system-1.0-SNAPSHOT.jar -it 1 -ud "test-classes/employees_example_test_1.xml" -md "test-classes/coffemachine_example_test_1.xml" -pre 2 -post 3
To make it easy I made a few Makefile scripts:
- Make the build and run:
make build-run-a
- Just run:
make run-a
- Employees:
- Coffee Machines: