//int sumAct = 0; int nbAct = 0; protected void Act() { Reasoner reasoner = GetReasoner(); int i = 0; int ca = cyclesAct; if (ca != 1) { // not the default value, limit the value to the number of intentions ca = Math.Min(cyclesAct, reasoner.GetCircumstance().GetNbRunningIntentions()); if (ca == 0) { ca = 1; } } while (running && i++ < ca && !reasoner.CanSleepAct()) { reasoner.Act(); } //sumAct += i; nbAct++; //System.out.println("running act "+(sumAct/nbAct)+"/"+ca); }