Luu Khanh Minh Posted November 4, 2018 Share Posted November 4, 2018 In my model, I have a separator that will create 4 exact copies of the input entity. I would like to assign different values of states to each of these 4 copies. How can I do so? Thank you! Link to comment Share on other sites More sharing options...
CWatson Posted November 4, 2018 Share Posted November 4, 2018 Within the Separator, there is a State Assignments section of properties - within this, there is a section for assigning 'Before Member Exiting' where you could assign the members different values based on a distribution or some other expression. Link to comment Share on other sites More sharing options...
Luu Khanh Minh Posted November 5, 2018 Author Share Posted November 5, 2018 Hi Watsons, thank you for your input!.Let me rephrase my question again. Prior to the Separator, I have a Combiner that creates a batch of 4 entities. At the separator, I would like to assign exactly 1 entity in the batch into state1, 1 entity in the batch into state2, 1 entity in the batch into state 3, and 1 entity in the batch into state 4. I'm not sure how to do this in a deterministic method based on the batch size. I only know how to assign the states based on a distribution, which is not what I need in this case. It would be great if I could have some advice on this Many thanks! Link to comment Share on other sites More sharing options...
Luu Khanh Minh Posted November 5, 2018 Author Share Posted November 5, 2018 Hi Watsons, thank you for your input! Let me rephrase my question again. At the Separator, 4 entities are created. I would like to treat them as a batch and assign exactly 1 entity in the batch as state1, 1 entity in the batch as state2, 1 entity in the batch as state 3, and 1 entity in the batch as state4. I'm not sure how to do this in a deterministic method based on the batch size. I only know how to assign the states based on a distribution, which is not what I need in this case. It would be great if I could have some advice on this Many thanks! Link to comment Share on other sites More sharing options...
jzhou Posted November 5, 2018 Share Posted November 5, 2018 If you only assign the four entities ,it's easy. you can use a statevariable as a counter and use Decide to check the 1st one, the 2nd one, etc.. 1 Link to comment Share on other sites More sharing options...
gocken Posted November 5, 2018 Share Posted November 5, 2018 Hope the attached model should work for you. Assign state to a specify number of entities.spfx 1 Link to comment Share on other sites More sharing options...
Luu Khanh Minh Posted November 6, 2018 Author Share Posted November 6, 2018 Dear zjou and gocken Both of your answers pointed me to towards the correct direction! Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts