It is possible to change the capacity of an entity server dynamically?
1 次查看(过去 30 天)
显示 更早的评论
It is possible to change the capacity of an entity server dynamically? For example if the utilization exceeds some threshold then an the capacity increases (in effect adding another server). If so, how can this be done? Is there documentation I could look at? The entity server documentation didn't seem to have any clues.
For context, I'm modeling a cloud type service, where new servers are started as needed. I'm using the SimEvents library as it has queues, but if there is a better way I'd be happy to hear it.
Thanks.
0 个评论
采纳的回答
Mo Zhao
2017-4-13
编辑:Mo Zhao
2017-4-13
Hi Scott,
Entity server itself does not support dynamic capacity currently. However, this is doable using several blocks in combination. Consider introducing several spare servers connected in parallel with the initial server, each connected thru an Entity Gate, which is controlled by the statistics port(#n) of the entity server(s) via a Simulink Function. If the number of entities in block exceeds certain threshold, the statistics would trigger the gate to open and place an additional server in connection.
You can also do this logic with MATLAB Discrete-Event System, where instead of drawing connections, you can write code to schedule the forwarding and processing events of server and this can put additional storages in use.
You can have a look at the complex examples to see how to use Simulink Functions with statistic ports of SimEvents blocks, and how to use MATLAB Discrete-Event System.
Thanks,
Mo
0 个评论
更多回答(2 个)
SUHIB SULIMAN
2022-4-21
shot_cnt=1000
rank_cnts=[{},{},{}]
for x in range(shot_cnt):
if (x%100)==0:
print(x)
a_i_range=[1,1.25]
b_i_range=[1,2]
c_i_range=[1,1.5]
"""##Import lib + read data from file"""
import pandas as pd
import numpy as np
import networkx as nx
#import matplotlib.pyplot as plt
df = pd.read_csv('data_files/swimdata.csv')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete-Event Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!