Anylogic: Stop sourcing if storage is full

example anylogic

In the example above I present an example anylogic process flow, excuse me for the link as I'm not allowed to upload pictures yet.

In this flow, is it possible to stop the source from sourcing if the rack system is full or filled to a certain level? (under the assumption that both rack picking and storing is done in that rack system.)

1 answer

  • answered 2018-11-08 07:34 Benjamin

    Sure, you can always switch a source off. It depnds on how you defined the arrivals in the source, but for a "Rate" and "Interarrival Time" source, you can use:

    mySource.set_rate(0);
    

    All you need to do is to call this in the correct point in your model, i.e. when the rack system is full. To do that, you might need to write a function isFull that loops through all its rows, positions and levels and tests myRackSystem.isFree(row, position, level). If everything is full, you stop the source from creating more stuff.