Luu Khanh Minh Posted November 23, 2018 Share Posted November 23, 2018 In the source of my model, I would like to generate arrival events by looking through row by row of a given table. However, I only want to create the 2nd arrival event when all the entities of the created by the first arrival event has moved beyond a certain point, where Globalstatevalue = 0. So in my process flow, I did something like this:When the globalstatevalue = 0, I want to go to the next row of my table and generate the 2nd arrival. I did this my fire an event The setting at my source: Arrival Mode: On event Triggering Event Name: name of event that I fired in the process flow. I managed to get the initial arrival to make sure that the Globalstatevalue = 0. condition is reached. However, the 2nd event is not triggerd at all and the CurrentRowNumber is not incremented as well. May I have some advice please? Thank you Link to comment Share on other sites More sharing options...
gocken Posted November 23, 2018 Share Posted November 23, 2018 where and how did you use the currentrownumber state variable? is it a model based state variable or modelentity based? Link to comment Share on other sites More sharing options...
Luu Khanh Minh Posted November 23, 2018 Author Share Posted November 23, 2018 (edited) Hi gocken Its a model-level(i.e global state variable. For example, initially the value of currentrownumber is 1. It is used to make reference to the first row of a data table to create a particular number of entities as the first arrival event. After the created entities of the first arrival event reached some downstream workstation in the model, the Keep Track Population global state variable is set to zero. Then at this point, I want to create a second arrival event by referencing to the second row in the data table. I do this by incrementing the gobal state variable currentrownumber by 1 and fire an event right after. I would like to use this event to trigger the second arrival by making reference to the second row in the data table. In my model, i would like to continue generating the next arrival events by referring to each row of a data table from row 1 to the final row. Hope this clarifies my question. Thank you very much! Edited November 23, 2018 by Luu Khanh Minh Link to comment Share on other sites More sharing options...
gocken Posted November 24, 2018 Share Posted November 24, 2018 (edited) why do you use source? In Workstation 1_exited step you can just increase the currentrownumber by one using an assign step and use a create step just after this assign step, set its properties using any table (and also currentrownumber state variable). and transfer this entity to the appropriate place. you do not need to use source step? Edited November 24, 2018 by gocken 1 Link to comment Share on other sites More sharing options...
Luu Khanh Minh Posted November 25, 2018 Author Share Posted November 25, 2018 Ah, I didn't know that I can use the step Create. I will look into it. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts