I am fairly new to Anylogic and I am trying to figure out how to use the "CustomDistributionOfOptions" constructor to manually create a random distribution of items defined in an "Options list". My goal is to dynamically define the custom distribution of the options-list-items based on a user input. After researching solutions online on how to dynamically define a custom distribution, I came upon this solution: Dynamically Changing Distribution in AnyLogic. In this post, the user uses a constructor to create a custom distribution, which is what I want to do as well. However, every single time I try and initialize the constructor in my "Main" agent as an action on startup, I keep getting an error that states that that method is undefined for the type Main.
I do not understand why this error keeps popping up, as the documentation states that I can just use the function "CustomDistributionOfOptions()" as a constructor. Please let me know what I am not understanding and/or missing.