Writing a Stop condition in Anylogic
<p>I am new in anylogic, and I want to write a stop condition for the simulation and then save the final values:
I have some stocks and flows and I want that when one of my stock values reaches a specific value, the simulation stop and then saves all the values;</p>

<ol>
<li>where should I write the condition?</li>
<li>what is the statement for stopping simulation in this case?</li>
<li>how can I save the values?</li>
</ol>

<p>Thanks :)</p>