Batching and Unbatching in SimEvents 1

Posted by Will Campbell,

Will's picks this week are the SimEvents Batching and Unbatching Blocks by Rick Rosson.

Most of you are probably familiar with Simulink, but how many of you have made use of SimEvents? In Simulink, lines between blocks represent (for the most part) the flow of data between different mathematical operators in your model. In SimEvents, lines represent a completely different concept! Connections indicate the ability to transmit discrete entities between elements of your system. Transmission occurs at discrete times, aka events, during simulation. Hence the name SimEvents.

As an example of when you might use SimEvents, imagine you want to model a tech support call routing center. Customers randomly call the center at an expected frequency that varies by the time of day. They spend some time listening to the automated system, answer some questions, and then get routed to the proper technician based on the type and urgency of the problem. Depending on the scale of the problem, skill of the technician, number of other customers in the queue, and possibly other factors, the customer spends a certain amount of time waiting to get their issue resolved.

How many active technicians should you have available to ensure a maximum customer wait time of 5 minutes during normal call volume? How bad is customer wait time likely to get under worst-case call volume conditions? Answering these type of questions through simulation can prove a huge cost saver for a company. However, modeling this system with core Simulink blocks is a significant undertaking.

Through SimEvents, this class of problem can be modeled quickly and intuitively. In fact, one of our tech support staff members built a call center model (and was quickly promoted to our development department). Logistics and manufacturing processes lend themselves well to SimEvents, but you can also use it to model hardware communications. I've built simulations of problems varying from passenger motion through subway systems to MIL-STD 1553 avionics data transfer.

What Rick's contribution provides is a way to model a flood of entities into a system. Imagine something catastrophic happens to your product and tech support has 100 customers simultaneously call. Rick's block melds them into a single entity (in my example, a mob of angry customers), which can be decomposed downstream in your SimEvents diagram.

Batching and Unbatching in SimEvents

Rick's submission got my attention because it was eerily similar to something I had created for my own personal use. I called this block the accumulator, but the idea is essentially the same. The lesson here is to always share your work on MATLAB Central. If you don't think anyone else would be interested, you're probably wrong!

Let us know what you think here or leave a comment for Rick.

1 CommentsOldest to Newest

Shannon replied on : 1 of 1

Hi :)

I am a mechanical engineering student at the University of Alberta and I have an urgent question about SimEvents.

I was wondering if you could help me…

I have modeled a manufacturing process using the batch add-on, so that after 1000 units have been collected, they are combined as a single unit and sent to the packaging area. I am getting an error that says the following:

“Error in ‘Filename/Batch/Generate Enable Signal/f #n’ block. Exceeded maximum number of simultaneous events, 1000 at time 267.200000.”

I’ve set up a similar process and did not encounter this problem with that one so I don’t understand what’s wrong.

I really appreciate your time and consideration. If you could assist me with this issue, I would be very grateful. My presentation is next Sunday.

Thanks so much for your time,