vavei5 Posted November 28, 2016 Share Posted November 28, 2016 Hello, Can someone explain me how to create a model where the server waits to have 7 entities to process all of them at the same time. I am working on a project where I need to receive 7 entities to make a batch and then process this batch. Also, I need to know how can I stop the source when the server is processing the batch and when there is 3 entities who are waiting in front of the server. Source ----------Server (need 7 to make a batch) --------Sink Source --------- (no more than 3 entities waiting) Server(Processing)-------- Sink Thank you Link to comment Share on other sites More sharing options...
jkirby Posted November 29, 2016 Share Posted November 29, 2016 Hello vavei5, When you say you want your source to stop, do you mean permanently or temporarily? You can do either. Judy Link to comment Share on other sites More sharing options...
gocken Posted November 29, 2016 Share Posted November 29, 2016 Set arrival mode of source on event then define your events to be either server is processing or there are three entities waiting in input buffer of the server. You should define a triggering event which is triggered by two seperate monitors each monitors the conditions you mentioned. Link to comment Share on other sites More sharing options...
vavei5 Posted December 1, 2016 Author Share Posted December 1, 2016 I mean temporary. But this is not my biggest problem, I really don't know how to make my server works by batch . Link to comment Share on other sites More sharing options...
vavei5 Posted December 1, 2016 Author Share Posted December 1, 2016 OK I resolve half of my problem. I decide to put a combiner where 1 parent wait to have 6 membre to batch and process. Now, I have some problems when I want to stop temporary my source. I tried to create a process at Source_CreatingEntities , but I think I don't write well my conditions for the decide steps. The Process goes like this Begins------Decide---(true)------Decide--(true)----Wait-----End | | | (false) | (false) ---- ------ The first Decide, I want to be true when there is 3 entities waiting at the member input link : MemberInput@Combiner1.NumberTravelers>=3 The second Decide, I want to be true when my combiner is processing : Combiner1.Capacity.Allocated>=1 The wait step is a event that is fire when the combiner finish processing the batch Can you tell me how to write well the condition for the decide steps ? Thanks Link to comment Share on other sites More sharing options...
jkirby Posted December 1, 2016 Share Posted December 1, 2016 How about using a state variable to count the amount of entities that have come out of your source and use another state variable in the source's Entities Per Arrival property? You can fire an event when the "count" state variable has reached a certain number that will assign the variable that you used for the Entities Per Arrival in an associated process to that same fired event. And when a new parent exits from the node of it's source you can check to see if the variable is set to 0. If it is, then assign it to 1 again. Judy Link to comment Share on other sites More sharing options...
Recommended Posts