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

Optaplanner: How to leave planning variables as null if it breaks hard constraint

The behaviour i'm seeing in the results is that two courses that can only be in one time period (like Monday 9am) is both being set in the same period anyway despite having a hard constraint. What I would like to happen is that one of them be set to…
Samuel
  • 325
  • 4
  • 10
3
votes
0 answers

Add Three New Planning Variables To Nurse Roster Solution

I am trying to add three new planning variables to Optaplanner Nurse Roster Solution. These three planning variables were shortTask, mainTask, and fullTask which are a ShiftTaskAllocation class : public class ShiftTaskAllocation extends…
the.wizard
  • 1,079
  • 1
  • 9
  • 25
3
votes
1 answer

Advantages and disadvantages of having more move selectors in the union in local search

I want an opinion when it comes to the number of move selectors in local search. Does adding a new move selector (with a given move type) is more positive than negative in most of the use cases. Meaning does it help the algorithms to more quickly…
3
votes
1 answer

Optaplanner : how to manage a PlanningVariable for a list?

I started my problem from MeetingScheduling example. I have Participants in groups and each participant have a list of slots where he is unavailable: public class Participant { private Group group; private List unavailabilityList; } I…
3
votes
1 answer

Optaplanner termination strategy

In the opta planner configuration ,there is a provision to specify the termination time out. Is there a better way to handle the termination time out strategy? For example , my problem size is small and I have set the termination time out as 10…
lives
  • 1,243
  • 5
  • 25
  • 61
3
votes
1 answer

Optaplanner - CVRP - returning to depot mid trip

My problem is a modification of the Capacitated Vehicle Routing Problem (CVRP) that will eventually include time windows as well. Since time windows are already built into the examples, it shouldn't be too hard for me to figure them out. However, I…
Xanderhall
  • 131
  • 2
3
votes
1 answer

Optaplanner ConcurrentModificationException when modifying Solution from SolverEventListener

I'm solving a scheduling problem using OptaPlanner solver integrated into a JavaFX GUI that updates on each improvement. Since connecting it to the GUI, this exception frequently happens after the construction heuristic finishes. Exception in…
3
votes
0 answers

Brute Force Solver Configuration for multiple entity classes

I'm running into following issue while trying to configure solver with BRUTE_FORCE for multiple entity classes: Caused by: com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$DuplicateFieldException: Duplicate field…
Manish
  • 47
  • 5
3
votes
2 answers

Optaplanner shadow variable with more than one source

Optaplanner allows for a shadow variable to have more than one source (sources = {}) but only one variableListsnerClass. In my implementation i have a planning entity with shadow variables that should be able to change by two listsners, but this is…
ido flax
  • 528
  • 1
  • 10
  • 19
3
votes
1 answer

How to dynamically Create Java Objects from XML/XSD that contain custom annotations used by a 3rd party library

My goal is to take a XML and/or XSD file and dynamically create a Java object that contains costume annotations and load it into the JVM. A 3rd party library would then look for those objects containing that annotation and perform some function to…
Justin A
  • 364
  • 4
  • 14
3
votes
0 answers

Putting breaks within a shift

I am solving a problem that is close to the nurse rostering one from the examples. Besides the default shiftAssignment (planning entity) -> employee(planning variable) I have small assignments within the shift that divide the shift in N equal…
3
votes
2 answers

MoveIteratorFactory purpose

As i can understand from the documentation the purpose of the "MoveIteratorFactory" is to generate the moves as they are needed to be played out at every step. Is the "getSize" method how big the subset of moves will be? What is the difference…
3
votes
1 answer

arrivalTime in Optaplanner XML Solution file

We're having a difficult issue with Optaplanner. We're working on a project for which we need to calculate an optimised vehicle route that takes into account specific hours between which the clients would like to be serviced. We've been able to…
3
votes
1 answer

Maven library issues when importing OptaPlanner project

I am checking out OptaPlanner: https://github.com/droolsjbpm/optaplanner, and for some reason after cloning the project my Maven modules have an issue. I am unable to run any of the example projects because of this. I have re-cloned the project…
portfoliobuilder
  • 7,556
  • 14
  • 76
  • 136
3
votes
1 answer

OptaPlanner - The entity was never added to this ScoreDirector error

I am implementing an algorithm similar to the NurseRoster one in OptaPlanner. I need to implement a rule in drools that check if the Employee cannot work more days than the number of days in his contract. Since i couldn't figure out how to make this…
Nikola Atanasov
  • 605
  • 1
  • 4
  • 11