Home > Enterprise >  AnyLogic, Condition to check if an attractor is occupied
AnyLogic, Condition to check if an attractor is occupied

Time:08-03

I am new to AnyLogic and am looking to find a way of checking if an attractor is occupied.

I have a Jib Crane that is supposed to sort items to four different attractors based on whether or not they are occupied. So far I am using a SelectOutput5 block with randomTrue(0.25) followed by four restricted areas, but I hope to be able to select the output based on whether or not the attractor is empty, (or if the restricted area is empty), whichever is easier.

Any help would be much appreciated.

CodePudding user response:

You cannot check this, attractors are purely visual constructs for positions.

If you want this, you need to add this yourself. One way is to create an agent type with a parameter myAttractor linking to the actual attractor and the agent managing the state "taken" / "free".

But it is entirely manual

  • Related