Beispiel #1
0
        public void Run()
        {
            Reasoner reasoner = GetReasoner();

            while (running)
            {
                if (reasoner.GetSettings().IsSync())
                {
                    //WaitSyncSignal();
                    ReasoningCycle();
                    bool isBreakPoint = false;
                    try
                    {
                        isBreakPoint = reasoner.GetCircumstance().GetSelectedOption().GetPlan().HasBreakpoint();
                    }
                    catch (NullReferenceException e)
                    {
                        // no problem, there is no sel opt, no plan ....
                    }
                    InformCycleFinished(isBreakPoint, GetCycleNumber());
                }
                else
                {
                    GetUserAgArch().IncCycleNumber();
                    ReasoningCycle();
                    if (reasoner.CanSleep())
                    {
                        Sleep();
                    }
                }
            }
        }
Beispiel #2
0
 public void SetReasoner(Reasoner reasoner)
 {
     this.reasoner = reasoner;
     if (reasoner.GetSettings().Verbose() >= 0)
     {
         //logger.setLevel(ts.getSettings().logLevel());
     }
 }
Beispiel #3
0
        override public object Execute(Reasoner ts, Unifier un, ITerm[] args)
        {
            Settings stts = ts.GetSettings();

            stts.SetVerbose((int)((INumberTerm)args[0]).Solve());
            //ts.GetAgent().GetLogger().SetLevel(stts.LogLevel());
            //ts.GetLogger().SetLevel(stts.LogLevel());
            return(true);
        }