'Create a random distribution programmatically in AnyLogic with a double array of probabilites and plot it

Is it possible to create a CustomDistribution in AnyLogic with an double array interval_start and a double array probability, which is one unit smaller? It shall look like this: CustomDistribution c = new CustomDistribution(interval_start, probability);

I could not find any constructor for this case - more specifically for probabilities. The only similar constructor I could find was this: CustomDistribution​(double[] intervalStarts, double[] numberOfObservations)

My second question is how can I plot this distribution in AnyLogic?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source