|On this page…|
This example shows how to import data from a Microsoft® Excel® file to a SimEvents® model. It might be important for you to validate or test a simulation model against data from a real-life system in this way. For example, if, by analysis, you can verify that the intergeneration time for an Entity Generator exactly matches the input traffic pattern in a real system, the value of performing the simulation analysis is obvious. MATLAB has a rich set of functionality to import/export data from/to a variety of external file formats that include Microsoft® Excel®.
The function 'TimeAndPriorityData.m' imports the Intergeneration Time and Priority data from a Microsoft Excel file using the 'xlsread' function in MATLAB. The Intergeneration Time data is used by the Event-Based Sequence block to provide intergeneration time values to the Time-Based Entity Generator block. The Priority data values are used by the Set Attribute block in order to set a Priority attribute to each entity. The Single Server serves the entities sorted according to the 'Priority' attribute.