Search code examples
anylogic

Why no HashMap data structure in AnyLogic


I'm currently creating a model where I want to call some "put" methods on a HashMap. The order of the keys does not matter here, so I figured that a HashMap was the best fit for the problem.

However, I can only see the "LinkedHashMap" option in the properties of the "collection" block. Is there a particular way of making the "collection" become a HashMap?


Solution

  • You can use any Java data structure you like, the drop-down is just a suggestion.

    However, it is easier to just define a variable in such a case: enter image description here