update Vogel's approximation method

This commit is contained in:
Ilya Grigorev
2024-11-09 21:46:22 +03:00
parent 3aea4bfcad
commit 66141164f2
2 changed files with 55 additions and 160 deletions
+7 -12
View File
@@ -1,24 +1,19 @@
from main import Vogel
from main import Vogel, M
import numpy as np
C = np.array([
[7, 8, 1, 2],
[4, 5, 9, 8],
[9, 2, 3, 6],
[16, 16, 13, 22, 17],
[14, 14, 13, 19, 15],
[19, 19, 20, 23, M],
[M, 0, M, 0, 0]
], dtype=np.int64)
S = np.array([
160, 140, 170
50, 60, 50, 50
], dtype=np.int64)
D = np.array([
120, 50, 190, 110
], dtype=np.int64)
VogelExpected = np.array([
[0, 0, 50, 110],
[120, 20, 0, 0],
[0, 30, 140, 0],
30, 20, 70, 30, 60
], dtype=np.int64)
print(Vogel(S, C, D).solution)