From 30ccf0d7da587c21a14929cd1b1285963686cbee Mon Sep 17 00:00:00 2001 From: someone Date: Tue, 5 Jun 2012 17:47:18 +0200 Subject: [PATCH] %s/charge_max/w_charge/g --- c.dl | 12 ++++++------ c.test1.dl | 5 +---- c.test2.dl | 5 +---- c.test3.dl | 5 +---- c.test4.dl | 5 +---- c.test5.dl | 5 +---- c.test6.dl | 5 +---- c.test7.dl | 5 +---- c.test8.dl | 5 +---- c.test9.dl | 5 +---- connect.dl | 2 +- psh.dl | 4 ++-- psh.test1.dl | 2 +- psh.test2.dl | 2 +- psh.test3.dl | 2 +- psh.test4.dl | 2 +- psh.test5.dl | 2 +- psh.test6.dl | 4 ++-- psh.test7.dl | 4 ++-- psh.test8.dl | 2 +- 20 files changed, 28 insertions(+), 55 deletions(-) diff --git a/c.dl b/c.dl index 2e0cf92..346087a 100644 --- a/c.dl +++ b/c.dl @@ -20,12 +20,12 @@ p(C,o4,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), c(C,i3,full), I p(C,o5,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), c(C,i3,full), Idem <= Icur, OP = 0, #int(OP). % charge psh (over max) -p(C,o1,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), charge_max(psh,IMAXpc), Idem <= Icur, OP = 0, #int(OP). -p(C,o2,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), charge_max(psh,IMAXpc), Idem <= Icur, OP = 0, #int(OP). -p(C,o3,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), charge_max(psh,IMAXpc), Idem <= Icur, OP = 0, #int(OP). -p(C,o4,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), charge_max(psh,IMAXpc), Idem <= Icur, OP = 2, #int(OP). -p(C,o5,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), charge_max(psh,IMAXpc), Idem <= Icur, Tava = Icur - Idem, Tava <= IMAXpc, OP = Tava, #int(OP). -p(C,o5,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), charge_max(psh,IMAXpc), Idem <= Icur, Tava = Icur - Idem, Tava > IMAXpc, OP = IMAXpc, #int(OP). +p(C,o1,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), w_charge(psh,IMAXpc), Idem <= Icur, OP = 0, #int(OP). +p(C,o2,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), w_charge(psh,IMAXpc), Idem <= Icur, OP = 0, #int(OP). +p(C,o3,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), w_charge(psh,IMAXpc), Idem <= Icur, OP = 0, #int(OP). +p(C,o4,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), w_charge(psh,IMAXpc), Idem <= Icur, OP = 2, #int(OP). +p(C,o5,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), w_charge(psh,IMAXpc), Idem <= Icur, Tava = Icur - Idem, Tava <= IMAXpc, OP = Tava, #int(OP). +p(C,o5,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), not c(C,i3,full), w_charge(psh,IMAXpc), Idem <= Icur, Tava = Icur - Idem, Tava > IMAXpc, OP = IMAXpc, #int(OP). % Produce energy. p(C,o4,OP) :- not ab(C), control(C), c(C,i1,Icur), c(C,i2,Idem), Idem > Icur, OP = 1, #int(OP). diff --git a/c.test1.dl b/c.test1.dl index ea7e078..3875fc6 100644 --- a/c.test1.dl +++ b/c.test1.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not empty. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test2.dl b/c.test2.dl index a02556c..811796e 100644 --- a/c.test2.dl +++ b/c.test2.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not empty. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test3.dl b/c.test3.dl index f64af1c..4c0364f 100644 --- a/c.test3.dl +++ b/c.test3.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not empty. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test4.dl b/c.test4.dl index b5ba2d5..b426c50 100644 --- a/c.test4.dl +++ b/c.test4.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not empty. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values: min + max wind hardcoded (5-40) -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test5.dl b/c.test5.dl index fbe33c2..fc5847c 100644 --- a/c.test5.dl +++ b/c.test5.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not empty. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values: min + max wind hardcoded (5-40) -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test6.dl b/c.test6.dl index a55030b..1fa758b 100644 --- a/c.test6.dl +++ b/c.test6.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not half_full. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values: min + max wind hardcoded (5-40) -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test7.dl b/c.test7.dl index 78c2f53..4d63090 100644 --- a/c.test7.dl +++ b/c.test7.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not half_full. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values: min + max wind hardcoded (5-40) -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test8.dl b/c.test8.dl index b40bf94..437bc54 100644 --- a/c.test8.dl +++ b/c.test8.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not half_full. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values: min + max wind hardcoded (5-40) -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/c.test9.dl b/c.test9.dl index fd140cd..19035c3 100644 --- a/c.test9.dl +++ b/c.test9.dl @@ -7,11 +7,8 @@ % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not empty. % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40. -% our plant's types -caloric_plant(f). windmill(w). storage_plant(psh). - % our plant's max values -c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30). +c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(psh,30). control(c). diff --git a/connect.dl b/connect.dl index 306f25d..0319b7a 100644 --- a/connect.dl +++ b/connect.dl @@ -10,6 +10,6 @@ storage_plant(psh). c_max(f,60). c_max(w,15). c_max(psh,20). -charge_max(psh,30). +w_charge(psh,30). diff --git a/psh.dl b/psh.dl index 20f73a3..03160d2 100644 --- a/psh.dl +++ b/psh.dl @@ -16,10 +16,10 @@ p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,0), c(C,i2,0), OP = 0, #int(OP p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,charge), c(C,i2,I2), c(C,is,full), OP = I2, #int(OP). % over MAX 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 = I2 - CMAX, #int(OP). +p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,charge), c(C,i2,I2), w_charge(C,CMAX), not c(C,is,full), I2 > CMAX, OP = I2 - CMAX, #int(OP). % 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,charge), c(C,i2,I2), w_charge(C,CMAX), not c(C,is,full), I2 <= CMAX, OP = 0, #int(OP). % normal discharge but empty % not charge but powered charger input diff --git a/psh.test1.dl b/psh.test1.dl index a7b5352..267a4f9 100644 --- a/psh.test1.dl +++ b/psh.test1.dl @@ -9,7 +9,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to 5KW (we request 5KW) c(psh,i1,5). diff --git a/psh.test2.dl b/psh.test2.dl index cca183a..5df56fe 100644 --- a/psh.test2.dl +++ b/psh.test2.dl @@ -9,7 +9,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to 25KW (we request 25KW) c(psh,i1,25). diff --git a/psh.test3.dl b/psh.test3.dl index 9477df8..8f15cad 100644 --- a/psh.test3.dl +++ b/psh.test3.dl @@ -8,7 +8,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to 0KW (we request 0KW) c(psh,i1,0). diff --git a/psh.test4.dl b/psh.test4.dl index 087f807..b56d6f8 100644 --- a/psh.test4.dl +++ b/psh.test4.dl @@ -8,7 +8,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to 5KW c(psh,i1,5). diff --git a/psh.test5.dl b/psh.test5.dl index 67d74b1..0020c54 100644 --- a/psh.test5.dl +++ b/psh.test5.dl @@ -8,7 +8,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to charge c(psh,i1,charge). diff --git a/psh.test6.dl b/psh.test6.dl index 42f0bc9..ce884f5 100644 --- a/psh.test6.dl +++ b/psh.test6.dl @@ -1,6 +1,6 @@ % testing a pumpspeicherkraftwerk % over MAX charge -% In case i1 = charge, its storages are not full (is not full), and it receives energy (i2 > charge_max), it redirects the excessive energy back to the switching station, so op = i2 - charge_max. +% In case i1 = charge, its storages are not full (is not full), and it receives energy (i2 > w_charge), it redirects the excessive energy back to the switching station, so op = i2 - w_charge. storage_plant(psh). @@ -8,7 +8,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to charge c(psh,i1,charge). diff --git a/psh.test7.dl b/psh.test7.dl index 2bfe27d..71278b1 100644 --- a/psh.test7.dl +++ b/psh.test7.dl @@ -1,6 +1,6 @@ % testing a pumpspeicherkraftwerk % charge -% In case it holds that i1 = charge, its storages are not full (is not full), and it receives energy (charge_max > i2 > 0), it does not produce energy and therefore op = 0. +% In case it holds that i1 = charge, its storages are not full (is not full), and it receives energy (w_charge > i2 > 0), it does not produce energy and therefore op = 0. storage_plant(psh). @@ -8,7 +8,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to charge c(psh,i1,charge). diff --git a/psh.test8.dl b/psh.test8.dl index fbbe336..8733161 100644 --- a/psh.test8.dl +++ b/psh.test8.dl @@ -9,7 +9,7 @@ storage_plant(psh). c_max(psh,20). % define max charging power -charge_max(psh,30). +w_charge(psh,30). % define control i1 to 5KW (we request 5KW) c(psh,i1,5). -- 2.43.0