Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from question1 import * # Imports all the neccessary functions for this task.
- import matplotlib.pyplot as maingraph # Imports the matplotlib.pyplot library and assigns the methods and functions to maingraph.
- import numpy as np #
- #3A
- maingraph.axis('auto')
- maingraph.title('Graph to show the relationship between the introduction of new equipment and mean customer service times')
- maingraph.ylabel('Theoretical Mean Queue Length') # Labels the Y axis of maingraph with 'Theoretical Mean Queue Length'
- maingraph.xlabel('Alpha value (Average customer service time)') # Labels the X axis with 'Iteration Number'
- alphavars = np.arange(1.1,10,0.1)
- betavars = np.arange(1,0,-0.1)
- for i in betavars:
- plotpoints = []
- for a in alphavars:
- maxQ_value = 0
- for j in range(500):
- maxQ_value += singleQueue(a,i)
- plotpoints.append(maxQ_value / 500)
- maingraph.plot(alphavars,plotpoints)
- maingraph.legend() # Creates a legend / Key for the graph
- maingraph.show() # Displays the graph
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement