网淘吧Visual Components、Flexsim 仿真技术博客 | Python、C#、Delphi xe 机器人编程教程 - 网淘吧

Tutorial Task 2.5 - Orders By Size

2026-05-21 新闻来源:网淘吧 围观:3
电脑广告
手机广告

任务概述

在本教程中,您将再次使用统计收集器来收集在模型默认设置下不会收集的统计数据。具体来说,您将获取基于每个订单所含商品数量进行分类的订单处理数量统计。您将获得按订单规模划分的订单吞吐量统计数据。这需要通过利用统计收集器事件中的标签来实现。

本教程基于本系列教程1中使用的同一模型。关于如何加载模型的信息,请参考该教程:

统计教程1 - 创建基础统计收集器

步骤1设置统计收集器

要设置统计收集器:

  1. 点击屏幕左侧的工具箱标签页,然后点击按钮以添加新工具。导航至统计部分并选择统计收集器。这将打开属性窗口。
  2. 点击顶部的字段,将统计收集器重命名为按大小排序
  3. 打开流程视图(如果尚未打开)。(操作方式:点击顶部的流程按钮,选择常规目录,然后选择流程视图。)
  4. 流程视图中需注意设置订单大小活动。此处可见订单令牌上设置了名为OrderSize的标签。后续将在统计收集器中将此标签作为数据组成部分使用。

  5. 返回统计收集器属性窗口,点击采样器按钮采集新事件。启用采样器后,切换到流程视图窗口并点击接收器在入口处事件。
  6. 行值字段类型data.token.OrderSize。这将使用之前提到的订单大小令牌上的标签,并为每个不同的订单大小创建一个唯一的行。
  7. 此外,假设您只想获取被认为是“小”的订单大小的数据。这时可以使用条件字段来筛选行值中的一些结果。在本教程中,您仅查找大小为4或更小的订单。

  8. 点击条件字段并输入data.token.OrderSize <= 4
  9. 现在点击选项卡,并点击按钮以创建一个新列。
  10. 名称字段,将此列命名为OrderSize
  11. 行添加值字段类型data.rowValue
  12. 点击存储类型字段并选择整数选项。
  13. 点击按钮以添加另一列。
  14. 将此列命名为Output
  15. 行添加值字段类型0。 因为你希望Output值在开始时从0开始。
  16. 点击事件值字段旁边的箭头并选择数据选项和递增数据值选项。
  17. 在打开的次级窗口字段中,默认的递增值应为1,如果不是,请确保其值为1后再关闭。
  18. 事件/列连接字段中,选择接收器 - 进入时事件,然后勾选输出框,该框位于标明指定此事件更新的列的字段内。
  19. 点击存储类型字段,并选择整数选项。
  20. 点击应用按钮。

现在,如果您在OrdersBySize收集器上右键点击,该收集器位于工具箱中,然后选择查看表格选项,您就可以看到该收集器的表格。现在您应该能看到表格根据订单大小的输出数据填充。您可能需要加快模型运行速度才能看到变化。

您可能会注意到表格没有排序。第一行将基于进入系统的第一个订单。如果您想按订单大小对表格排序,可以使用统计收集器属性中的行排序功能。具体操作如下:

  1. 在统计收集器属性窗口中,点击行选项选项卡。
  2. 点击行排序下方的 + 按钮。
  3. 这将创建一个新字段。默认情况下,“排序依据”字段应显示为data.rowValue如果还没有,现在请输入。
  4. 点击应用按钮。

再次重置并运行模型后,现在应该能看到统计收集器表格将按订单大小排序了。

步骤 2创建图表

现在,你将添加一个图表来展示由 OrdersBySize 收集器收集的数据。操作如下:

  1. 首先,点击屏幕顶部的仪表板按钮,并选择“添加仪表板”选项。
  2. 在右侧的属性面板中,点击“仪表板名称”字段。将仪表板重命名为OrdersBySize
  3. 当仪表板视图处于活动状态时,导航到左侧的库。在基础图表类型部分,找到并拖拽一个条形图到仪表板上。这将打开新图表的属性窗口。
  4. 点击数据源字段,并从选项中选择OrdersBySize收集器。
  5. 点击数据格式字段,并选择每行一个条形选项。
  6. 点击条形颜色字段,并选择OrderSize
  7. 点击条形大小字段,并选择输出
  8. 点击设置选项卡。
  9. 取消勾选显示百分比框。
  10. 勾选显示零列框。
  11. 点击文本选项卡。
  12. 勾选订单大小框,位于显示列标题字段中,以确保订单大小文本可见。
  13. 点击应用按钮。

现在,如果您重置并运行模型,您将能够在模型运行时看到使用按大小排序收集器数据的图表。

______
icon-svg-close-thick

Cookie preferences

Your privacy is important to us and so is an optimal experience. To help us customize information and build applications, we collect data about your use of this site.

May we collect and use your data?

Learn more about the Third Party Services we use and our Privacy Statement.

Strictly necessary – required for our site to work and to provide services to you

These cookies allow us to record your preferences or login information, respond to your requests or fulfill items in your shopping cart.

Improve your experience – allows us to show you what is relevant to you

These cookies enable us to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we use to deliver information and experiences tailored to you. If you do not allow these cookies, some or all of these services may not be available for you.

Customize your advertising – permits us to offer targeted advertising to you

These cookies collect data about you based on your activities and interests in order to show you relevant ads and to track effectiveness. By collecting this data, the ads you see will be more tailored to your interests. If you do not allow these cookies, you will experience less targeted advertising.

icon-svg-close-thick

THIRD PARTY SERVICES

Learn more about the Third-Party Services we use in each category, and how we use the data we collect from you online.

icon-svg-hide-thick

icon-svg-show-thick

Strictly necessary – required for our site to work and to provide services to you

Qualtrics
W
Akamai mPulse
W
Digital River
W
Dynatrace
W
Khoros
W
Launch Darkly
W
New Relic
W
Salesforce Live Agent
W
Wistia
W
Tealium
W
Upsellit
W
CJ Affiliates
W
Commission Factory
W
Google Analytics (Strictly Necessary)
W
Typepad Stats
W
Geo Targetly
W
SpeedCurve
W
Qualified
#

icon-svg-hide-thick

icon-svg-show-thick

Improve your experience – allows us to show you what is relevant to you

Google Optimize
W
ClickTale
W
OneSignal
W
Optimizely
W
Amplitude
W
Snowplow
W
UserVoice
W
Clearbit
#
YouTube
#

icon-svg-hide-thick

icon-svg-show-thick

Customize your advertising – permits us to offer targeted advertising to you

Adobe Analytics
W
Google Analytics (Web Analytics)
W
AdWords
W
Marketo
W
Doubleclick
W
HubSpot
W
Twitter
W
Facebook
W
LinkedIn
W
Yahoo! Japan
W
Naver
W
Quantcast
W
Call Tracking
W
Wunderkind
W
ADC Media
W
AgrantSEM
W
Bidtellect
W
Bing
W
G2Crowd
W
NMPI Display
W
VK
W
Adobe Target
W
Google Analytics (Advertising)
W
Trendkite
W
Hotjar
W
6 Sense
W
Terminus
W
StackAdapt
W
The Trade Desk
W
RollWorks
W

Are you sure you want a less customized experience?

We can access your data only if you select "yes" for the categories on the previous screen. This lets us tailor our marketing so that it's more relevant for you. You can change your settings at any time by visiting our privacy statement

Your experience. Your choice.

We care about your privacy. The data we collect helps us understand how you use our products, what information you might be interested in, and what we can improve to make your engagement with Autodesk more rewarding.

May we collect and use your data to tailor your experience?

Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.
免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

文章底部电脑广告
手机广告位-内容正文底部

相关文章

上网淘巴领天猫淘宝优惠券,一年省好几千。

广告  ×

您是本站第1124044名访客 今日有0篇新文章/评论