problem in sliding window
by Sandhya Sree
hi,
i have a rule file as follows:
declare Event
@role( event )
end
declare window Ticks
Event()
over window:time(1m )
end
rule "More than 5 file added events"
when
$p: RuleContext()
Number(intValue > 4) from
accumulate( $e :Event (name == "new file added") from window Ticks,
count($e) )
then
Event event = new Event("too many files added last
minute",$p.getOldContext().getParent(),new
Date());
event.display();
end
this rule gets fired only if i add more than 4 files all at once..
say if i add first 2 files within the first 10 seconds, next two files
after the 20th second and next two files after 40th second, this rule is
not getting fired.. ( there are 6 file added events in the window over past
1 min and the rule should have got fired ). what is the problem with the
current rules and how can i modify it to meet my requirement?
Thanks.
11 years, 10 months
physical resource allocation problem
by Scott Danner
Hello,
We have a resource allocation problem. Could this be solved with
OptaPlanner?
Here it is:
There are N projects located in various places that need work done with
machines (just one machine type for all machine work).
Work can be parallelized, e.g. 6 work days can be done in 6 calendar days
by one machine or in 3 calendar days by two, or in 4 calendar days by 2
machines (one works 4, other 2).
How to best allocate machines to projects?
Looking at planned project work, how many machines are needed for each
calendar day? How many machines should we buy, and how many to rent, and
when?
Details
For each project, the work can & must be done only in some selected
calendar periods.
Machine locations are always known.
Machine costs:
* moving from location A to location B (per km). Moving also takes time,
and a machine can be moved a maximum amount of km per day.
* operating (per day)
* staying in a project location (per day)
* staying in a hangar (per day)
* being rented for one day from location L (total cost = transport from
rent location to project location and back, and daily rent)
* being purchased
A machine also needs an operator, but for now that can be considered a
single unit.
Ideally, also take into accounting weather for each project location.
Weather might be known with 2 weeks in advance. Just re-plan by blocking
the rainy days for some projects?
Thanks,
Scott
11 years, 10 months
Reloading DRL files from a web interface + incoming requests
by Julius
Hello. I am new to Drools and have seen similar questions to mine, but I need
some more detail and would love to see some insight from a Drools pro for
our particular scenario :-)
We are testing Drools as part of our web application backend. We want Drools
to make some decisions based on a number (let's say 10) parameters we find
in the incoming HttpRequest.
Also, we are building a web admin interface that allows users to make
changes to the Drools files that contain the business logic. We created a
simple interface that allows users to create filtering rules. We store those
rules in the database (field, operator, compare_against_vales, etc).
Every time a user makes a change to a rule in the web admin interface (add
rule, delete rule, add condition, delete condition, update condition, etc)
the DRL file(s) must be regenerated and re-fed to Drools.
I have a couple of questions about this:
1. How do we reload DRL files in the most efficient way? (A small code
sample or a link would be great)
2. Could we create multiple small DRL files instead of one big one and would
we get better performance when we only reload the (small) changed files into
Drools as opposed to putting everything in one file and regenerating and
reloading that?
3. Do we run the risk of Drools being "busy" with reloading DRLs while we
have new Drools jobs (HttpRequests) waiting and what would happen, would we
suffer a delay or do we run the risk of Drools being "unavailable"?
The app is business critical. It doesn't have a super high load at the
moment, but load could grow in the future and we want to plan for the worst:
- a user in the web admin makes a number of changes to conditions and
submits those, so we have to reload DRLs
- at the exact same moment 5 incoming requests need to be evaluated by
Drools
4. Can Drools manage this worst case scenario?
Thanks very much for your time.
--
View this message in context: http://drools.46999.n3.nabble.com/Reloading-DRL-files-from-a-web-interfac...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
KnowledgeAgent, when to stop notifier/scanner services?
by Peach Wyss
Hy all
I have seen a few references warning that the change notifier and
change scanner services must be stopped or a memory leak can occur, but
where would I stop them?
The knowledge base needs to "live on" and be updated as new knowledge sessions are created from it. So the
only place I would be stopping these services and disposing of the knowledge agent, would be when the server is restarted. Is this
incorrect? If so, *when* would be an appropriate time to stop these
services?
Thanks for your help.
Kind regards,
Peter
11 years, 10 months
Broken KIE-WB binary for Tomcat 7
by Sandjaja, Dominik
Hello,
I just tried to install the KIE-Workbench on Tomcat 7 out of the downloaded file kie-drools-wb-distribution-6.0.1.Final.zip with authentication.
It turns out that obviously the web.xml inside the WAR in binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war is wrong. It is missing some elements which have to do with authentication so that the whole installation process, described in the README.txt does not work.
In 6.1.0.Beta1, that problem is fixed.
On the other hand, the kie-tomcat-integration-6.1.0.Beta1.jar seems to be broken, at least I can't start my tomcat with that one in the lib folder. This problem can be circumvented by using kie-tomcat-integration-6.0.1.Final.jar instead, that one works.
In total: Only the .war from 6.1.0.Beta1 together with kie-tomcat-integration from 6.0.1.Final is a working combination on a Tomcat 7.0.26.
That seems a bit sad, given that this combination should not be the most uncommon one (running KIE-WB on Tomcat). You guys are making it really hard to switch to Drools 6 ...
Regards
Dominik
…………………………………………………………………
mit freundlichen Grüßen / kind regards
Dominik Sandjaja
Fon: +49 (0) 203 60878 183
Fax: +49 (0) 203 60878 222
e-mail: dominik.sandjaja(a)it-motive.de
it-motive AG
Zum Walkmüller 6
47269 Duisburg
info(a)it-motive.de
http://www.it-motive.de
……………………………………………………………………
Vorsitzender des Aufsichtsrats: Dr.-Ing. Jürgen Sturm
Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim Klose
HRB 9207, Amtsgericht Duisburg
11 years, 10 months
Restore a guvnor installation from db
by maruthir
Hi All, I have lost a guvnor installation with a lot of rules in it. All I
have now is the exported binary package and the database. Installation and
repository folders are gone. Is there a way to recover my setup? I can see
the rules in the database in some encoded form. Pls help.. this data many
many days of work.
I tried pointing the repository xml to this database but I dont see the
rules in the UI.
thanks,
MJ
--
View this message in context: http://drools.46999.n3.nabble.com/Restore-a-guvnor-installation-from-db-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
function in guided decision table
by Ioannis Christodoulou
Hello everyone.
I'm using the latest kie workbench and I have created a guided decision
table.
I want to create a function and call it from an action of the guided
decision table.
The problem is that I cannot find a way to declare the function and make it
visible from the guided
decision table. I have tried declaring it in a drl file, as well as in a
dsl definition without success (the error is that drools cannot analyze the
function call expression).
Has anyone solved this issue before?
Kind regards.
11 years, 10 months
(no subject)
by Sandhya Sree
hi,
i have the following rule file :
rule "size"
when
$p: RuleContext($size: getOldContext().getParent().getUsableSpace() >
(30*1024*1024))
then
Event event = new Event("folder almost full",
$p.getOldContext().getParent(), new Date());
event.display();
end
im loading this rule file and executing the rules once in 10 seconds in a
continuous loop from my java class. assuming the when part is always true,
the event object created gets displayed each and every time once in 10
seconds. i want to create the object only once with the fact that the event
is already there.. i.e. i dont want to create the object again if it is
already created.. how can i do that?
Thanks.
11 years, 10 months