title: How do i free a Waitblock in Anylogic
body: <p>we are a group of students with not much experience in programming. Our task is to simulate a circular process where doors are undergoing at least 3 processing steps in a milling machine. We want to prioritize the products e.g. if a door with thickness 43mm (red number above the door) is at conveyor 1, then there shouldn't be a door with another thickness on it. Our idea is to use a wait block that should only release the next agent if:
  the thickness is the same or conveyer 1 is empty
  For that we used the following code in the picture.</p>
  <p><a href="https://i.stack.imgur.com/ZCT0P.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>But the code: wait.free(agent.door); doesnt work when the current agent on conveyer 1 leaves it. At proceeding simulation we don`t get an error code. Other ideas are welcome.</p>
  <p>Best regards</p>