[rules-users] Examination drools-planner example

2012-09-20 Thread kostis
Hello,

Is there any guidance about the domain model of the examination example?
The class InstitutionalWeighting has some properties that I cannot undestand
the purpose of them

Thank you



--
View this message in context: 
http://drools.46999.n3.nabble.com/Examination-drools-planner-example-tp4019859.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] Examination drools-planner example

2012-09-20 Thread Geoffrey De Smet

  
  

Op 20-09-12 08:06, kostis schreef:


  Hello,

Is there any guidance about the domain model of the examination example?

The examination example has a problem description, problem size and
domain model documentation:

http://docs.jboss.org/drools/release/5.4.0.Final/drools-planner-docs/html_single/index.html#d0e1267
It even includes a class diagram of the model

  
The class InstitutionalWeighting has some properties that I cannot undestand
the purpose of them

InstitutionalWeighting is basically a set of parameters of a single
dataset to dynamically configure when the constraints active and how
big their penalty is.

For example: if periodSpreadLength = 5, than students want to have 5
free periods between 2 exams.
Some universities use periodSpreadLength = 5, others
periodSpreadLength = 3, etc, but they all use the same drl file (in
the current implementation).


// Exams which share students have to few periods between them
rule "periodSpread"
 when
 $institutionalWeighting :
InstitutionalWeighting(periodSpreadPenalty != 0)
 $topicConflict : TopicConflict($leftTopic : leftTopic,
$rightTopic : rightTopic)
 $leftExam : Exam(topic == $leftTopic, $leftPeriod : period)
 $rightExam : Exam(topic == $rightTopic, $rightPeriod :
period)
 eval(Math.abs($leftPeriod.getPeriodIndex() -
$rightPeriod.getPeriodIndex())
  ($institutionalWeighting.getPeriodSpreadLength()
+ 1))
 then
 insertLogical(new IntConstraintOccurrence("periodSpread",
ConstraintType.NEGATIVE_SOFT,
 $topicConflict.getStudentSize() *
$institutionalWeighting.getPeriodSpreadPenalty(),
 $leftExam, $rightExam));
end

  

Thank you



--
View this message in context: http://drools.46999.n3.nabble.com/Examination-drools-planner-example-tp4019859.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] Planner Planning Entity difficulty comparator Vs difficulty weight factory

2012-09-20 Thread Geoffrey De Smet
[I locally answered this question last time already, but it looks like 
my mail never reached the mailing list due to a local misconfiguration 
at the time]

Op 20-09-12 01:49, Ricardo schreef:
 when to use Planner Planning Entity difficulty comparator and  difficulty
 weight factory? is any guidelines?
Use a difficulty comparator if you can: it's the easy variant.
A difficulty weight factory is needed only if you need the entire 
Solution (not just the entity) to calculate the difficulty of a given 
entity.

In the examples, look for *DifficultyComparator and 
*DifficultyWeightFactory.



 -
 with kind regards,

 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comparator-Vs-difficulty-weight-factory-tp4019858.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] Planner Planning Entity difficulty comparator Vs difficulty weight factory

2012-09-20 Thread ge0ffrey
See 
http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comparator-Vs-difficulty-weight-factory-tp4019858.html
http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comparator-Vs-difficulty-weight-factory-tp4019858.html
  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comparator-Vs-difficulty-weight-factory-tp4019504p4019861.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] planning difficulty problem

2012-09-20 Thread Geoffrey De Smet
[I locally answered this question last time already, but it looks like
my mail never reached the mailing list due to a local misconfiguration
at the time]


If it's in anything like the nurse rostering example, I would presume 
the following domain:
- Planning entity: ShiftAssignment. There are 9 (3 shifts for 3 hospitals)
- Planning variable: ShiftAssignment.get/setDoctor()
- Planning values for that variable: 10 doctors

So Planner will put a doctor in each of those 9 ShiftAssignments and 1 
doctor won't be assigned to any shift.
Actually, Planner might assign the same 2 doctor to 2 different 
ShiftAssignments if none of the constraints are broken (such as no 2 
ShiftAssignements at the same time for the same doctor).

See nurse rostering example. Play around with it. Take a look at this 
video about contentious planning with nurse rostering:
http://blog.athico.com/2012/08/continuous-planning-video.html
Mentally replace nurse with doctor and department with hospital.

Op 20-09-12 01:46, Ricardo schreef:
 For example , I have 10 doctors planning for 3 hospitals in three shifts,
 each hospital take maximum limit of 3 doctors only, In this case I have one
 remaining doctor unassigned. My doubt is how planner handle this data? will
 it be rejected or consider in other cycle or overwrite the planner solution?
 please advise...

 thanks,



 -
 with kind regards,

 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/planning-difficulty-problem-tp4019857.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] Classcast exception in Drools ant task

2012-09-20 Thread Mutyala Suresh kumar
Hi All, 

I am trying to build a sample drools project using ant and getting the below 
error. I am using drools-distribution-5.4.0.Final release jars in my project. 
Unable to get this issue resolved as not sure what really went wrong. 

RuleBaseTask failed: Unable to load dialect 
'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel:org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration'
 
        at 
org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:159)
 
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
        at java.lang.reflect.Method.invoke(Method.java:597) 
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
        at org.apache.tools.ant.Task.perform(Task.java:348) 
        at org.apache.tools.ant.Target.execute(Target.java:357) 
        at org.apache.tools.ant.Target.performTasks(Target.java:385) 
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) 
        at org.apache.tools.ant.Project.executeTarget(Project.java:1307) 
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 
        at 
org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:33)
 
        at org.apache.tools.ant.Project.executeTargets(Project.java:1191) 
        at 
org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
 
        at 
org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
 
Caused by: org.drools.RuntimeDroolsException: Unable to load dialect 
'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel:org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration'
 
        at 
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:313)
 
        at 
org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:298)
 
        at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:187)
 
        at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:140)
 
        at 
org.drools.contrib.DroolsCompilerAntTask.getPackageBuilder(DroolsCompilerAntTask.java:556)
 
        at 
org.drools.contrib.DroolsCompilerAntTask.createWithPackageBuilder(DroolsCompilerAntTask.java:266)
 
        at 
org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:156)
 
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
        at java.lang.reflect.Method.invoke(Method.java:597) 
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
        at org.apache.tools.ant.Task.perform(Task.java:348) 
        at org.apache.tools.ant.Target.execute(Target.java:357) 
        at org.apache.tools.ant.Target.performTasks(Target.java:385) 
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) 
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306) 
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 
        at 
org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
 
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189) 
        ... 2 more 
Caused by: java.lang.ClassCastException: 
org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration 
        at 
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:308)
 
        at 
org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:298)
 
        at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:189)
 
        at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:142)
 
        at 
org.drools.contrib.DroolsCompilerAntTask.getPackageBuilder(DroolsCompilerAntTask.java:558)
 
        at 
org.drools.contrib.DroolsCompilerAntTask.createWithPackageBuilder(DroolsCompilerAntTask.java:266)
 
        at 
org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:156)
 
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) 
        at 

Re: [rules-users] how drools-planner handling extra data while planning?

2012-09-20 Thread ge0ffrey
See 
http://drools.46999.n3.nabble.com/planning-difficulty-problem-td4019857.html
http://drools.46999.n3.nabble.com/planning-difficulty-problem-td4019857.html  



--
View this message in context: 
http://drools.46999.n3.nabble.com/how-drools-planner-handling-extra-data-while-planning-tp4019496p4019862.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] Examination drools-planner example

2012-09-20 Thread kostis
Thank you for quick answer,

Can you please also explain the other attributes of this class
InstitutionalWeighting?
1.twoInARowPenalty
2.twoInADayPenalty
3.periodSpreadLength : already explained
4.periodSpreadPenalty
5.mixedDurationPenalty
6.frontLoadLargeTopicSize
7.frontLoadLastPeriodSize
8.frontLoadPenalty

Thank you



--
View this message in context: 
http://drools.46999.n3.nabble.com/Examination-drools-planner-example-tp4019859p4019863.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] problem when upgrading to 5.4.0.Final, got UnsupportedOperationException on an update call

2012-09-20 Thread Michal Bali
FYI I have created JBRULES-3632 and attached minimalistic maven project
that reproduces this issue.

On Tue, Sep 11, 2012 at 12:42 PM, Michal Bali michalb...@gmail.com wrote:

 Hi all,

 I am upgrading an application from 5.3.0.Final to 5.4.0.Final and I am
 getting the following exception:
 Exception executing consequence for rule ruleThatFails in
 indexingproblem.remove.me.anditworks:
 java.lang.UnsupportedOperationException
  at
 org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
 at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
  at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1212)
 at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1446)
  at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
 at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
  at
 org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
 at com.mycompany.app.IndexingProblemMain.main(IndexingProblemMain.java:36)
 Caused by: java.lang.UnsupportedOperationException
 at org.drools.reteoo.BaseLeftTuple.getPrevious(BaseLeftTuple.java:480)
 at org.drools.core.util.index.LeftTupleList.remove(LeftTupleList.java:114)
  at
 org.drools.core.util.index.LeftTupleList.removeAdd(LeftTupleList.java:68)
 at org.drools.reteoo.JoinNode.modifyLeftTuple(JoinNode.java:310)
  at
 org.drools.reteoo.LeftTupleSource.doModifyLeftTuple(LeftTupleSource.java:304)
 at
 org.drools.reteoo.LeftTupleSource.modifyLeftTuple(LeftTupleSource.java:278)
  at org.drools.reteoo.JoinNode.modifyLeftTuple(JoinNode.java:437)
 at
 org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateModifyLeftTuple(SingleLeftTupleSinkAdapter.java:205)
  at
 org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateModifyObject(SingleLeftTupleSinkAdapter.java:235)
 at
 org.drools.reteoo.LeftInputAdapterNode.modifyObject(LeftInputAdapterNode.java:170)
  at
 org.drools.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:68)
 at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
  at
 org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
 at
 org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:421)
  at org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
 at org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
  at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:483)
 at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:383)
  at
 org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:337)
 at
 indexingproblem.remove.me.anditworks.Rule_ruleThatFails_b159773c7b1a41a2a93044d2816b96ca.defaultConsequence(Rule_ruleThatFails_b159773c7b1a41a2a93044d2816b96ca.java:9)
  at
 indexingproblem.remove.me.anditworks.Rule_ruleThatFails_b159773c7b1a41a2a93044d2816b96caDefaultConsequenceInvokerGenerated.evaluate(Unknown
 Source)
  at
 indexingproblem.remove.me.anditworks.Rule_ruleThatFails_b159773c7b1a41a2a93044d2816b96caDefaultConsequenceInvoker.evaluate(Unknown
 Source)
 at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1277)
  ... 6 more


 I have tried to create a minimal test case that recreates this issue, here
 it is:
 package indexingproblem.remove.me.anditworks;

 declare Criteria
   processed : boolean
 end

 declare CheeseCriteria extends Criteria
 end

 rule setUp
 salience 1
  when
  then
 insert(new CheeseCriteria());
 end

 rule aaa
   when
 CheeseCriteria(  )
   then
 end

 rule bbb
   when
 CheeseCriteria( )
   then
 end

 rule ccc
   when
 CheeseCriteria(  )
   then
 end


 rule eeeFalse
   when
 Criteria( processed == false )
 then
 end

 declare Filter

 end

 rule fffTrue
   when
 Criteria( processed == true )
 Filter(  )
 then

 end

 rule ruleThatFails
   when
 $criteria : Criteria( processed == false )
 then
 modify($criteria) {
 setProcessed(true)
 }
 end

 I've tried to run it on 5.5.0-SNAPSHOT, but I got the same result. Note
 that if you change the rule package to be package indexingproblem the
 exception is not thrown. The code for building the KnowledgeBase is
 standard, I haven't used any additional options. No fact is inserted only
 one fireAllRules call.

 Please let me know if I should create a new JIRA ticket for this or if I
 am doing something wrong.

 Thanking you in advance.
 Best regards,
 Michal

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


[rules-users] Combining Drools Expert and Planner

2012-09-20 Thread Phani Saripalli
Hi. 

Is it possible to combine Drools expert and planner to solve NP problems (or
some kind of model checking). 

For example, I have a model described as a .drl file 

declare Project
x : int
end

And, then I have a constraint (or rule) - something like this - 


rule  Rule on x
agenda-group Group 2
dialect mvel
no-loop true
 when
P : Project(P.x  5  P.x  7)
then
System.out.println(Rule satisfied);
end

Is it possible to obtain a value propagation mechanism by combining with
Planner, by which I finally get a value for x as 6 ? 
I am working on model checking for models that have various constraints, on
boolean, int, real, strings, container types and also on types that are
similar to C structs. There is hardly any reasoner/solver that does model
checking for constraints on such a varied types of datatypes. 

I checked planner, but defining planning variables and stuff on score
generation seemed to me a bit new and confusing.

Thank you :)



--
View this message in context: 
http://drools.46999.n3.nabble.com/Combining-Drools-Expert-and-Planner-tp4019871.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] How to compare two KnowledgePackageImp

2012-09-20 Thread gqmulligan
To simplify the question how can I compare two KnowledgePackageImp to see if
they represent the same thing even though they are different instances?

Thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/Issue-serializing-KnowledgePackage-with-hibernate-tp4019845p4019872.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] Capturing DDLs from Guvnor

2012-09-20 Thread dme1
Thanks. There doesn't seem to be a way to log the DDLs, so the only option
seems to be to modify the source.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Capturing-DDLs-from-Guvnor-tp4019855p4019873.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] Deserialzation Error running test example

2012-09-20 Thread Geoffrey De Smet
Caused by: java.io.FileNotFoundException:
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/packages/mortgages/
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)

For this specific example to work, guvnor needs to be running on port 
8080 and the examples guvnor repo needs to have been installed.

Op 20-09-12 16:48, richard schreef:
 I get this error running either with Netbeans or Eclispe.
 I downloaded source from github.
 Lastest Guvnor too.

 SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder.
 SLF4J: Defaulting to no-operation (NOP) logger implementation
 SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
 details.
 java.lang.RuntimeException: KnowledgeAgent exception while trying to
 deserialize KnowledgeDefinitionsPackage
   at
 org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:787)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1094)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:835)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:675)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:206)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
   at
 org.drools.guvnor.examples.mortgage.client.MortgageClientExample.readKnowledgeBase(MortgageClientExample.java:92)
   at
 org.drools.guvnor.examples.mortgage.client.MortgageClientExample.main(MortgageClientExample.java:49)
   at
 org.drools.guvnor.examples.GuvnorExamplesApp$1.actionPerformed(GuvnorExamplesApp.java:50)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown 
 Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$200(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
 Source)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
 Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
 Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
 Caused by: java.io.FileNotFoundException:
 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/packages/mortgages/
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
 Source)
   at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:210)
   at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:146)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:750)
   ... 44 more
 Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
   at java.util.AbstractCollection.addAll(Unknown Source)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1100)
   at
 

Re: [rules-users] Capturing DDLs from Guvnor

2012-09-20 Thread Michael Anstis
What did you mean log the DDLs?

I thought you needed the DDL to create the JCR schema on different RDBMS's
- hence I pointed you to the DDL JackRabbit uses. IIRC you can enable
logging of SQL statements (DDL and DML) on Oracle (and probably other
RDBMS's) if you want to log the DDL JackRabbit uses - but I suspect it'll
be the same as the DDL files I pointed you to.

If you are expecting a schema that shows a table for Asset, Rule, Enum etc
etc you will have along time looking. If JackRabbit is configured to store
it's internal data-structures in a RDBMS it uses (and I quote the JavaDocs)
...a simple custom binary serialization format and a very basic
non-normalized database schema

If you want to use a RDBMS not natively supported I suspect you'll need to
write your own DatabasePersistenceManager, but this is out of the scope of
the Drools mailing lists and questions should be submitted to the
JackRabbit mailing lists.

With kind regards,

Mike

On 20 September 2012 15:36, dme1 meh...@hotmail.com wrote:

 Thanks. There doesn't seem to be a way to log the DDLs, so the only option
 seems to be to modify the source.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Capturing-DDLs-from-Guvnor-tp4019855p4019873.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] Capturing DDLs from Guvnor

2012-09-20 Thread dme1
Thanks. You are correct I am just looking to pull out the DDLs used by
JackRabbit to create the schema in various databases, and I understand that
I will not be able to get the schemas for Rules, Enums etc. as JackRabbit
stores in its internal format.

I did not see logs in the JackRabbit code, but you are correct I should
explore the JDBC drivers.

Thanks for the response,
dme



--
View this message in context: 
http://drools.46999.n3.nabble.com/Capturing-DDLs-from-Guvnor-tp4019855p4019877.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] Combining Drools Expert and Planner

2012-09-20 Thread Geoffrey De Smet

Op 20-09-12 15:59, Phani Saripalli schreef:
 Hi.

 Is it possible to combine Drools expert and planner to solve NP problems (or
 some kind of model checking).

 For example, I have a model described as a .drl file

 declare Project
 x : int
 end
Classes declared in the drl file aren't supported yet in Planner :(
Feel free to make a jira for it.
 And, then I have a constraint (or rule) - something like this -


 rule  Rule on x
 agenda-group Group 2
 dialect mvel
 no-loop true
   when
 P : Project(P.x  5  P.x  7)
 then
 System.out.println(Rule satisfied);
 end
that's can be easily converted into a score rule, just replace the 
System.out with the insertLogical of the ConstraintOccurrence (see 
planner manual for more info)
 Is it possible to obtain a value propagation mechanism by combining with
 Planner, by which I finally get a value for x as 6 ?
you would define a range of values for x and based on the constraint, 
planner will end up with value 6 for that Project,
but that's not really efficient.

Planner is really build to solve a case like this where you have 3 
projects Project needs an x:

  when
$p : Project(P.x  5  P.x  9)
then ...

and where there are some other constraints such as:

  when
$a : Project(id == A)
$b : Project(id == B, x  $a.x)
then ...


that result in an optimal solution of project A with x = 7, project B 
with x = 6 and project C with x= 8.

 I am working on model checking for models that have various constraints, on
 boolean, int, real, strings, container types and also on types that are
 similar to C structs. There is hardly any reasoner/solver that does model
 checking for constraints on such a varied types of datatypes.

 I checked planner, but defining planning variables and stuff on score
 generation seemed to me a bit new and confusing.

 Thank you :)



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Combining-Drools-Expert-and-Planner-tp4019871.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] Which proper way to test for Event expiration in Drools Fusion?

2012-09-20 Thread tari-manga
Found solution! Obviously it was me being stupid and not realizing I was
using Drools 5.4.0.Final while still referring to old documentation of
5.2.0.Final. In the updated documentation for Drools Fusion 5.4.0.Final,
this box is added for 2.6.2. Sliding Length Windows:

Please note that length based windows do not define temporal constraints for
event expiration from the session, and the engine will not consider them. If
events have no other rules defining temporal constraints and no explicit
expiration policy, the engine will keep them in the session indefinitely.

Therefore the 3rd requirement I originally enlisted of You must define
temporal constraints between Events is obviously NOT met because I now
understand Sliding Length Window in Drools 5.4.0.Final:

Message() over window:length(1)

are indeed NOT a definition of a temporal constraints for event expiration
from the session.

Updating this answer hopefully somebody will find it helpful (and
Stackoverflow original reference updated as well). Also, just so for your
know, me being stupid actually for relying on googling in order to reach the
doc, and sometimes you don't get redirected to the current release
documentation, so it seems...

Ciao



--
View this message in context: 
http://drools.46999.n3.nabble.com/Which-proper-way-to-test-for-Event-expiration-in-Drools-Fusion-tp4019698p4019880.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] Deserialzation Error running test example

2012-09-20 Thread richard
So, what versions do I use?
I downloaded the guvnor from Jboss web site. 5.4.0 final and I got the
example code from github repository.




--
View this message in context: 
http://drools.46999.n3.nabble.com/Deserialzation-Error-running-test-example-tp4019874p4019882.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] factorize rules

2012-09-20 Thread John Dujon
Hello,

I am trying to make my rules more readable and wonder wether or not we can
factorize rules for a particular ruleflow-group. As an example, I would
like to convert this:

// begin rules
rule Rule 1
 ruleflow-group work
when
  condition 0
  condition1
then
  doSomething();

rule Rule 2
 ruleflow-group work
when
  condition0
  condition2
then
  doSomethingElse();

// end rules

to the following

// begin rules

pre_conditions_for_rules
  ruleflow-group work
  condition0

rule Rule 1
 ruleflow-group work
when
  condition1
then
  doSomething();
end

rule Rule 2
 ruleflow-group work
when
  condition2
then
  doSomethingElse();
end

// end rules


Thank you for your time. I apologize in advance if that does not make
sense, as I am new to drools

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


Re: [rules-users] factorize rules

2012-09-20 Thread Wolfgang Laun
@dev: When will extends for rules be documented in the proper place?

@John: There is a feature doing just that:

rule pre_conditions_for_rules
when
   condition0
then end

rule Rule 1 extends pre_conditions_for_rules
   ruleflow-group work
when
  //...

-W

On 20/09/2012, John Dujon johndu...@gmail.com wrote:
 Hello,

 I am trying to make my rules more readable and wonder wether or not we can
 factorize rules for a particular ruleflow-group. As an example, I would
 like to convert this:

 // begin rules
 rule Rule 1
  ruleflow-group work
 when
   condition 0
   condition1
 then
   doSomething();

 rule Rule 2
  ruleflow-group work
 when
   condition0
   condition2
 then
   doSomethingElse();

 // end rules

 to the following

 // begin rules

 pre_conditions_for_rules
   ruleflow-group work
   condition0

 rule Rule 1
  ruleflow-group work
 when
   condition1
 then
   doSomething();
 end

 rule Rule 2
  ruleflow-group work
 when
   condition2
 then
   doSomethingElse();
 end

 // end rules


 Thank you for your time. I apologize in advance if that does not make
 sense, as I am new to drools

 John

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