Coverage for test_basics.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1import numpy as np
2import openqtsim
4"""
5"""
8def test_lookup_table_1():
9 queue = openqtsim.Queue()
11 utilisation = 0.9
12 nr_of_servers = 1
14 factor = queue.occupancy_to_waitingfactor(utilisation, nr_of_servers)
15 answer = 8.998295524474928
17 np.testing.assert_almost_equal(factor, answer)
19def test_lookup_table_2():
20 queue = openqtsim.Queue()
22 factor = 0.0870
23 nr_of_servers = 4
25 factor = queue.waitingfactor_to_occupancy(factor, nr_of_servers)
26 answer = 0.493062176851717
28 np.testing.assert_almost_equal(factor, answer)