Using:
- simpy for discrete event simulation
- matplotlib for graphs
- epsilon-greedy algorithm for input optimisation
- reveal-js framework for the presentation
- excalidraw for diagrams
Slides viewable here
Install required packages: pip install -r .\requirements.txt
Run the scripts with: python simulation.py
or python optimisation.py
Either use the simple greedy-epsilon-agent-based optimiser as a starting point, or in a new file:
from simulation import PurchaseOrder, Simulation
# Initial inputs
purchase_orders = [PurchaseOrder(0, 20), PurchaseOrder(100, 100)]
for iteration in range(100):
simulation = Simulation(purchase_orders)
simulation.run()
simulation.plot()
# Customise this calculation depending on requirements
cost = sum(simulation.availabilities)
# Calculate a new set of more-optimal inputs
purchase_orders = []