User Activity

  • Posted a comment on discussion Open Discussion on CLIPS Rule Based Programming Language

    Hi, I was asking myselft if calling the Eval function inside the Evaluate method of a User Defined Function is safe or not? I have several UDF that are called from clips rules, but inside them there is one or more call to the Environment.Eval that are used to create instances, for example, is this a common scenario or is something to avoid?

  • Posted a comment on discussion Help on CLIPS Rule Based Programming Language

    Hi, sometimes I get an exception like this: Router named 'BaseRouter157234' does not exist. The number is always different. Do you have an idea why this could happen? Who is creating these routers? I can think that there were other 157233 ruoters before this one, is this right? Attached there is a screenshot of the exception, just for reference

  • Posted a comment on discussion Help on CLIPS Rule Based Programming Language

    Yes, it works now, no more errors. Thank you

  • Posted a comment on discussion Help on CLIPS Rule Based Programming Language

    Hi, I've found what is causing the problem, but I don't know why, I suppose it's related to WeakReference. Anyways, this is the code that is running in a separated task public void Loop(string rulePath) { foreach (string file in Directory.GetFiles(rulePath, "*.clp").OrderBy(x => x)) { System.IO.StreamReader sr = new System.IO.StreamReader(file); string all = sr.ReadToEnd(); try { clipsEnvironment.LoadFromString(all); } catch (Exception ex) { throw; } } clipsEnvironment.AddRouter(new Routers.Trace(clipsEnvironment));...

  • Modified a comment on discussion Help on CLIPS Rule Based Programming Language

    Hi again, in another project I had defined a new ruoter, and now, after changing those files, I had a null reference exception here: bool CLIPSCPPRouterBridge::Query( CLIPSCPPEnv* theCPPEnv, const char* logicalName) { String^ cliLogicalName = Environment::CharStarToString(logicalName); Router^ r = (Router^)m_Router->Target; return r->Query(cliLogicalName); } r is null This is my implementation of router internal class Trace : Router { private static readonly string routerName = "trace"; CLIPSNET.Environment...

  • Posted a comment on discussion Help on CLIPS Rule Based Programming Language

    Hi again, in another project I had defined a new ruoter, and now, after changing those files, I had a null reference exception here: CLIPSCPPRouterBridge::~CLIPSCPPRouterBridge() {} bool CLIPSCPPRouterBridge::Query( CLIPSCPPEnv* theCPPEnv, const char* logicalName) { String^ cliLogicalName = Environment::CharStarToString(logicalName); Router^ r = (Router^)m_Router->Target; return r->Query(cliLogicalName); } r is null This is my implementation of router internal class Trace : Router { private static...

  • Posted a comment on discussion Help on CLIPS Rule Based Programming Language

    I've changed CLIPSNET_Router.cpp and .h It is now stable Thank you

  • Posted a comment on discussion Help on CLIPS Rule Based Programming Language

    Hi, I was trying to do this thing: I wish to have the clips environment running in a loop in a separated thread and from the main thread send commands to the environment The problem is that when everything is running, without doing nothing, the memory occupation start increasing about 1MB per second, and looking to a memory snapshot, it says that the object CLIPSNET.CaptureRouter is continuosly allocating instances of about 160 bytes but at a rate of about 5000 per second. Below there is the minimal...

View All

Personal Data

Username:
davide-archetti
Joined:
2022-10-15 08:44:03.837000

Projects

  • No projects to display.

Personal Tools