Skip to content
Advertisement

creating an Agent with differently set parameters according to probabilities

I am modeling an assembly line that has a big variety of products that require different steps in the assembly (mostly different delay times).

From previous trial and error I’ve learned that I have to use only one Agent type to mimic the parts. So I set up an Agent with multiple string and boolean Parameters. In the blocks following the source I need to read those parameters.

DataBase Table

In the screenshot you can see the DataBase Table I created. Color, b, lh, nh, t_nh and t_picklh are the parameters I added to the Agent.

I now want the source to pick one of the 3 Rows according to the set probabilities everytime an Agent is spawned and set the Agents parameters accordingly. So when a new Agent is created there is an 80% chance its color is black, its “b” parameter is true, its “lh” parameter is true and so on.

How do I need to set up the source so it picks a row by probability? I looked at many tutorials and example models but it looks like the source cant do this with the preset modes (arrivals defined by: rate, arrival schedule etc.) I could write a Table with thousands of Dates to mimic the probabilities but there has to be a smarter way I think.

Thank you!

Advertisement

Answer

Unfortunately, this can not be achieved by using Source alone and has to be done using a Custom Distribuition with an Option based parameter and each option mapped to one of 3 classes in your example (A,B,C). Once the class is selected, you should have a lookup function that populates agent properties based on class in the Source On At Exit action (i.e. before agent actually leave the source).

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement