Drools scalability in home automation scenarios
by riri
Hy everyone,
I have recently decided to use Drools in my project and being a newbie I
would greatly appreciate some input. The idea is to have a web application
that simulates home automation using rules. The user could define the
configuration of his home environment (based on virtual representation of
sensors and actuators), specify rules and execute them to see how the
configuration and the rules work together.
Seeing that I have very little experience with Drools I would like to know
how drools expert would perform if you should have 100 or more users using
the web app concurrently. In some other posts they suggest creating sessions
for each user in the knowledge base but the rules would not be the same for
each house so the knowledge base would essentially need to be different.
Should a new instance of a knowledge base be created for each user? Is there
a different way to do this since creating a knowledge base is supposed to be
"expensive"?
Sorry for the long post but I meant to give some context to the question
that could maybe help the experts. If anyone has had experience with such a
thing or can give me links to useful material it would be really helpful.
Regards
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-scalability-in-home-automation-s...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years
lock-on-active clarification needed
by Esteban Aliverti
Hi all,
I'm dealing with a set of rules having the lock-on-active attribute and I'm
not getting the (at least what I understand as) expected results.
I've created an isolated JUnit test. I'm attaching it to this email.
Basically, I have 2 rules:
rule "init"
lock-on-active true
when
$d: DataSample()
then
System.out.println("Setting predefined value");
modify($d){
addValue(Parameter.PARAM_A, 10.0)
}
end
rule "Rule 1"
lock-on-active true
when
DataSample($v: values[Parameter.PARAM_A] < 20)
then
System.out.println("Rule 1: "+$v);
end
DataSample is a Java class containing a Map<Parameter, Double> where
Parameter is an enum.
In the test I'm creating a ksession and inserting an empty DataSample
object.
I understand that as soon as the object is inserted, both rules are
evaluated and the result is going to be an activation of rule "init"; and
this is what is actually happening. So far so good.
Now, after I call fireAllRules() I expect that 'Rule 1' becomes active
because of the modification of the fact in "init". Well, this is not the
case. I don't see any activation for "Rule 1".
My understanding about lock-on-active is that a rule that WAS ACTIVATED is
not going to be re-activated until the current agenda group is switched.
The odd thing here is that I never had an activation for "Rule 1" so I
don't see why it activation after "init" is executed should be prevented.
So my question is: Is my understanding wrong? What is the expected behavior
of lock-on-active in this situation? I read the documentation but I
couldn't get any hint:
"
Whenever a ruleflow-group becomes active or an agenda-group receives the
focus, any rule within that group that has lock-on-active set to true* will
not be activated any more*; irrespective of the origin of the update, the
activation of a matching rule is discarded. This is a stronger version of
no-loop, because the change could now be caused not only by the rule
itself. It's ideal for calculation rules where you have a number of rules
that modify a fact and you don't want any rule re-matching and firing
again. Only when the ruleflow-group is no longer active or the agenda-group
loses the focus those rules with lock-on-active set to true become eligible
again for their activations to be placed onto the agenda."
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com
12 years
Drools Planner: Linear programming with drools?
by oliver.rolle
Hi,
I am writing a paper about route optimizations for fire trucks through
influencing the traffic control system. The idea is to give fire trucks a
green wave under the restriction of the flow of traffic.
I want to compare the solutions of different methods for the problem:
1. Linear programming / Simplex: best solution
2. Heuristic / Drools: good solution
3. Real-time / Drools: good solution
The simplex algorithm is not implemented in Drools. Can Drools emulate the
simplex algorithm? Does Drools metaheuristic approach solve linear models as
good as simplex does? always?
best regards
Oli
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Linear-programming-with-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years
unsubscribe
by Mahadevappa, Shobha
Regards,
Shobha M | Senior Program Manager, A&AD | NTT DATA Global Delivery Services Limited| w. +91-80-26659482 (Ext 3679) | v. 8814.3679 | m. +91.9972522743 | shobha.mahadevappa(a)nttdata.com<mailto:shobha.mahadevappa@nttdata.com>
______________________________________________________________________
Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding
12 years
Custom Form with DSL
by bhochhi
I were able to launch the custom form in DSL, however the rule condition is
not mapped to corresponding DRL. I don't know if this is a bug or just
something is missing. my DSL mapping looks like this:
[when]
my dsl is "{varName:CF:MyFactType.fieldName}" =
System.out.println("{varName}")
I have working set created then configured custom form for fieldName. All
things working but rule is not validating. When I check drl source, I found
the mapping is not taking place, its still displaying DSL expression in DRL
source instead of displaying:
System.out.println("values from cf")
Any ideas? I have tried this in guvnor 5.4.0.final and 5.5.beta1
--
View this message in context: http://drools.46999.n3.nabble.com/Custom-Form-with-DSL-tp4020207.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years
Error messages are not like the ones described in documentation
by Magnus Vojbacke
MY DROOLS BINARIES VERSIONS:
drools-clips-5.4.0.Final.jar
drools-compiler-5.4.0.Final.jar
drools-core-5.4.0.Final.jar
drools-decisiontables-5.4.0.Final.jar
droolsjbpm-introduction-docs-5.4.0.Final.jdocbook
drools-jsr94-5.4.0.Final.jar
drools-persistence-jpa-5.4.0.Final.jar
drools-templates-5.4.0.Final.jar
drools-verifier-5.4.0.Final.jar
BACKGROUND:
I'm embedding drools in an application.
To test the error handling, I'm trying to import a type that doesn't exist:
import does.not.exist;
When I print out the error messages from KnowledgeBuilder.getErrorMessages() they all look similar to this:
Error importing : 'does.not.exist'
Rule Compilation error : [Rule name='Telnet']
defaultpkg/Rule_Telnet_cdef8401dd054fb59abb4e33b76d12f7.java (2:74) : Only a type can be imported. does.not.exist resolves to a package
I have looked at section 4 - "Error messages" in the drools expert documentation - http://docs.jboss.org/drools/release/5.4.0.Final/drools-expert-docs/html_... to find a description of error messages.
MY QUESTION:
There is an error message format described in the drools expert documentation:
" 1st Block: This area identifies the error code.
2nd Block: Line and column information.
3rd Block: Some text describing the problem.
4th Block: This is the first context. Usually indicates the rule, function, template or query where the error occurred. This block is not mandatory.
5th Block: Identifies the pattern where the error occurred. This block is not mandatory."
Why is my error message not formatted like the documentation describes?
12 years
Creating own UI to translate rules in Drools
by benq2188
Hello,
I want to design UI which suggests options to the user for adding,modifying
and deleting rules. Within drools final 5.4.0 version, writing rules in xml
format is depreciated, so I thought to save user input data as rules inside
a .drl file with our own translation from UI. Seems it will take time, we
need to consider creating rules either first degree or n-degree(several
conditions and actions for each rule).
Can anyone suggest a way to deal with it?
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Creating-own-UI-to-translate-rules-in-D...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years
Re: [rules-users] Few Questions About using Drools
by benq2188
Hello, wondering that have you found any solution for your requirements?
I want to design UI which suggests options to the user for adding,modifying
and deleting rules. Within drools final 5.4.0 version, writing rules in xml
format is depreciated, so I thought to save user input data as rules inside
a .drl file with our own translation from UI. Seems it will take time, we
need to consider creating rules either first degree or n-degree(several
conditions and actions for each rule).
Any solutions to deal with it?
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Few-Questions-About-using-Drools-tp3007...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years