anylogic

How to select multiple GIS regions in AnyLogic source block?


I have a GIS workspace, where I have 4 zipcodes. People are set in random location of each zipcode. I have just one facility (pharmacy). Now I want to measure the queue size, utilization and time in system. For that, I have created a process flow, In the source block, Location of arrival I chose 'Network / GIS node', below that in Node, I can choose only one zipcode (gis region), but I have 4 gis regions. How can I choose all of them? See the attached picture of GIS space, process flow, and properties of source block. enter image description here


Solution

  • How can I choose all of them?

    You can not, and it would not make sense, if you think about it.

    What you can do is to select a random from those 4, effectively this is the same outcome as choosing "all".

    First, add all 4 regions into a collection (select them, right-click -> add to collection).

    Then, switch the "Node" selection from the drop-down to the code-based entry (the small icon to the left of the drop-down).

    In the now appearing code field, write randomFrom(myCollectionOfGISRegions)

    Now each new agent will be put into 1 of the 4 regions