Questions tagged [optaplanner]

OptaPlanner 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.

OptaPlanner is a Artificial Intelligence planning engine written in Java. It works in Kotlin and Scala too. It integrates with Quarkus and Spring Boot. It helps normal programmers solve constraint solving problems efficiently. Under the hood, it combines optimization heuristics and metaheuristics with incremental score calculation.

Typical use cases include the vehicle routing problem, maintenance scheduling, employee rostering, task assignment and school timetabling.

OptaPlanner is open source software, released under the Apache Software License. It is 100% pure Java, runs on any JVM and is available in the Maven Central Repository too.

1619 questions
3
votes
1 answer

Why is there no 'notEqual' method in Joiners class?

I'm using the Joiners class to make a Constraint. The Joiners class has methods like equal(), greaterThan(), lessThanOrEqual(), etc. I want to use a method such as "notEqual()" because I want to compare two objects of the same class, and assign a…
Gorzolimir
  • 31
  • 1
3
votes
2 answers

Equal distribution of Schedules

I have a system in optaplanner which generates shifts for employees. When there are for e.x 6 employees and shift capacity is two, the solution is generated only for 2 employees until they reach the maximum working hours. How can I add a constraint…
3
votes
1 answer

Spring: ApplicationStartingEvent cannot be cast to ApplicationPreparedEvent for OptaPlanner Examination App

I'm a newbie and I try to start a Spring application linked to Optaplanner which will solve and place exams on a timetable. I fixed the various issues with missing jars and I started the app on main. However, it gives error: Exception in thread…
3
votes
1 answer

How To solve “Bailing out of neverEnding selector to avoid infinite loop” error when I've used @PlanningPin In Optaplanner?

I want to use "pin" feature of optaplanner for immovable operations. However i get "Bailing out of neverEnding selector (Filtering(FromSolutionEntitySelector(PersonAssignment))) to avoid infinite loop." error. I've tried both with @PlanningPin and…
ahmetesat
  • 73
  • 6
3
votes
0 answers

Optaplanner: NullPointerException when calling scoreDirector.beforeVariableChanged in a simple custom move

I am building a Capacited Vehicle Routing Problem with Time Windows, but with one small difference when compared to the one provided in examples from the documentation: I don't have a depot. Instead, each order has a pickup step, and a delivery…
3
votes
1 answer

OptaPlanner : I tried to print out the justificationList of ConstraintMatch, but got objects of SubnetworkTuple which are not my domain classes

I'm using OptaPlanner to solve a planning problem. I use drools to do score calculation. When I tried to print out the justificationList of each constraintMatch, I got objects which are instances of SubnetworkTuple besides my domain class objects.…
xcyang
  • 35
  • 6
3
votes
2 answers

OptaPlanner throwing IllegalStateException on CompositeMove created by CartesianProductMoveSelector

so basically my problem is, that OptaPlanner is throwing this: java.lang.IllegalStateException: The entity (...) has a variable (previousEntry) with value (...) which has a sourceVariableName variable (nextEntry) with a value (...) which is not…
JohnnyAW
  • 2,866
  • 1
  • 16
  • 27
3
votes
1 answer

No entityClass, and because there are multiple in the entityClassSet, it can not be deduced automatically

I'm trying to implement a solution with multiple entity classes, and it fails with the following error message: no entityClass (null) configured and because there are multiple in the entityClassSet ([class com.myspace.wla.JobA, class …
eliezerb
  • 47
  • 4
3
votes
1 answer

Running OptaPlanner on the module path

I would like to make my OptaPlanner project run on the module path. I created an example repository (mwkroening/optaplanner-modulepath-example) based on the cloud balancing demo in the docs. The example project is running well on the classpath but…
3
votes
2 answers

optaplanner with aws lambda

I am using optaplanner to solve a scheduling problem. I want to invoke the scheduling code from AWS Lambda (i know that Lambda's max execution time is 5 minutes and thats okay for this application) To achieve this I have build a maven project with…
mluser
  • 53
  • 1
  • 6
3
votes
2 answers

OptaPlanner: Make planning entities chained and nullable

Dear OptaPlanner community For a specific use case of the OptaPlanner framework, I would like to use the chained data structure, as it is used in the Vehicle Routing example. The problem in our case is that there are a lot of customers, and not all…
3
votes
2 answers

Do Google Optimization Tools support Soft Constraints?

I was wondering if anyone familiar with Google Optimization tools can address this. I was looking at the Google examples both employee scheduling and N-queens. Both example seem to have the optimizer running only on hard constraints (e.g. this must…
3
votes
1 answer

Optaplanner VRP remove customer from working solution

Based on this example from cloud balancing problem, I'm trying to remove customer from a working solution as follows: Location toBeRemovedLocation = customerToBeRemoved.getLocation(); Location lookUpWorkingObject = (Location)…
3
votes
6 answers

Exception Child services have no parent when starting Optaplanner application

I have a test program that uses optaplanner. There is no direct use of KIE API's but it looks like they are being invoked behind the scenes. This may be related to the fact that I am using DROOLS for the score calculation. The program works from the…
WillShackleford
  • 6,918
  • 2
  • 17
  • 33
3
votes
1 answer

Vehicle Routing with multiple locations per customer

I'm trying to solve vehicle routing where each customer has multiple locations, of which exactly one needs to be visited. I obtained optaplanner-master and modified the vehiclerouting example in the following manner: Customer.java: /* * Copyright…
msasha
  • 247
  • 2
  • 9