How to Use SimEvents in MATLAB
MATLAB (Matrix Laboratory) is more an engineering environment than a Language. You can write programs in MATLAB, but some of its features aid the development process by providing a platform of well-written and fully-tested functions that form the basis of many engineering programs. It provides "toolkits" on neural net, genetic algorithm, fuzzy logic, signal processing, and many more. One of these toolkits is SimEvents, which contains the fundamental functions needed to create a simulation program.
Instructions
-
-
1
Set up and maintain the calendar. The calendar is the heart of the simulation and SimEvents makes it easy. The basic mechanism is already written and you only need to describe the time parameters – starting times, time divisions, and ending times -- as well providing a method for putting things in the calendar. Defining the calendar parameters is the first step to designing a simulation.
-
2
Define and describe the queues. Queues are almost always a part of any simulation, and describing the size and number of queues is a critical part of designing your simulation in SimEvents. You will need to write functions that describe how things arrive at the queues.
-
-
3
Choose how you want to represent information about your simulation. With SimEvents, you have the power of MATLAB to represent information with graphs, histograms and other pictorials.
-
4
Employ Object Oriented Programming (OOP) technology to describe things in the real world that might be changing during your simulation. For example, if you are doing a simulation of how a new fender design will hold up under impact, you can describe the fender as a data structure that holds both information about the fender and functions that describe how it deforms.
-
1
Tips & Warnings
During the simulation, the computer runs by executing a list of events that are on the calendar. Each event puts another event on the calendar. Pushing a button creates a door-opening event that happens at a discrete time in the future, and this new event is put on the calendar in the proper place. SimEvents simplifies these programs by providing the underlying structure for functions, such as calendar maintenance.
SimEvents does not guarantee that your simulation will be accurate, just that it will be faster and easier to write. The accuracy depends on factors such as how accurately you describe how people arrive to add to the queues and how accurately your object descriptions match the real-world objects.
References
Resources
- Photo Credit Comstock/Comstock/Getty Images