Re: [rules-users] Optaplanner rule to assign employee only to shift when he/she has the skills

2013-11-26 Thread ns
Does anyone know why Optaplanner plans all employees, instead of only the
employees with the necessary skills? Thank you.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-rule-to-assign-employee-only-to-shift-when-he-she-has-the-skills-tp4026879p4026940.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Optaplanner rule to assign employee only to shift when he/she has the skills

2013-11-26 Thread Geoffrey De Smet
If you copied the employee rostering example, you can click on the 
shifts to assign them to another employee.

Before you do that, write down the score.
Then use the trick above the reassign the shifts as you believe it's better.
Now write down the score again.
Is the score better?

On 26-11-13 09:29, ns wrote:
 Does anyone know why Optaplanner plans all employees, instead of only the
 employees with the necessary skills? Thank you.



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Optaplanner-rule-to-assign-employee-only-to-shift-when-he-she-has-the-skills-tp4026879p4026940.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.5.0 - Execution Performance

2013-11-26 Thread ch3xy
Thanks for your fast reply ...

I did not retract the facts after each cycle, I inserted the facts within
the loop and fired rules afterwards ... but i repeated the test with fireing
rules and retract facts for each cycle - the effect is the same ... the
elapsed time is nearly the same (about 2 sec for 600 facts) and it gets
faster after the first loop cycle

Working memory was in Identity mode (which is default) but I also tried with
equality ... same result
I changed mode this way:

RuleBaseConfiguration ruleBaseConfiguration = new RuleBaseConfiguration();
ruleBaseConfiguration.setAssertBehaviour(RuleBaseConfiguration.AssertBehaviour.IDENTITY);

should be correct or am i wrong?

BatchExecution resulted in about 2 sec total time as well ... so it seems
there is no difference ...


It would be great if the rule engine somehow learns over time and assertion
gets faster but I am still not sure whether this is because asserting same
instances of facts



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp4026936p4026942.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Optaplanner rule to assign employee only to shift when he/she has the skills

2013-11-26 Thread ns
I have based my code on the nurse rostering example. But I have completely
stripped out the GUI part.

But I have found the error. My rule was wrong. A rule that works for me is:

rule alternativeSkill
when
ShiftAssignment($employee : employee, $shiftType : shiftType)
not SkillProficiency(employee == $employee, shiftType == $shiftType)
then
scoreHolder.addHardConstraintMatch(kcontext, -1);
end



--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-rule-to-assign-employee-only-to-shift-when-he-she-has-the-skills-tp4026879p4026943.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] What is URL for Guvnor REST API in 6.0.0-Final?

2013-11-26 Thread SrjTx
GREAT!  Thanks!



--
View this message in context: 
http://drools.46999.n3.nabble.com/What-is-URL-for-Guvnor-REST-API-in-6-0-0-Final-tp4026926p4026944.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.5.0 - Execution Performance

2013-11-26 Thread Mark Proctor
Are creating a new ksession for each batch of insertions? Or using the same 
one? If the same one, are you deleting them after insertion?

And as per wolfgang’s message, JIT might have a big impact for this.



Mark
On 25 Nov 2013, at 22:50, ch3xy igor.stri...@gmail.com wrote:

 Hello, 
 
 first of all I'd like to mention that i am pretty new to Drools, so please
 be patient :-) 
 We are using Drools 5.5.0. we have a knowledgeBase of about 500 rules and a
 pretty complex object structure. So far everything is working fine … at the
 moment we are testing the performance of the engine and we encountered a
 quite strange  thing. We generated about 10 objects, inserted it into the
 session and measured time needed for execution of rules. To simulate a high
 number of facts, we inserted the same objects over and over again (100x,
 1000x, 1x). When the first objects were inserted, the time of execution
 was about 100ms but for each iteration the execution got faster and faster
 (20ms, 10ms and later on even 1ms) .. 
 
 Now my question: Are the objects somehow cached in the working memory, so
 that execution gets faster or does this increase of performance has an other
 reason? I read a few things about shadow facts which are not present anymore
 since Drools 5 and sync and async Rete and I think this could be a potential
 answer for my question, but I am not able to understand this completely. For
 me it is important to know whether the increase of performance is only due
 to the fact that we are inserting the same facts over and over again or if a
 significant increase of performance is still possible if facts are not
 identical? 
 
 Can someone help me? 
 
 Thanks in advance
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp4026936.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Jetty NoSuchMethodError Lorg/eclipse/jdt/core/compiler/CategorizedProblem

2013-11-26 Thread captainrhino

I am running some drools application code through Jetty and I get the
following error.  I'm guessing its something to do with a conflicting jar or
dependency?  Any help would be much appreciated.  It does not happen when I
run it through tomcat 7.

java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;
at
org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(EclipseJavaCompiler.java:375)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)
at
org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:405)
at
org.drools.compiler.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at
org.drools.compiler.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:405)
at
org.drools.compiler.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at
org.drools.compiler.compiler.PackageRegistry.compileAll(PackageRegistry.java:107)
at
org.drools.compiler.compiler.PackageBuilder.compileAll(PackageBuilder.java:1218)
at
org.drools.compiler.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:955)
at
org.drools.compiler.compiler.PackageBuilder.addPackage(PackageBuilder.java:943)
at
org.drools.compiler.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:507)
at
org.drools.compiler.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:714)
at
org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at
org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)



--
View this message in context: 
http://drools.46999.n3.nabble.com/Jetty-NoSuchMethodError-Lorg-eclipse-jdt-core-compiler-CategorizedProblem-tp4026946.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Jetty NoSuchMethodError Lorg/eclipse/jdt/core/compiler/CategorizedProblem

2013-11-26 Thread Steven Williams
I noticed this same error when attempting to use the Run Jetty Run eclipse
plugin with Jetty 6.1.26. Changing it to use Jetty 7.5.1 fixed the problem.
We still use version 6 on our test servers without a problem though so I
just put it down to some classpath issue with the plug-in.

---
Steven Williams



On Wed, Nov 27, 2013 at 3:01 AM, captainrhino 
graeme.kitc...@axa-travel-insurance.com wrote:


 I am running some drools application code through Jetty and I get the
 following error.  I'm guessing its something to do with a conflicting jar
 or
 dependency?  Any help would be much appreciated.  It does not happen when I
 run it through tomcat 7.

 java.lang.NoSuchMethodError:

 org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;
 at

 org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(EclipseJavaCompiler.java:375)
 at
 org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)
 at

 org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:405)
 at

 org.drools.compiler.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
 at

 org.drools.compiler.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:405)
 at

 org.drools.compiler.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
 at

 org.drools.compiler.compiler.PackageRegistry.compileAll(PackageRegistry.java:107)
 at

 org.drools.compiler.compiler.PackageBuilder.compileAll(PackageBuilder.java:1218)
 at

 org.drools.compiler.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:955)
 at

 org.drools.compiler.compiler.PackageBuilder.addPackage(PackageBuilder.java:943)
 at

 org.drools.compiler.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:507)
 at

 org.drools.compiler.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:714)
 at

 org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
 at

 org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Jetty-NoSuchMethodError-Lorg-eclipse-jdt-core-compiler-CategorizedProblem-tp4026946.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] CurriculumCourse - extending for multiple teachers per course

2013-11-26 Thread clients
Thanks, that was it. After digging around a bit I was able to get it working.

Appreciate the help!



--
View this message in context: 
http://drools.46999.n3.nabble.com/CurriculumCourse-extending-for-multiple-teachers-per-course-tp4026896p4026948.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Multiple rule violation

2013-11-26 Thread Chaturvedi Dewashish
Hi,

 

I have a problem scenario.

 

I insert two facts 

- obj1 (on which rules needs to be validated, used in when part), 

- obj2 (to retrieve output, used in then part)

 

Let's say there are two rules Rule1 and Rule2 for this fact type and both of
them get violated. In this case I am getting only one instance of updated
obj2.

I need two instances of obj2 as both rules are violated. So, that I can
perform operation on based on those.

 

I have also seen on internet that DROOLS skips checking for other rules if
any one gets violated. So, requirement is as 

1. DROOLS should check for all rules (What is performance cost for this.
Does fire all rules work this way?)

2. All instances of obj2 to perform actions accordingly (What is best way to
do this. Should I insert an array of this type? If so please, say how to
achieve this?)

 

 

Thanks and regards,

Chaturvedi Dewashish

Nirvana Solutions

Cell: +91-8373915350

 

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users