Questions tagged [drools-planner]

Drools Planner optimizes planning, routing and scheduling. It solves resource optimization problems such as bin packing, vehicle routing, employee rostering and course timetabling. It scales out in data and constraints. It's open source (ASL), pure java and enterprise ready.

Drools Planner has been renamed to OptaPlanner. It is a lightweight, embeddable planning engine written in Java™. It helps normal Java™ programmers solve constraint satisfaction problems efficiently. Under the hood, it combines optimization heuristics and metaheuristics with very efficient score calculation.

148 questions
0
votes
1 answer

update planning variable's property during planning

I am using optaplanner to solve a scheduling problem. For proprietary reasons I am using analogy to ask the question instead of posting the actual problem I need to do assign books to different people based on some constraints. Here is how i have…
mluser
  • 53
  • 1
  • 6
0
votes
1 answer

Optaplanner with Hibernate - some DRL rules not working

I am making an application for employee rostering using Optaplanner. Everything worked just fine without persistence. Now, I want to add Hibernate integration. I want to take information from MySQL database and use it as a schedule input. In…
user4832705
0
votes
0 answers

drools - 7.6.0 Array Index Out Of Bound Exception

We are trying to get a reproducer but this issue comes up intermittently in our systems.We are on drools 7.6.0 version. We see this crash when our service tries to update rules at runtime under heavy load. After that all requests start to fail .…
Geek
  • 25
  • 6
0
votes
1 answer

what causes ConstraintMatchTotal could not add constraintMatch, when issue is tied to a .drl 'or' clause?

In extending code from OptaPlanner nurse rostering sample code. What causes the "constraintMatchTotal could not add constraintMatch" (Illegal state?) error to be thrown, that would be related to the parsing of a .drl rule with an 'or' clause,…
timeNtrack
  • 27
  • 8
0
votes
1 answer

global variable in optaplanner

In drools rule file how do I set the value of (or initialize) a global variable for optaplanner. My use case is following: I want to declare a global java map that is constant and will not change during the execution. Every rule will access the map…
mluser
  • 53
  • 1
  • 6
0
votes
1 answer

Accumulating on inner collections in Drools

Let's say I have red and green baskets holding boxes of strawberries and grapes: public class Basket { public enum Color { RED, GREEN }; private Color color; private List fruitBoxes; //Assume appropriate constructors,…
Anthony
  • 341
  • 2
  • 11
0
votes
1 answer

Optaplanner: Meta Heuristic and Brute Force Solution do not match even if enough time is given to MH

My understanding is Brute Force will always give the best solution but will not scale. While Meta Heuristic will give best possible in certain time limit. Meaning If Enough time is given, it should match with Brute Force Solution. But, In my…
Md Zahid Raza
  • 941
  • 1
  • 11
  • 28
0
votes
1 answer

How to get a maximum date among the list of past dates in drools?

From the List of Orders, i need to collect dates which are past to requesteffDate and requesteffTime and take the maximum of the past dates. function boolean dateCheck(Date effdt, Date efftm) { String efffdt = new…
0
votes
1 answer

How to use the function in drools with two parameters

I want to check whether the student id is present in emp id of the company class. If a studentid is present in the empidlist, then i should throw the error. I have tried it in two different ways: 1st rule :"check the student id is present in…
0
votes
1 answer

How do I get a list of variables from the list of objects in drools

My rule is as follows: when C : Company() $empname : List() collect from (Employee($empname : empname) from C.employees) then System.out.println($empname); The corresponding class: public class Company { private List employees; …
0
votes
1 answer

Construction Heuristics takes long time

Using Optaplanner 7.3.0 with multiple planning variable hence multiple (2) construction heuristics phases. Here is how my CH phase 2 looks like:
Sachin Verma
  • 3,712
  • 10
  • 41
  • 74
0
votes
1 answer

how to add value to duration attribute in drools

Whenever i write duration(0s), it works but as soon as i change it to duration(1s) or duration(5s), the rule doesn't fire... This is the rule which i want to fire. rule "ContainsChecking" agenda-group "town4" duration(0s) when Town(owner…
0
votes
1 answer

Multiple chained planning variable leads to same Anchor

In Optaplanner, is there a way to assign multiple chains that leads to same Anchor? Is this a feature provided by optaplanner? For eg. (Task planning with Vehicle Routing app) I have an employee emp who does 20 tasks in a day. For first 10 tasks, as…
Sachin Verma
  • 3,712
  • 10
  • 41
  • 74
0
votes
1 answer

OptaPlaner simple example cant find feasible solution

to get familiar with optaplanner i created a simple test project. I only have one Solution and one Entity class. The Entity has only one value between 0 and 9. There should only be odd numbers and the sum of all should be less then 10 (this are just…
MrWoffle
  • 149
  • 2
  • 10
0
votes
0 answers

Customized rules and can be changing very often -every week

Our application has many business rules and it can be changing very often , even the parameters and prioritizationapplied on the rules can change very often consider -every week . SHould i use drools workbench or customized UI