This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # ========================== | |
| # СЧИТАЕМ МЕТРИКИ | |
| # ========================== | |
| def state_space(c: int, g: int): | |
| """Множество состояний X: {(n1, n2): 0 <= n1 <= g, 0 <= n2, n1 + n2 <= C}.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # ========================== | |
| # ЭЛАСТИЧНАЯ МОДЕЛЬ (ЛР 3) | |
| # ========================== | |
| # Вместо stationaty_distribution(c, g, ro_1, ro_2) | |
| # теперь рассчитываем распределение для эластичного трафика p(n1, n2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # ========================== | |
| # СЧИТАЕМ МЕТРИКИ | |
| # ========================== | |
| def stationary_distribution(c, g, ro_1, ro_2): | |
| values = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # ========================== | |
| # СЧИТАЕМ МЕТРИКИ | |
| # ========================== | |
| def stationary_distribution(c, g, ro_1, ro_2): | |
| values = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # ========================== | |
| # СЧИТАЕМ МЕТРИКИ | |
| # ========================== | |
| def stationary_distribution(c: int, ro_1: float, ro_2: float): | |
| """Стационарное распределение вероятностей.""" |