Jump to content

Only create Entities of certain part of ArrivalTable


Mirek
 Share

Recommended Posts

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 by Mirek
Link to comment
Share on other sites

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

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.

 

image.png.df258b652fdec6b27223f9d33a3d8259.pngimage.png.9e6c2915d278c5e7e2cb0434102c54a4.pngimage.png.8a038bebf3d50f63e7d6f732eb7c663c.png

Edited by Mirek
Link to comment
Share on other sites

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

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 by gocken
Link to comment
Share on other sites

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

"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

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 by gocken
Link to comment
Share on other sites

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

×
×
  • Create New...