vendredi 6 mars 2020

Conditional triggered transition with Anylogic

I have a model, where there is a =n agent that we want to change the state based on a condition. my condition is that, the distance between the agent and another agent must be <= 411 before the state changes. I have tried the following code in my condition field:

if (double distanceTo(getNearestAgent(main.Agent))<=411)
{
return true; 
}

i get the syntax errors : misplaced construct(s), and ( expected

What am I doing wrong ? Plz assist

Aucun commentaire:

Enregistrer un commentaire