Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Event-Driven Process in SimEvents
Replies: 6   Last Post: Dec 11, 2013 10:11 AM

Advanced Search


Posts: 83
Registered: 6/22/12
Event-Driven Process in SimEvents
Posted: Nov 14, 2013 10:21 AM

Hi guys,

I have a working SimEvents model (.mdl) where I create entities (tasks) then assign attributes to them (ID, ServiceTime, Dependency, etc.). The structure of my model is the following:

1. Entities created.
2. Attributes assigned.
3. Tasks go through a Level-2 MS function which checks if a task's dependency is satisfied. Dependency means that if Task 2 depends on Task 1 then the rule is to keep Task 2 waiting until Task 1 finishes execution from the server then notify the system that Task1 is finished, and only then Task 2 can be passed to the Server. My Level-2 MS function does this successfully.

It seems that I should've built an event-driven way of checking for tasks' dependencies. However, I did it in a periodic manner. When a task does not pass the dependency check it goes to another queue where all unsatisfied tasks are accumulated there, then each task from that queue is checked separately, say every 1 tick a different task is checked.

This method works well; however, it's not very efficient. Assume Task 100 depends on Task 1, when Task 100 fails the first dependency check it goes to a separate queue joining the rest of the unsatisfied tasks. You can imagine that there are 99 unsatisfied tasks to check for their dependencies. If Task 1 finishes at time = 2, then Task 100 should ideally be released from the unsatisfied group as soon as Task 1 finishes execution, but given the way I build this checking process, Task 100 has to wait for all the tasks in the queue before it before having its dependency checked and eventually satisfied, then having it released to the server.

I hope by now I've given a good picture of my model. My question is how can I turn this into an event-driven process?

Ideally I want to keep all the unsatisfied tasks (entities) somewhere then as soon as one of those tasks has its dependency satisfied I should be able to select it amongst the unsatisfied tasks and release it to the server.



[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.