title: How to use my agent to enter a process flow of a specific agent (ex: Depot[0]) from a population of agent (ex: Depots)?
body: <p>So, I have a case in anylogic where a drone needs to be transported via a bike from a certain place (namely, Depot) to a certain place (namely, Stopover Point). After that, the drone will be released from the bike and will do some mapping to a set of designated locations of Mapping Points. For this case, I used a process flow to make the bike (that I treat as a resource unit) to seize the agent (drone) at the Depot before the bike move to the Stopover Point and releasing the drone there.</p>
  <p>At first, I used to make some kind of sandbox model where I only use one Depot and one Stopover Point
  so that it is easier when I want to use my agent (drone) in a process flow via enter block (ex: I only have to write <code>main.depot.enter.take(this);</code> at my agent (drone) statechart to enter it to the process flow at Depot bacause the Depot is a single agent).</p>
  <p>The problem occurs when I tried to use more than one Depot and make it as a population of agent. This makes me unable to use <code>main.depot.enter.take(this);</code> because of the property of the Depot for it is now a population of agent and not a single agent anymore.</p>
  <p>The question is how should I do if I want my agent (drone) to enter the process flow of a certain/specific Depot (ex: only Depot[0])? I have used a paramater such as &quot;name&quot; with the value consists of texts like &quot;Depot 1, Depot 2, and so on&quot; and modify the commmand to <code>filter(main.depots, a -&gt; a.name == &quot;Depot 1&quot;).enter.take(this);</code> or <code>main.depot[0].enter.take(this);</code> but I think that's not the right way to code it because it didn't works. So, how is exactly the correct way to code or to do it if I want my agent to enter a process flow of a specific agent (ex: Depot[0]) from a population of agent (ex: Depots)? Thank you.</p>