From 8df3209cb0b1cebefb827515d6527cd29f413a30 Mon Sep 17 00:00:00 2001 From: someone Date: Tue, 5 Jun 2012 01:02:48 +0200 Subject: [PATCH] psh updates --- psh.dl | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/psh.dl b/psh.dl index 3dcc43e..20f73a3 100644 --- a/psh.dl +++ b/psh.dl @@ -21,17 +21,7 @@ p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,charge), c(C,i2,I2), charge_ma % charge p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,charge), c(C,i2,I2), charge_max(C,CMAX), not c(C,is,full), I2 <= CMAX, OP = 0, #int(OP). - - -%p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,0), c(C,i2,I2),OP = I2, #int(OP). -%p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), c(C,i2,I2),c_max(C,MAX), I1 > 0, MAX >= I1, OP = I1 + I2, #int(OP). - -%psh_empty(C) :- storage_plant(C), -c(C,is,full), -c(C,is,half_full). -%psh_not_full(C) :- storage_plant(C), c(C,is,empty) | c(C,is,half_full). - -%p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), c(C,i2,I2),OP = I1 + I2. -%p(C,op,OP) :- not ab(C), storage_plant(C), c(C,iw,IW), IW > 40, OP = 0. -%p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), psh_empty(C), I1 == 0, OP = 0. - - +% normal discharge but empty +% not charge but powered charger input +p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i2,I2), c(C,is,empty), not c(C,i1,charge), OP = I2, #int(OP). -- 2.43.0