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

Can OptaPlanner be modified to support 2d Bin Packing

I am looking for a algorithm that will place different size rectangle given their Height and width in inches on a Fixed size rectangle which is defines by Height and Width. I saw bin packing in a description of OptaPlanner but I am not sure this is…
3
votes
1 answer

Deploying optaplanner on a cluster

I know optaplanner scales very well wrt problem size. But how can it scale wrt the number of problem requests? Currently, we have exposed optaplanner as a REST service. It can get hundreds of scheduling requests per day. Search is stopped after 10…
truem
  • 37
  • 3
2
votes
1 answer

How do I upgrade from OptaPlanner to Timefold?

We forked OptaPlanner as Timefold some time ago. We often get this question: Timefold changes all import statements and dependencies. How do I migrate an OptaPlanner codebase to Timefold efficiently?
Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
2
votes
1 answer

How to choose a car and optimally accommodate passengers in it?

Based on my previous question How to choose a vehicle that can accommodate the specified number of employees with OptaPlanner? Employee: public class Employee { @PlanningId private Long id; private String name; …
2
votes
0 answers

Error in OptaPlannerBenchmarkAutoConfiguration fallback case for benchmark?

The following question refers to optaplanner version 8.24.1.Final: In class OptaPlannerBenchmarkAutoConfiguration of package org.optaplanner.spring.boot.autoconfigure there is a fallback in line 61. Line 61 calls createFromSolverConfig in class…
johnson
  • 33
  • 3
2
votes
1 answer

OptaPlanner - Problem with using @PlanningListVariable and @PlanningVariable in the same planning entity

I created a planning entity that represents a lesson and in that entity I defined two planning variables and one planning list variable. Program was working normally before adding a planning list variable and then it resulted Caused by:…
2
votes
1 answer

Drools wants Java compiler, which is not present in custom image

All, I have my optaplanner application using JavaFX. Running and testing it in IntelliJ's IDE was not the problem, but generating an application from it was really painful. Mainly due to the combination of the (modular) JavaFX modules with other…
sudo
  • 188
  • 10
2
votes
2 answers

How to add HardConstraint for min and max count per group in OptaPlanner?

I'm new in OptaPlanner. I need to divide the list of works between employees, but the number of work performed by one employee should not be less or more than the specified values. For example, one employee cannot perform less than 10 and more than…
2
votes
1 answer

OptaPlanner - ConstraintStreams - Disabling constraints dynamically

I am using Java ConstraintStreams for constraint implementation and need to enable/disable the constraints dynamically. Following the suggested approach in this answer Optaplanner : Add / remove constraints dynamically using zero constraint weight…
Ojas Dubey
  • 91
  • 7
2
votes
1 answer

Optaplanner + Spring Boot. Is it possible to inject bean in ConstraintProvider implementation class?

I have an application with Optaplanner + Spring Boot, which solves VRP problem. One of the needs for solving this problem is to know the distances between two points. I do this through a separate class that makes the http request. I tried to inject…
EngDrinker
  • 23
  • 4
2
votes
2 answers

Intermittent NPE in OptaPlanner constraint streams

I've been struggling to reproduce this exception, which is unfortunately an intermittent failure in an OptaPlanner project I'm leading. Any insights would be much appreciated: java.lang.IllegalStateException: The move thread with moveThreadIndex…
jj1289
  • 45
  • 4
2
votes
1 answer

Stopping and restarting the solving process helps finding better solutions

My colleague and I successfully implemented an exam scheduler based on OptaPlanner as our bachelor thesis. However, we noticed that the solver gets stuck during the local search phase for hours, and stopping/restarting the solving process helps find…
FunkyFabe
  • 149
  • 2
  • 8
2
votes
1 answer

Implementing a custom move in optaplanner

I'm using Optaplanner to make a schedule for a school. Every works good, except that it sometimes have gaps between the lessons, which I do not want. I have rules for punishing this but I think the search space is so big that it will take quite a…
Christian
  • 819
  • 1
  • 8
  • 23
2
votes
1 answer

Can I run a custom phase generating an initial solution several times to generate a pool of starting solutions?

I’m using Optaplanner 8.15.0 to solve a variant of the redistricting problem: Geographic areas with an expected revenue are assembled to sales districts that must be contiguous and should be balanced and compact. The initial solution is generated by…
hfs
  • 2,433
  • 24
  • 37
2
votes
1 answer

OptaPlanner domainAccessType Gizmo

I'm trying to use GIZMO in my solver config. It seems to get fast access with most of my variables, but it throws an exception for variables in my @PlanningSolution: 17:30:17.863 [main ] TRACE Model…
DFx
  • 249
  • 3
  • 14