Dynamically Changing Distribution in AnyLogic

513 views Asked by At

I am using AnyLogic to develop a model. I used the 'distribution' element to initialize values for a parameter in my model. It is working fine, but I want to update these values as my simulation proceeds forward. e.g. if in week 1, the distribution can have values:

Distribution

But in week 2, I wan to update these values, then again in each coming week.

I have some equation based on which I want to make calculations and update these values. I could not find any functionality in AnyLogic concerning this. Any ideas how to achieve this?

1

There are 1 answers

0
Gregory  Monahov On BEST ANSWER

You may create distribution from scratch, using various constructors. Pass into constructor array with existing and additional values to get the updated custom distribution. Your distribution is created with this constructor:

CustomDistribution(double[] intervalStarts, int[] numberOfObservations, Agent owner)

It may be convenient to store initial array in database, and each next array in model variable.