Mirek Posted May 8, 2020 Share Posted May 8, 2020 (edited) Hello, I have a Arrival Table, but I only want to create Entities of a specific part of the Table based on a property. IntCol Entity 0 A 0 C 1 B 1 c So, the source should create all entities with a certain integer in column 'IntCol'. The integer value is assigned by a referenced property that I can experiment with different parts of the ArrivalTable For example: If Property == 0 , create only A and C in the source. How can I do that? All the best Edited May 8, 2020 by Mirek Link to comment Share on other sites More sharing options...
gocken Posted May 8, 2020 Share Posted May 8, 2020 You only have to change the key_value_to_generate property of the model to generate entities from whichever stream you want. Examine the attached model and do not hesitate for asking more. Hope this helps! create Entities of certain part of ArrivalTable.spfx Link to comment Share on other sites More sharing options...
Mirek Posted May 9, 2020 Author Share Posted May 9, 2020 Hi gocken, thanks for your help. What if The EntityInstanceProperty1 is a foreign key in my case. What to reference instead of: Table1[generated_index].EntityInstanceProperty1 ? I referenced the the table with the primary key at 'EntityType'. Link to comment Share on other sites More sharing options...
gocken Posted May 9, 2020 Share Posted May 9, 2020 Hi Mirek, can u upload a sample of your model or a screen shot of the table structure? Link to comment Share on other sites More sharing options...
Mirek Posted May 9, 2020 Author Share Posted May 9, 2020 (edited) 1) ProductMix 2) Orders, where I want to pick one OrderStatus with your approach 3) Each Entity has its own TaskSequences listed in this Table It seems that the approach is working to pick the correct Entity, but it seems like the references to Table 3) are incorrect since the Entity C somohow gets the TaskSequences of Entity A. Edited May 9, 2020 by Mirek Link to comment Share on other sites More sharing options...
Mirek Posted May 9, 2020 Author Share Posted May 9, 2020 Do you need a sample? Link to comment Share on other sites More sharing options...
gocken Posted May 9, 2020 Share Posted May 9, 2020 Hi Mirek, I was not able to figure out the solution from the figures. It would be better if you upload a sample file. I will try to find a solution by experimenting on it Link to comment Share on other sites More sharing options...
Mirek Posted May 9, 2020 Author Share Posted May 9, 2020 (edited) Thanks again for your help. There you have the attached model. There you should see that the refernce to the TaskSequenceTable does not work. The right Entity (B) gets created but it points to the TaskSequence of Entity (A) Create Entities of certain part of ArrivalTable.spfx Edited May 9, 2020 by Mirek Link to comment Share on other sites More sharing options...
gocken Posted May 9, 2020 Share Posted May 9, 2020 Hi Mirek, I think the problem here is your setting arrival mode to arrival table. I am not sure but after generating right entity the source object then assigns it row according to the arrival table which means row 1. Then the right entity (B) follows the wrong task sequence. Try by setting arrival mode to interarrival time. This time it should follow the right seqeunce. I will try other options and inform you if I get any other solution. Link to comment Share on other sites More sharing options...
gocken Posted May 9, 2020 Share Posted May 9, 2020 (edited) For a quick solution to your problem for now you can try to define a date time property in model and then set different values to different entity types in table1 date time property column. For example, set date time property as 11.5.2020 00:00:00 for entity A and set 11.5.2020 00:00:01 for entity B. And, in facility layout you can set date time property of the model to 11.5.2020 00:00:00 for generating entity A or 11.5.2020 00:00:01 for generating entity B. Is it possible? If you want to try this option you should not use my previous approach then. Edited May 9, 2020 by gocken Link to comment Share on other sites More sharing options...
Mirek Posted May 9, 2020 Author Share Posted May 9, 2020 Hi gocken, I think the second approach will be impossible with my huge DataTable. I think I need to find a way to point to the right row or try with the interarrival time mode. At first I thought of implementing a further Table with a Column key = IntegerProperty1 and then in a process Set the row in this table to IntegerProperty1. I thought in this case it should only point to the right rows in Table1. Link to comment Share on other sites More sharing options...
Mirek Posted May 10, 2020 Author Share Posted May 10, 2020 "And, in facility layout you can set date time property of the model to 11.5.2020 00:00:00 for generating entity A or 11.5.2020 00:00:01 for generating entity B" how do you mean that? Link to comment Share on other sites More sharing options...
gocken Posted May 10, 2020 Share Posted May 10, 2020 (edited) Hi Mirek, I have managed to do something. In this version of your model you have the ability to enter the entity type to be generated via a stringproperty of model. Then, the right entity type is generated and follows its own task sequence. Note that, I included the logic into onruninitialized process (to see whether it is operating as it is intended). You can move this logic into your own process and trigger anytime you want. By this way you are allowed to change the entity type whenever it is required over the simulation run. Hope this works for you. Create Entities of certain part of ArrivalTable.spfx Edited May 10, 2020 by gocken Link to comment Share on other sites More sharing options...
Mirek Posted May 10, 2020 Author Share Posted May 10, 2020 Thank you gocken. The only problem is, that I have to look for the IntegerProperty1 in table 1, because Entities can be mixed within these parts. I can't just look for one EntityType, but release all entity of that particular stream. Link to comment Share on other sites More sharing options...
gocken Posted May 10, 2020 Share Posted May 10, 2020 ok, I see. Let's try the attached file pls. Create Entities of certain part of ArrivalTable_1.spfx Link to comment Share on other sites More sharing options...
Mirek Posted May 10, 2020 Author Share Posted May 10, 2020 I found a quite nice solution (attached). Thanks again for your help, really appreciated Create Entities of certain part of ArrivalTable.spfx Link to comment Share on other sites More sharing options...
Recommended Posts