Failed to load file 'test.clp'

Dec 18, 2011 at 11:49 AM
Edited Dec 18, 2011 at 11:54 AM

Hi,

I'm trying to integrate CLIPS with visual studio and I have problem with load function. I do everything same that you in your project.

 private Mommosoft.ExpertSystem.Environment srodowisko; 
        
 
        public Nowa()
        {
            srodowisko = new Mommosoft.ExpertSystem.Environment();
            
            srodowisko.Load("test.clp");
            srodowisko.Reset();

When I'm debugging project always throw exception (Failed to load file 'test.clp'.).
What am I do wrong?

Coordinator
Dec 18, 2011 at 6:43 PM
If you send me the test project, I can check it.

Try with full path to the file.

Regards
Mihail


On Dec 18, 2011, at 1:49 PM, Vezyr wrote:

From: Vezyr

Hi,

I'm trying to integrate CLIPS with visual studio and I have problem with load function. I do everything that same that you in your project.

 private Mommosoft.ExpertSystem.Environment srodowisko; 
        
 
        public Nowa()
        {
            srodowisko = new Mommosoft.ExpertSystem.Environment();
            
            srodowisko.Load("test.clp");
            srodowisko.Reset();

When I debugging project always throw exception (Failed to load file 'test.clp'.).
What am I do wrong?


Dec 18, 2011 at 7:50 PM
Edited Dec 18, 2011 at 7:50 PM

Thanks you very much for help. Full path is working.

 

Regards,

Vezyr

May 17, 2013 at 10:32 AM
Edited May 17, 2013 at 11:13 AM
I have the same problem, I tried to load my file from the samples but it failed! Is there any properties for the clp file which I want to load?
Here is some of the file:
(deftemplate temperature
0 50
(
(cold (Z 0 20))
(cool (pi 5 20))
(hot (pi 5 25))
(veryhot(S 25 40))
)
)

(deftemplate humidity
0 100
(
(dry (0 1) (30 0))
(comfortable (20 0) (35 1) (50 0) )
(humid (40 0)(55 1) (70 0))
(sticky(60 0)(100 1))
)
)

(deftemplate speed
0 100
(
(off (0 1) (0 0) (100 0))
(low (30 0) (45 1) (60 0) )
(medium (50 0)(65 1) (80 0))
(fast(70 0)(90 1))
)
)

(defrule rule1
(temperature cold ) (humidty dry ) => (assert (speed off ))
)

(defrule rule2
(temperature cold ) (humidty comfortable ) => (assert (speed off ))
)
(defrule rule3
(temperature cold ) (humidty humid ) => (assert (speed off ))
)

(defrule rule4
(temperature cold ) (humidty sticky ) => (assert (speed low ))
)

(defrule start-rule
    (declare (salience 100))
=>
    (printout t "Enter Temperature: cold, cool, hot, very-hot: ")
      (bind ?temp (read))
    (assert-string (format nil "(temperature %s)" ?temp))
    (printout t "Enter Humidity: dry, comfortable, humid, sticky: ")
      (bind ?humid (read))
    (assert-string (format nil "(humidty %s)" ?humid))
)

(defrule speed-defuzzifcation
(declare (salience -1))
    ?s <- (speed ?)
=>
      (bind ?d (maximum-defuzzify ?s)) ;or moment-defuzzify
     (printout t "compressor speed is :  " ?d   crlf))
Coordinator
May 17, 2013 at 8:19 PM
What error you get?
May 17, 2013 at 8:40 PM
I had the same Exception
(Failed to load file 'xxx.clp'.)
May 29, 2013 at 7:08 PM
I tried using the full path but it stil tells me failed to load. HELP!!?? :(