Questions tagged [clips]
CLIPS is an acronym for C Language Integrated Production System, rules-based programming framework designed for building expert systems.
623
questions
0
votes
1answer
20 views
Undefined class 'command_data' in object pattern - CLIPS
I'm using this Protege exported code on the first code block.
(defclass systemEntity
(is-a USER)
(role abstract)
(single-slot suspect
(type SYMBOL)
(allowed-values yes no)
...
0
votes
1answer
35 views
Accessing values in CLIPS?
Assume I have the following set of definstances which show the inputs and outputs of various stages of an electric circuit. I don't include all the classes and instances as I don't think it's relevant ...
0
votes
1answer
29 views
How to run jess file (.clp file) from windows CMD/ .bat file?
How to run a .clp file (jess) in windows cmd / .bat file? My current file looks like that:
(deftemplate Tree (slot current_node)(slot node_childrens))
(assert (Tree (current_node A)(node_childrens B,...
0
votes
1answer
28 views
How to assert the opposite value from that of the matching?
I have a rule that has a slot that does a matching with two colours, and it doesn't matter which one it will match as long as after the matching it changes to its opposite colour. However when I write ...
0
votes
0answers
19 views
how to calculate minutes between 2 datetime
I am trying to implement a def function that should calculate minutes between 2 datetime ,
How can I implement?
"date1": "2020-04-17T20:45:00.000Z"
"date2": "2020-04-...
0
votes
1answer
20 views
Is there any way to prioritize a rule by its own slot in CLIPS?
Is there anyway to make a rule fire earlier given a specific slot value that a fact may have?
I was wondering if there is anything like dynamic salience but for slot values
Thank you
0
votes
1answer
31 views
Expected argument #1 to be of type integer or float on CLIPS code
I have a problem with my code that is to recommend a herbicide and an application rate for it as appropriate in a given field situation.
(deftemplate plant
(multislot weed)
(multislot crop))
(...
0
votes
1answer
31 views
How can we call a defrule inside another defrule?
I am totally new to CLIPS and I would like to know how could we call a defrule inside another defrule.
For example if one rule does a regular job like printing or swapping, and another rule wants to ...
1
vote
1answer
71 views
Something like OR operator in CLIPS (CLIPS Rule Based Programming Language)
I need help with this program, I couldn't find out how to do that a user can input a yes/no for characters and I have defined a type of animal-like mammal - for mammal applies that milk character must ...
1
vote
1answer
22 views
Can't reference inherited slot in a CLIPS message handler
I have an abstract class with one defined read-only slot named storage-size:
(defclass digital-media (is-a USER)
(role abstract)
(slot storage-size
(type INTEGER)
(default -1)
...
0
votes
1answer
33 views
What is bad in my CLIPS code - or/and varying or else-if grammatic?
This is my CLIPS code that I am going to connect with Java code.
When I am trying to load in WinCLIPS it is written as FALSE.
I think that the problem could be with or/and or if-else syntax.
(...
0
votes
1answer
26 views
How to create rules of divisibility in Clips?
I'm very new to Clips Expert System, I would like to know if some of you can help to implement rules of divisibility for numbers 7, 11 and 13.
This is what I used for divisibility of 2 but I can't do ...
1
vote
1answer
14 views
CLIPS using variable as a name of instance
can I use variable as a name of instance?
Example:
(make-instance [?input] (name)(age))
0
votes
1answer
42 views
Find all facts matching a condition in Defrule
I have two type of facts: state1 and state2, both are arrays of numbers. I want to check if a fact with tag 'state' with current value of state2 variable exists. How can I do it?
For example, if now ...
0
votes
1answer
38 views
User defined instances in CLIPS
Can anyone help me out please?We have an assignment and we're trying to create a recycling software which sorts trash (instance) according to it's attributes (both of which the user inputs using bind)....
0
votes
1answer
26 views
I'm looking on how can i split the facts inserted into a different brackets in CLIPS?
So here's my CLIPS code
CLIPS> (deftemplate animal
(slot name)
(slot favourite-food)
(slot habitat)
(slot main-prey)
(multislot predators)
(slot distinctive-features))
CLIPS> (deffacts animal
(...
0
votes
0answers
34 views
How to implement user-defined function (external function) in CLIPS
Trying to implement an external function in CLIPS, I followed the instructions provided in the apg.pdf document (Section 3: Integrating CLIPS with External Function). By reproducing the example in ...
0
votes
1answer
50 views
How to stop rule repeating activation on facts that have already been modified?
I have a rule I have made in CLIPS that deletes two values from a multislot field. Even though it does this, the rule repeats itself on the same facts that have now deleted the two values and this ...
0
votes
0answers
30 views
java.lang.NoSuchMethodError: No static method getPrimaryConstructor KLIPS library
I have that error from the class
class FatherOf constructor(val pers1: Facet<String>, val pers2: Facet<String>) : Fact()
I can't figure out why, because I have constructor.
My gradle:
...
0
votes
1answer
40 views
How can i use KLIPS (Kotlin Language Integrated Production System) for an Android App? [closed]
https://github.com/vjache/klips - (inspired by C Language Integrated Production System = CLIPS)
I tried to include this library to gradle like this:
implementation "org.klips:klips:1.0"
But ...
0
votes
0answers
36 views
CLIPS EnvAssertString API-function slow performance
I'm trying to develop an expert-system which is capable of managing a real-time data flow. During the coding procedure I found a delay in operation which varied from 3 to almost 20 milliseconds and ...
0
votes
1answer
28 views
CLIPS/clipspy Rule Order
So I'm trying to self-learn CLIPS and clipspy for a class assignment and I'm a bit stuck. The code below compiles and runs just fine but the output is a bit strange. I am trying to expand on examples ...
0
votes
1answer
53 views
Clips Expert System
I'm trying to create an expert system that decides whether or not you can buy a house. I want to know how to word a rule that allows the person to buy a house if they're over a certain age. For ...
2
votes
1answer
103 views
How to get a fact value in clipspy and store it in a python variable
Say I have inserted a rule :
(defrule matching
(fever ?fever)
(headache ?headache)
(disease (fever ?fever) (disname ?disname1) (headache ?headache))
=>
(assert (dis ?disname1)))
...
0
votes
2answers
88 views
Generating truth table in CLIPS
The problem is how to obtain alike binary truth table in CLIPS.
Suppose an ordered initial fact like:
(vector -1 -1 -1)
The expected result will be something like:
(vector 0 0 0 0)
(vector 0 0 0 1)
(...
1
vote
1answer
40 views
Clips empty error in ClipsPy when using make_instance
I am new to CLIPS and to clipsPy. I am trying to create a instance of a CLIPS class
This is the class I have defined and correctly build in my python environment (clipsPy)
ENTITIES_CLASS = ""...
0
votes
1answer
78 views
CLIPS system halted and not continuing to execute
I am integrating CLIPS expert system following APG docs, Thanks for the great docs, I am successful at integrating CLIPS to my C++ project, My Application runs continuously and feed the Facts to CLIPS ...
0
votes
1answer
33 views
Creating rules that aren't repetitive in CLIPS - Expert System
i am VERY new to CLIPS and trying to create an expert system for medical diagnosis. Of course it is just for practice. My code runs so far, however, there are a few things I couldn't get to work.
For ...
0
votes
1answer
20 views
How to get R7 through different choices in CLIPSIDE
(defrule unable-to-diagnose
(name ?name)
(age ?age)
(gender ?gender)
(temperature ?C)
(or
(or (high-fever-days ?days)
(and (vomiting no)
(...
0
votes
1answer
50 views
Displaying information from CLIPS in a windows form
printout displays information in CLIPS.What do you do so as to display that information in a windows form.
For example when a rule is activated the display that is to be done on the RHS is done on the ...
0
votes
1answer
29 views
CLIPS does not recognize deftemplate name
I am trying to retract a deftemplate fact but when I do this CLIPS keeps saying I have to first declare the deffunction yet it is the appropriate deftemplate.What seems to be the problem?
I have ...
0
votes
1answer
44 views
Test if a fact with a field value of a multifield exists in Clips
I have the following fact templates for a station and a train:
(deftemplate station
(slot name (type SYMBOL))
(slot status (type SYMBOL) (default open)))
(deftemplate train
(slot departs-...
0
votes
1answer
31 views
Inconsistency in extracting string representation of facts using clipspy
Just started to work with clipspy-0.3.3 in Python 3.8.3.
When extracting facts, an inconsistency was encountered in the .facts() enumerator.
The code below
import clips
env = clips.Environment()
env....
0
votes
0answers
41 views
How to use CLIPSNet
I am trying to integrate CLIPS with C#,I have tried adding a reference to CLIPSNet.dll in my project.But when I copy the CLIPSLib.dll to the bin folder and try to bulid the solution I get this error ...
0
votes
1answer
45 views
The switch function in clips
please ask about the "switch" function. I want to achieve the following functions:
(switch ?student
(case (stu1 or stu2 or stu3) then
-------)
(case stu4 then
------))
How to make ...
0
votes
1answer
64 views
Communicating with Clips rules engine in Python
I would like to communicate several times with Clips rule engine in Python 3.8.3.
For example, I would like to have the following communication
Launch Clips
C:\Users\username\Clips>"C:\...
0
votes
1answer
37 views
clipspy installing fatal error C1083: Cannot open include file: 'clips.h': No such file or directory
i'm trying to install clipspy on Python 3.8 but i get this error
fatal error C1083: Cannot open include file: 'clips.h': No such file or directory
i've tried installing previous versions of clipspy ...
0
votes
1answer
44 views
module 'clips' has no attribute 'SetExternalTraceback'
We tried running this code in python 2.7 with clips - v6.3, kivy- v1.11.1. The error we are getting is on line main(sys.argv) saying "Module clips has no attribute SetExternalTraceback". And ...
0
votes
0answers
44 views
How to succesfully use CLIPSNet
I am trying to integrate CLIPS with C#,I have tried adding a reference to CLIPSNet.dll in my project.But when I copy the CLIPSLib.dll to the bin folder and try to bulid the solution I get this error ...
0
votes
1answer
83 views
Clips rules - conditional firings of rules
I am trying to use rules for an agriculture based system
So for example,
based on location --> list crops --> based on crop selected --> select seed
This is a forward chaining problem
I am ...
0
votes
1answer
32 views
asserting string in clips
I am trying to assert the value of name into a variable but when i assert it the value is coming in quotes and also with an extra space at the end.
(defrule discount_amt_group
(exists (Student ...
0
votes
1answer
27 views
Cant implement function on Bind in CLIPS
(deffunction slabV10071 ( ?totalQuantity ?quantityBuilder )
(bind ?promoQuantities (integer (/ ?totalQuantity 6)))
if(>= ?totalQuantity 12) then
(assert(Output (promoId V10071)(...
0
votes
1answer
40 views
storing values in clips into variable
I am having a template of
(deftemplate Product
(slot productId (type INTEGER))
(slot uom (default EA))
(slot quantity (type INTEGER))
(slot amount))
I'm using the code for
(defrule sum_of_quantity
...
2
votes
1answer
52 views
CLIPS missing function declaration for template
I'm trying to write a program that asks the user for the name of the person whose birthday is today to update his age but I'm getting this error (Missing function declaration for data.)
(deftemplate ...
0
votes
1answer
34 views
break statement not working in function in clips
the break statement is not working in my code.
error : The break function not valid in this context.
(deffunction slabFunction (?q0 ?q1 ?q2)
(if(and(>= ?q0 36)(>= ?q1 36)(>= ?q2 36)) then
(...
0
votes
2answers
49 views
CLIPS: How to print special characters and letters like “ñ”?
I'm coding a spanish expert system, so I have to print words with letters "ñ" or "á,é,í" or "¿" and cannot figure it out yet, is there a way to do it?
1
vote
1answer
47 views
Call one rule from another in clips
I wanted to know if there is any possibility of firing a rule from the RHS of another rule.
for example,
rule 1:
(defrule printHello
=>
(printout t " Hello World" crlf ))
rule 2:
(...
0
votes
1answer
129 views
CLIPS: Array in CLIPS? (Need some orientation, new in CLIPS)
I'm new in Clips. I'd like to know if it is a way to read an array (chain of numeric or characters with an index, sorry if it's the wrong name) on LHS. I have rules to ask for a value (s,cs,cn,n) then ...
0
votes
1answer
36 views
How can I store a function, like < or >= as a value for evaluating it later, in CLIPS?
I'm new into CLIPS, and I'm forced to work strictly in heuristic (non procedural) paradigm. I'm trying to store a comparison function as a value in a similar way as I do in Python or in LISP, so I can ...
0
votes
0answers
21 views
Test CE doesn't activate my rule in CLIPS [duplicate]
I'm learning CLIPS so I'm sorry if this question might be stupid.
I don't know why the test() condition doesn't work on the LHS but If I put the same condition on the RHS it works.
These are the used ...