Coverage for test_basics.py: 100%

# Coverage for test_basics.py : 100%

## 16 statements 16 run 0 missing 0 excluded

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

1 import numpy as np

2 import openqtsim

3

4"""

5"""

6

7

8 def test_lookup_table_1():

9 queue = openqtsim.Queue()

10

11 utilisation = 0.9

12 nr_of_servers = 1

13

14 factor = queue.occupancy_to_waitingfactor(utilisation, nr_of_servers)

15 answer = 8.998295524474928

16

17 np.testing.assert_almost_equal(factor, answer)

18

19 def test_lookup_table_2():

20 queue = openqtsim.Queue()

21

22 factor = 0.0870

23 nr_of_servers = 4

24

25 factor = queue.waitingfactor_to_occupancy(factor, nr_of_servers)

26 answer = 0.493062176851717

27

28 np.testing.assert_almost_equal(factor, answer)