예제 #1
0
파일: Desire.cs 프로젝트: nasa03/Jasonity
            public void Run()
            {
                Literal newDesire  = desire.ForceFullLiteralImpl().Copy();
                Literal stateAnnot = AsSyntax.CreateLiteral("state", new Atom(state.ToString()));

                if (reason != null)
                {
                    stateAnnot.AddAnnot(AsSyntax.CreateStructure("reason", new StringTermImpl(reason)));
                }
                newDesire.AddAnnot(stateAnnot);
                Trigger eEnd = new Trigger(TEOperator.desireState, type, newDesire);

                if (reasoner.GetAgent().GetPL().HasCandidatePlan(eEnd))
                {
                    reasoner.GetCircumstance().InsertMetaEvent(new Event(eEnd, null));
                }
            }