2022年模型的验证与确认 .pdf

上传人:Q****o 文档编号:28564458 上传时间:2022-07-28 格式:PDF 页数:7 大小:69.46KB
返回 下载 相关 举报
2022年模型的验证与确认 .pdf_第1页
第1页 / 共7页
2022年模型的验证与确认 .pdf_第2页
第2页 / 共7页
点击查看更多>>
资源描述

《2022年模型的验证与确认 .pdf》由会员分享,可在线阅读,更多相关《2022年模型的验证与确认 .pdf(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、模型的验证与确认不要一味的相信程序帮你检查出来的拼写错误。布兰登希尔斯Dew knot trussed yore spell chequer two fined awl yore mistakes. Brendan Hills 在本实验中,我们将描述仿真模型验证和确认的发展以及分析阶段。在L8.l节中,我们将描述一个检验和返工的模型。在L8.2 节中,我们将展示如何通过其内部项目以查证模型。 L8.3 章将展示如何对一个模型进行纠错。对ProModel 的逻辑性,基础元素以及高级调试器功能也会进行讨论。In this lab we describe the verification and v

2、alidation phases in the development and analysis of simulation models. In Section L8.l we describe an inspection and rework model. In Section L8.2 we show how to verify the model by tracing the events in it. Section L8.3 shows how to debug a model. The ProModel logic, basic, and advanced debugger op

3、tions are also discussed. L8.1 对检验和返工模型的验证问题陈述孟买服装制造厂从事着纺织品的生产、出口和转销。成箱的服装(每小时三箱,指数分布)从海外供应商那里运送到位于孟买的孟买服装厂仓库,已进行识别和分类、检查和包装。 识别与标签需要 U(1O,2) ,检查需要N(5,1) , 包装需要 N(4 ,0.25) 分钟。有时,标签机故障。 标签错误在检查中会被发现。60% 的服装都被正确标记和运送到包装区域;然而,40%的服装被送回返工(重新标记)。送回返工的服装拥有比在标签机上正规的服装更高的优先级。所有区域间的移动需要一分钟。模拟100 小时。优先级确定哪个等待

4、或停机的实体允许在位置或资源可用时访问该位置或资源。优先级可以是在 0 到 999之间的任意值并且更高的数值拥有更高的优先级。对于一个简单的优先级排序,你应该使用从0 到 99 的优先级。五个地点 ( 船, 标签 Q,重标签 Q,贴标签 , 检查和打包船)如 L8.2 所定义的那样。 两个实体 (服装和重新标记)下一步被定义。流程和路由的逻辑定义如L8.3 所示。请注意送回重新标记的服装相对于较低优先级的传入服装在访问贴标机时具有更高优先级。L8.1 Verification of an Inspection and Rework Model Problem Statement Bombay

5、Clothing Mill is a textile manufacturer, importer, and reseller. Boxes of garments arrive (three per hour, exponentially distributed) from an overseas supplier to the Bombay Clothing mill warehouse in Bombay for identification and labeling, inspection, and packaging (Figure L8.l). The identification

6、 and labeling take U(1O,2), inspection takes N(5,1), and packaging takes N(4,0.25) minutes. At times the labeling machine malfunctions. The labeling mistakes are detected during inspection. Sixty percent of the garments are labeled properly and go on to the packaging area; however, 40 percent of the

7、 garments are sent back for rework (relabeling). Garments sent back for rework have a higher priority over regular garments at the labeling machine. Movement between all areas takes one minute. Simulate for 100 hours. Priorities determine which waiting entity or downtime is 名师资料总结 - - -精品资料欢迎下载 - -

8、- - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 7 页 - - - - - - - - - permitted to access a location or resource when the location or resource becomes available. Priorities may be any value between 0 and 999 with higher values having higher priority. For simple prioritizing, you should

9、use priorities from 0 to 99. Five locations (Ship_In, LabeLQ, Relabel_Q, Labeling, Inspection, and Pack_Ship) are defined as shown in Figure L8.2. Two entities (Garments and Relabel) are defined next. The processes and routing logic are defined as shown in Figure L8.3. Note that the garments sent ba

10、ck for relabeling have a higher priority of 2 to access the labeling machine location as opposed to a lower priority of I for incoming garments. L8.2 通过跟踪仿真模型验证现在我们将运行建立于上一节中的具有跟踪功能的模型。跟踪将列出的事件发生在一个模拟的过程中。跟踪是在模拟过程中发生的事件的列表。例如,可以读取跟踪中的行,EntA 到达 LocI ,Res!停机 。跟踪列表还显示赋值,如同变量和数组元素赋值。可以通过多种方式来查看和生成步骤或连续的

11、两种模式之一的模拟运行跟踪列表关:选择此选项以停止跟踪。步骤:选择此选项可以单步执行一次列出一个事件的跟踪。每次您单击鼠标左键,模拟将推进一个事件。单击并按住鼠标右键在此模式中的,将生成一个连续的跟踪。连续:选择此选项可以跟踪连续写入跟踪输出子菜单中选择的输出设备。当您不知道要开始或结束, 跟踪的确切位置时,这非常有用。 单击并按住鼠标右键将导致跟踪停止之前释放鼠标按钮。 运行的仿真模型。 从选项菜单中选择跟踪。您可以选择一步模式或运行跟踪( 图L8.4 ) 的连续模式。现在选择步骤模式。在窗口或文件(图 L8.5 ) ,可以发送跟踪输出。让我们选择将输出发送到窗口。跟踪提示将显示在屏幕的底部

12、,如图 L8.6 所示。 按照提示跟踪并验证模型做它应该做什么。确保通过可视化和返工项目确实有更高的优先级比第一次项目的跟踪消息。另外,服装和重新标记队列内容图 L8.7 所示,从应注意重新标记队列已相当小,而服装队列会变得相当大有时(产生的标记操作及其低优先级)。L8.2 Verification by Tracing the Simulation Model Now we will run the model developed in the previous section with the Trace feature on. Trace will list events as they

13、 happen during a simulation. A trace is a list of events that occur during a simulation. For example, a line in the trace could read, EntA arrives at LocI, Downtime for Res! begins. A trace listing also displays assignments, such as variable and array element assignments. A trace listing of a simula

14、tion run may be viewed in several ways and is generated in one of two modes, Step or Continuous. ?Off: Select this option to discontinue a trace. ?Step: Choose this option to step through the trace listing one event at a time. Each time you click the left mouse button, the simulation will advance on

15、e event. Clicking and holding the right mouse button while in this mode generates a continuous trace. ?Continuous: Choose this option to write the trace continuously to the output device selected from the Trace Output submenu. This is useful when you do not know exactly where to begin or end the tra

16、ce. Clicking and holding the right mouse button causes 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 7 页 - - - - - - - - - the trace to stop until the right mouse button is released. Run the simulation model. Choose Trace from the Options menu. You can choose

17、either the step mode or the continuous mode for running Trace (Figure L8.4). Choose the step mode for now. The trace output can be sent either to the Window or to a file (Figure L8.5). Lets choose to send the output to the Window. The trace prompts are displayed at the bottom of the screen as shown

18、in Figure L8.6. Follow the trace prompts and verify that the model is doing what it is supposed to be doing. Make sure through visualization and the trace messages that the rework items are indeed given higher priority than first-time items. Also, from the garment and relabel queue contents shown in

19、 Figure L8.7, notice that the relabel queue is quite small, whereas the garment queue grows quite big at times (as a result of its lower priority for the labeling operation). L8.3 调试的仿真模型调试器(图 L8.8 ) 是方便、高效的方式进行测试或按照任何逻辑模型中的处理。使用调试器逐句通过一次一个逻辑语句和模型运行时检查变量和属性。显示所有局部变量、当前实体的属性,等等, 并且用户具有什么逻辑获取跟踪,甚至可以细分

20、到某一特定位置(图 L8.9 )特定实体的完全控制权。用户可以启动调试程序在运行时调试语句内的模型代码,或从选项菜单。 可以监视系统状态查看究竟何时和为什么事情会发生。结合跟踪窗口, 其中显示的事件,正在计划安排和调试器执行,以跟踪模型中的逻辑错误或问题。L8.3 Debugging the Simulation Model The debugger (Figure L8.8) is a convenient, efficient way to test or follow the processing of any logic in your model. The debugger is u

21、sed to step through the logic one statement at a time and examine variables and attributes while a model is running. All local variables, current entity attributes, and so forth are displayed, and the user has full control over what logic gets tracked, even down to a specific entity at a specific lo

22、cation (Figure L8.9). The user can launch the debugger using a DEBUG statement within the model code or from the Options menu during run time. The system state can be monitored to see exactly when and why things occur. Combined with the Trace window, which shows the events that are being scheduled a

23、nd executed, the debugger enables a modeler to track down logic errors or model bugs. L8.3.1 调试 ProModel 逻辑我们讨论的调试器细节之前,务必了解以下术语:声明: ProModel 中的语句执行某些操作,或采取一些行动- 例如,加入、观望、使用、移动和等等( ProModel 的参考指南,了解所有的 ProModel 语句的详细信息,请参阅)。逻辑:逻辑是组完整的语句定义的特定进程记录、停机事件、初始化或终止模拟,等等。线程:线程是特定的执行的任何逻辑。一个线程启动时需要执行的逻辑。这可以通过

24、操名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 7 页 - - - - - - - - - 作逻辑、初始化逻辑、运行一些节点逻辑、逻辑的停机时间或任何其他逻辑资源运行一个实体。请注意,同样的逻辑,可能几个线程在运行,并在同一时间。例如,在相同的多容量位置同时处理相同类型的三个实体将构成三个线程。即使几个线程可以同时模拟中执行相同的逻辑,模拟处理器可以处理它们的唯一一次。所以真的有当前只有一个线程,而所有其它线程已暂停(或者计划一些未来模拟时间或者等待后即时的同一模拟在当

25、前线程执行)。每次执行逻辑时,分配一个唯一的编号的线程执行它。THREADNUM 返回调用函数的线程的数目。此函数可以用造就一个过程在调试器的如果那和调试语句。例如, EISegundo 复合材料, 从 L7.6.1 节,实验室 7,假设已键入组数量为-5 (错字)。A 调试语句IF THREADNUM () = 39 THEN DEBUG 已添加到操作逻辑的烤箱位置导致错误,如图 L8.1O 所示。模拟将运行到适当的过程,然后造就调试器(图 L8.11 ) 。然后可以使用调试器逐步找到导致错误的特定语句的过程完成。L8.3.1 Debugging ProModel Logic Before

26、we discuss the details of the debugger, it is important to understand the following terms: ?Statement: A statement in ProModel performs some operation or takes some action-for example, JOIN, WAIT, USE, MOVE, and so on (refer to the ProModel Reference Guide for more information on all ProModel statem

27、ents) . ?Logic: Logic is the complete set of statements defined for a particular process record, downtime event, initialization or termination of the simulation, and so forth. ?Thread: A thread is a specific execution of any logic. A thread is initiated whenever logic needs to be executed. This can

28、be an entity running through operation logic, the initialization logic, a resource running some node logic, downtime logic, or any other logic. Note that the same logic may be running in several threads at the same time. For example, three entities of the same type being processed simultaneously at

29、the same multicapacity location would constitute three threads. Even though several threads can execute the same logic at the same time in the simulation, the simulation processor can process them only one at a time. So there is really only one current thread, while all other threads are suspended (

30、either scheduled for some future simulation time or waiting to be executed after the current thread at the same simulation instant). Every time logic is executed, a thread that is assigned a unique number executes it. THREADNUM returns the number of the thread that called the function. Thisfunction

31、can be used with the IF-THEN and DEBUG statements to bring up the debugger at a certain process. For example, for EISegundo Composites, from Lab 7, Section L7.6.1, suppose the GROUP quantity has been typed as -5 (typo). A debug statement IF THREADNUM () = 39 THEN DEBUG has been added to the operatio

32、n logic at the Oven location that causes the error, as shown in Figure L8.1O. The simulation will run until the proper process and then bring up the debugger (Figure L8.11). The debugger can then be used to step through the process to find the particular statement causing the error. 名师资料总结 - - -精品资料

33、欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 7 页 - - - - - - - - - L8.3.2 基本调试器选项调试器可以用两种模式:基本和高级。 基本调试器显示最初,使用先进的调试程序的选项。基本调试器(图 L8.11 ) 具有以下选项:错误显示框:显示的错误消息或为什么显示调试器,如用户条件成为真正的原因。逻辑显示框:显示逻辑正在执行的语句。信息框:显示的逻辑上下文或本地信息。上下文:显示模块、操作和停止调试器的行号。本地信息:在信息框中显示的本地变量和实体属性具有非零值的线程。结束模拟:选

34、择此选项可以终止模拟。这将提示您想收集统计信息。运行:继续进行模拟,但仍会检查调试器选项对话框中选择的调试器选项。下一条语句:跳转到当前逻辑中的下一个语句。请注意是否执行的最后一个语句挂起的线程 (例如, 如果要捕获资源等待实体),也符合调试器条件的另一个线程可能显示为下一个语句。下一个线程:显示调试器在启动或恢复的下一个线程。子例程:到步骤在此线程执行的下一个子例程中的第一个语句。再次,如果执行的最后一个语句挂起的线程,也符合条件调试器的另一个线程可能会首先显示。如果当前线程中找到没有子例程,则是错误显示框中显示一条消息。选项:显示调试器选项对话框。你也可以把此对话框从模拟菜单中找出。高级:

35、高级模式更改调试器。L8.3.2 Basic Debugger Options The debugger can be used in two modes: Basic and Advanced. The Basic Debugger appears initially, with the option of using the Advanced Debugger. The Basic Debugger (Figure L8.11) has the following options: ?Error display box: Displays the error message or reas

36、on why the debugger is displayed, such as the user condition becoming true. ?Logic display box: Displays the statements of the logic being executed. ?Information box: Displays either the context of the logic or local information. ?Context: Displays the module, operation, and line number in which the

37、 debugger stopped. ?Local information: Displays local variables and entity attributes with nonzero values for the thread in the information box. ?End Simulation: Choose this option to terminate simulation. This will prompt for whether or not you would like to collect statistics. ?Run: Continues the

38、simulation, but still checks the debugger options selected in the Debugger Options dialog box. ?Next Statement: Jumps to the next statement in the current logic. Note that if the last statement executed suspends the thread (for example, if the entity is waiting to capture a resource), another thread

39、 that also meets the debugger conditions may be displayed as the next statement. ?Next Thread: Brings up the debugger at the next thread that is initiated or resumed. ?Into Subroutine: Steps to the first statement in the next subroutine executed by this thread. Again, if the last statement executed

40、suspends the thread, another 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 7 页 - - - - - - - - - thread that also meets debugger conditions may be displayed first. If no subroutine is found in the current thread, a message is displayed in the Error Display box

41、. ?Options: Brings up the Debugger Options dialog box. You may also bring up this dialog box from the Simulation menu. ?Advanced: Changes the debugger to Advanced mode. L8.3.3 高级调试器选项先进的调试(图 L8.12 ) 包含基本在调试器中的所有选项,再加上几个高级的功能:下一步(线程): 跳转到下一步的线程启动或恢复。此按钮已基本在调试器中的下一个线程按钮相同的功能。新(线程): 跳转到下一次启动的线程。禁用(线程):

42、 暂时禁用调试器当前线程。专用(线程): 调试器显示只有当前线程中执行的语句。当线程终止时,将删除独家设置。下一步(逻辑): 跳转到下一次启动或恢复不执行相同的逻辑为当前线程的线程。新(逻辑): 跳过了任何续线程到未执行相同的逻辑为当前线程的下一步启动线程。这将自动跳转到一个新的线程。禁用(逻辑): 暂时禁用所有线程的执行当前逻辑调试器。专用(逻辑): 调试器显示只执行的语句中的任何线程是当前逻辑的一个实例。启用禁用线程和逻辑:使线程和先前已被禁用的逻辑。更多的信息和如何使用调试程序的各种选项的详细的示例,请参阅 ProModel 的用户指南。L8.3.3 Advanced Debugger

43、Options The Advanced Debugger (Figure L8.12) contains all the options in the Basic Debugger plus a few advanced features: ?Next (Thread): Jumps to the next thread that is initiated or resumed. This button has the same functionality as the Next Thread button in the Basic Debugger. ?New (Thread): Jump

44、s to the next thread that is initiated. ?Disable (Thread): Temporarily disables the debugger for the current thread. ?Exclusive (Thread): The Debugger displays the statements executed within the current thread only. When the thread terminates, the Exclusive setting is removed. ?Next (Logic): Jumps t

45、o the next initiated or resumed thread that is not executing the same logic as the current thread. ?New (Logic): Jumps over any resumed threads to the next initiated thread that is not executing the same logic as the current thread. This will automatically jump to a new thread. ?Disable (Logic): Tem

46、porarily disables the debugger for all threads executing the current logic. ?Exclusive (Logic): The debugger displays only the statements executed in any thread that are an instance of the current logic. ?Enable disabled threads and logics: Enables the threads and logics that were disabled previousl

47、y. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 7 页 - - - - - - - - - L8.4 练习L8.4 Exercises 1.对于 L8.1 节中的示例, 插入调试语句时服装被发送回进行返工。验证仿真模型实际发出后的服装返工命名为 Q 标签的位置。1. For the example in Section L8.1, insert a DEBUG statement when a garment is sent back for rework. Ver

48、ify that the simulation model is actually sending back garments for rework to the location named Label Q. 2. 中科 L7.1 (波莫纳电子) 例如,跟踪模型验证类型 B 的电路板如下表 L7.1 中的路由。2. For the example in Section L7.1 (Pomona Electronics), trace the model to verify that the circuit boards of type B are following the routing

49、given in Table L7.1. 3. 为第 L7.5 (聚铸造等等)中的示例,运行仿真模型并启动调试器从选项菜单。打开基本在调试器中的本地信息。验证半成品和 PROD_QTY 的变量的值。3. For the example in Section L7.5 (Poly Casting Inc.), run the simulation model and launch the debugger from the Options menu. Turn on the Local Information in the Basic Debugger. Verify the values of

50、 the variables WIP and PROD_QTY. 4. 在第 L7.3 (印度银行)例如,跟踪验证连续客户实际上正在由三个计票员反过来模型。4. For the example in Section L7.3 (Bank of India), trace the model to verify that successive customers are in fact being served by the three tellers in turn. 5. L7.7.2中(航运框无限)例如,跟踪验证充分框中实际上正在检查空托盘上被加载并正在卸载的船舶位置的模型。5. For

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 技术资料 > 技术总结

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁