kcolvin@calpoly.edu Posted March 13, 2014 Share Posted March 13, 2014 Greetings, here is a simple situation that I want to model, but can't figure out a way to do it: There is an incoming stream of entities. If there are less than 5 entities waiting at the source output buffer, then Worker1 should transport the entity to Server1. Worker1 only serves Server1. If there are 5 or more entities waiting, then Worker1 should continue to transport entities to Server1, but Worker2 should also help by transporting entities to Server2. Worker2 only serves Server2. If the output buffer falls to less than 5, then Worker2 should stop transporting. Basic model attached, but no logic to address my question. I've tried lots of "process-based" ideas. Please offer ideas. Thank you, Kurt Colvin BottleLine.spfx Link to comment Share on other sites More sharing options...
dsturrock Posted March 18, 2014 Share Posted March 18, 2014 I would look at the SimBits WorkerUsedForMultipleTasks and MoveableOperator for some tips. Link to comment Share on other sites More sharing options...
gocken Posted March 19, 2014 Share Posted March 19, 2014 there may be many ways for performing this. If your model is not very complex the logic may be: you should track the length of outputbuffer length of source (source@outputbuffer.contents) by using two monitor elements (monitor type, CrossStateChange)...set the InitialThresholdValue for 5 for each one, define two separate processes for each monitor's triggering events; one for above 5 (In this case you should set CrossingDirection positive) and the other for below 5 (and in this case you should set CrossingDirection negative). 1) Create a new process that would be triggered by "above 5 monitör" you should seize worker 2... (source@outputbuffer.contents>5 ---> seize worker 2) 2) And by the same logic Create a new process that would be triggered by "below 5 monitör" you should release worker 2...(source@outputbuffer.contents<5 --->release worker 2...) this is not the end of the story but it is like this.... For example, you should add a storage queue and each time you need to seize worker 2 you have to search storage queue and remove the first entity waiting for a worker (this time worker 2) etc... The second way: In summary, the above logic requires some additional modeling components. Let's try the uploaded file which Works for your purpose with only one process, three steps and a node list. This one is quite easy. But, be sure both will work... and that's it... BottleLine .spfx Link to comment Share on other sites More sharing options...
Recommended Posts