Ejemplo n.º 1
0
def test3():
    N = 6
    W = 15
    w = [6, 5, 6, 6, 3, 7]
    v = [5, 6, 4, 6, 5, 2]
    vsum = D.calc_vsum(N, W, w, v)
    print(vsum)
    assert max(vsum[N, :]) == 17
Ejemplo n.º 2
0
def test1():
    N = 3
    W = 8
    w = [3, 4, 5]
    v = [30, 50, 60]
    vsum = D.calc_vsum(N, W, w, v)
    print(vsum)
    assert max(vsum[N, :]) == 90
Ejemplo n.º 3
0
def test2():
    N = 5
    W = 5
    w = [1, 1, 1, 1, 1]
    v = [1e9, 1e9, 1e9, 1e9, 1e9]
    vsum = D.calc_vsum(N, W, w, v)
    print(vsum)
    assert max(vsum[N, :]) == 5e9