简体   繁体   English

服务利用时间和条形图

[英]Service utilization time and Bar chart

In my model I want to calculate the utilized time in seconds in service block and display it in bar chart in the form of percentage ie the percentage of service time of service block 1 out of the total time of the model.在我的模型中,我想计算服务块中的使用时间(以秒为单位),并以百分比的形式在条形图中显示,即服务块 1 的服务时间占模型总时间的百分比。

For example:例如:

service block 1= 60 second 
service block 2= 10 second 
service block 3= 400 second 

Total time of the service blocks = 410 seconds 

Service block 1 utilized time is   (60/470)*100= 12.7% 

So I have calculated the utilized time as shown in所以我计算了使用的时间,如图图片1 . . The TimeIn is a variable in agent. TimeIn 是代理中的一个变量。

Picture 2图2 图2 shows the variable, Statistics and data set used for calculation and Bar chart display.显示用于计算和条形图显示的变量、统计和数据集。 D2 is the data set used in value chart display. D2 是数值图表显示中使用的数据集。

D2.add((agent.TimeIn-agent.TimeOut)/X)

My Question:我的问题:

How can I get the bar chart to only display 12.7 percent out of the 100%.我怎样才能让条形图只显示 100% 中的 12.7%。 Currently it does show 100% every time I run the model.目前,每次我运行模型时它都会显示 100%。 图3

I have used the following in the bar chart value window:我在条形图值窗口中使用了以下内容:

D2.getYMean() D2.getYMean()

Any suggestions?有什么建议?

Thanks谢谢

One of the straight forward way to measure time utilization in a service station is to use time measure as shown on the figure below测量服务站时间利用率的一种直接方法是使用时间测量,如下图所示在此处输入图片说明

there is other ways in finding the utilization time for service station.还有其他方法可以找到服务站的使用时间。 one of the method mentioned by Anylogic help is double utilization() (Returns the mean utilization of this block. The returned value is the average (collected over time) of number of agents being serviced). Anylogic 帮助中提到的方法之一是double utilization() usage double utilization() (返回此块的平均利用率。返回值是正在服务的代理数量的平均值(随时间收集))。 I have tried using the double utilization() with service station but didn't work.我曾尝试在服务站中使用double utilization() ,但没有奏效。 However it dose work with delay ( x.stats.Utilization.mean() https://paginas.fe.up.pt/~ee01260/AnyLogic%20Models/Bank/AnyLogic_6_Enterprise_Library_Tutorial.pdf ).然而,它会延迟工作( x.stats.Utilization.mean() https://paginas.fe.up.pt/~ee01260/AnyLogic%20Models/Bank/AnyLogic_6_Enterprise_Library_Tutorial.pdf )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM