User Activity

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

    Sorry I just added a code snippet quicky which did not have the right syntax.. This is my complete rule (you can just skip my udf) Build(rule_env, "(defrule calc_time_diff" " ?f <- (Time (fact_id ?var_fact_id) (current_time ?var_current_time) (previous_time ?var_previous_time))" " =>" "(modify ?f (time_diff (- ?var_current_time ?var_previous_time)))" "(c_e_t \"Fact ID is\" ?var_fact_id \"aktueller Zeitstempel\" ?var_current_time \"vorheriger Zeitstempel\" ?var_previous_time))"); I still receive the...

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

    I would like to build a defrule, where I modify a fact based on values of two other facts. So that for every fact where the current_time and the previous_time changes the difference between these two is calculated and modified in time_diff. If I execute this functions I only receive the error [ARGACCES2] Function '-' expected argument #1 to be of type integer or float. What am I doing wrong? Build(rule_env, "(deftemplate Time" " (slot fact_id)" " (slot current_time)" " (slot previous_time)" " (slot...

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

    I embedd CLIPS into my native application with multiple facts (sensor values) and rules. For now I execute the rule engine via Run(rule_env, -1); after every fact modification. Facts will be modified if sensor values of the native environment change. The application works seemless. For the reason that I also write my thesis about this project I'm wondering if there are any metrics about the performance values and used algorithms. Is it true that is makes use of the rete algorithm?

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

    Okay, I solved it via delivering a String before every variable and checking this string.

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

    That is not really what I wanted to achieve. I partially solve this issue via assigning each fact a fact_id. I store all facts within different maps in my embedded application. Over this fact_id I can find the fact in the map an modify it if there are changes in the embedded application. However this is solved using the UDF. For now I still have the issue that the UDF only gives the value of the given variables. Is there any way to receive the name of the variable also so that the UDF do different...

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

    Hey, I integrated this rule engine in my native application (sensor bus system in a building) and it works fine right now. What already is working: Building facts for apartments, rooms and sensors within the rooms. Then I store these facts within a map so that I can modify them later. I also know how to modify the fact which is executing the rule on the RHS but this is not what I want to achieve. I want to modify facts which where build previously in my native application based on a execution of...

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

    I already achieved the task. I am trying to execute a embedded function based on a Rule activation. I used the UDF construct, added the function to userfunction.cpp and specified all parameters accordingly. No I'm able to execute a function as an action of the RHS of the rule.

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

    Thanks for the tipp but this unfortunatetly does not work really well. I defined to different functions to be fired before or after a certain rule is met. But they are fired everytime I run the environment and not only if the rule is met. AddBeforeRuleFiresFunction(env, "test6", PrintPeriod, 0, NULL); AddBeforeRuleFiresFunction(env, "test7", Ausgabe, 0 , NULL); I want to execute a function only if the pattern for a rule is met and the RHS is activated. Wouldn't I be also able to define UDF and add...

View All

Personal Data

Username:
skobs
Joined:
2020-06-11 14:46:55

Projects

  • No projects to display.

Personal Tools