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
1
vote
1 answer

Which Drools product to use for timetabling?

Yes, it's a newb question. I want to make a timetabling application that these points specific to my situation: At a single time, we are allocating a maximum of (3 teachers X 6 hours)X(3 classes X 35 hour workweek) at a single go, we are…
Jesvin Jose
  • 22,498
  • 32
  • 109
  • 202
1
vote
2 answers

Drools Creating a Custom Score

So I've created a custom score in drools: public interface MyScore extends Score and have implemented it. However I can't see how to use the score. The config has a tag but putting anything inside this other than SIMPLE…
Jim
  • 22,354
  • 6
  • 52
  • 80
1
vote
1 answer

Drools Planner rule only fired once

I have a rule of the form rule "notBar" when $foo : Foo(bar == false) then insertLogical(new IntConstraintOccurrence("notBar", ConstraintType.NEGATIVE_SOFT, $foo)); end I expect to see this fired once for…
Jim
  • 22,354
  • 6
  • 52
  • 80
1
vote
1 answer

Optaplanner planning variable is NOT nullable BUT still assign to null

planning variable is NOT nullable. when I print out planning entity in variable listener for my shadow value, still in planning process NULL value still assign to planning variable?? planning entity: // Planning variables: changes during planning,…
EeE
  • 665
  • 5
  • 12
  • 27
1
vote
1 answer

Using enum in drools

I am solving an employee rostering problem. One of the constraints there is that Employee from each "type" should be present on every day. Type is defined as an enum. I have right now configured this rule as follows: rule "All employee types must be…
Pravesh Jain
  • 4,128
  • 6
  • 28
  • 47
1
vote
0 answers

Not able to override previously build project with the user having developer roles on kie-wb-7.5.0.(drools)

I am not able to override the previously build project when I build&deploy it with the user having developer roles on kie-wb-7.5.0.Final-eap7. I have given all the permissions to the developer. how we can give the developer, the permissions to…
1
vote
1 answer

Retrieve drools working memory from Optaplanner solution

When drl file used while solving constraints one could use insertLogical() which insert facts in drools working memory only and may not be retracted till completion of solution(LHS stay true forever for that insertLogical()). When we get solution…
Sachin Verma
  • 3,712
  • 10
  • 41
  • 74
1
vote
0 answers

Optaplanner Score corruption

I'm working on a problem that's similar to vehicle routing problem and I have a rule to avoid multiple employees using same vehicle same time. Also, I'm using multi level bendable score just for verbose score calculation. With this rule I have…
Sachin Verma
  • 3,712
  • 10
  • 41
  • 74
1
vote
1 answer

KIE execution server Indictment API

There is an API for java to get IndictmentMap from Optaplanner core ScoreDirector interface. But I am not directly using Optaplanner engine but using KIE server instead that solves my planning problems. Is there an API to get indictment from…
Sachin Verma
  • 3,712
  • 10
  • 41
  • 74
1
vote
0 answers

Optaplanner + Drools - How to create "Minimum number of shifts" rule?

I'm working on this Optaplanner example (optashift-employee-rostering). and It's all working now, except for I have few Days with no shifts assigned to any employee in any time slots, So I need to add a rule for "Minimum One shift per day per…
Ella
  • 101
  • 1
  • 3
1
vote
0 answers

Vehicle Routing With Staff

I am working on a solution where we need to route our vehicle to locations of Tasks asked by our Customers. Here is how my domain looks like: interface TaskOrVehicle{ @InverseShadowVarible Task nextTask; getLocation(); } Task: @PlanningEntity …
Sachin Verma
  • 3,712
  • 10
  • 41
  • 74
1
vote
1 answer

Optaplanner to have assignment Criteria

If we take an example of task assignment to employee where we assign a list of tasks to list of employees based on employee's availability and skills(hard constraints) required to perform an individual task. Now, if there is a task and no employee…
Sachin Verma
  • 3,712
  • 10
  • 41
  • 74
1
vote
2 answers

In Drools, what does it mean to compare IDs

I understand the basics of writing drools rules now but i can't seem to understand in the examples that i've seen (optaplanner), there are comparisons of IDs. Is this necessary? Why is it there? // RoomOccupancy: Two lectures in the same room at the…
Samuel
  • 325
  • 4
  • 10
1
vote
1 answer

Optaplanner take fastest path

How can we optimize Optaplanner to select the fastest route? See the highlighted point in the below image. It is taking the long route. Note: Vehicles does not need to come back depot. I think i cannot use CVRPTW as arrivalAfterDueTimeAtDepot is…
Chandra Manthina
  • 147
  • 1
  • 4
  • 13
1
vote
1 answer

Use hard/soft constraint score at same time in drool/optaplanner

Is it possible to use the hard and soft constraint score in the consequences part of a rule but one of them has a non-zero value. e.g. scoreHolder.addHardConstraintMatch(kcontext, $weight * isHard); scoreHolder.addSoftConstraintMatch(kcontext,…
Shadi Moadad
  • 78
  • 1
  • 7
1 2
3
9 10