0
votes

I am currently building a model of a factory in AnyLogic and I have not yet figured out how to differentiate different products through the factory flow. I am modelling cycle times using delay but I want the cycle times to de different depending on which product that the machine works on. I am very greatful for any tips on how to do this!

/Christoffer

1

1 Answers

0
votes

A basic concept of anylogic is agents. learning about them is essential to use anylogic. (find more info here Anylogic doc
The basic idea is that you represent your products as agents, with parameters, functions, statechart etc.
Eg. you could have an agent Type "Car". with parameters like:

int number_of_wheels = 4;
String carType = "sportscar";

enter image description here enter image description here

When processing them with the eg. the "process modeling library" you extract the info from your agents. This is done with the keyword: "agent" eg. agent.carType. you can use that info to determine a delay function:

int delay_function(Car agent){
    if(agent.carType.equals("truck")
        return 5;
    else if(agent.carType.equals("sportscar")
        return 10;
}

when you enter a delay, where you want to specify the delay time. You can use the function like: delay_function(agent)

enter image description here