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
0
votes
1 answer

Unmarshalling of solverConfigResource fails

This post is a solution on a previous issue: OptaPlanner - Problems with the solver configuration for two planning entity classes This was the error: Exception in thread "main" java.lang.IllegalArgumentException: Unmarshalling of…
0
votes
1 answer

Optaplanner / Drools throws exception in solverFactory.buildSolver()

I don't know what the cause of this is but googling it suggests something to do with enums. I have one enum that i am using for optaplanner, but in former iterations (possibly an older version of optaplnner or drools) this wasn't an issue Update: i…
ido flax
  • 528
  • 1
  • 10
  • 19
0
votes
1 answer

Drools Knapsack Optaplanner

I try to solve the Knapsack-Problem with the Optaplanner by using drools. Did someone this before? This refers to the example by optaplanner. Thanks for your help I have implemented these rules as follows: rule "weigth" dialect…
jonas1289
  • 1
  • 1
0
votes
1 answer

Detailed example/documentation of OptaPlanner Shadow Variable?

Is there a more detailed example of a Shadow Variable being used with non-chained entities? The upgrade recipe for OptaPlanner 6.2 -> 6.3 briefly mentions @InverseRelationShadowVariable using the Cloud Balancing example, but I was unable to get it…
Laurent
  • 656
  • 5
  • 9
0
votes
1 answer

Allowing overlap with OptaPlanner and TSPTW

I currently have OptaPlanner solving a TSPTW problem. For the following it will help to think of the destinations as tasks. Each task currently has a chained planning variable called previousTask. The tasks can be categorized as Type A or Type B.…
0
votes
0 answers

Optaplanner NullPointerException

I'm getting a null pointer exception when using optaplanner with a drools set up. this happens in org.drools.core.rule.constraint.MvelConstraint.java in the method evaluate. the null object is leftTuple: protected boolean…
ido flax
  • 528
  • 1
  • 10
  • 19
0
votes
0 answers

Optaplanner VariableListener corruption

I'm facing a problem with Optaplanner. It started when I was trying to implement a solution of type Pick and Delivery base on the VehicleRoutingProblem. In one of my tests I see something wrong in the debug but the result seems to be the best…
Bibou3618
  • 41
  • 4
0
votes
1 answer

Scenario where properties have a dependency on the Fact values

Need clarification regarding the statement that Problem fact class is used by the score constraints, but does NOT change during planning (as long as the problem stays the same). Can Optaplanner handle scenarios (and return optimzed solution) where…
Manish
  • 47
  • 5
0
votes
0 answers

Optaplanner, How to make the lecture start time to be chosen within time window according to the constraints in DRL and not an input specific time?

In the curriculum course example, I want the lecture to start within a time window and according to its duration the constraints between two consecutive lectures are set. Defining the constraints in the DRL file is not the problem, I've already…
Amr Qamar
  • 99
  • 6
0
votes
1 answer

Solving VRPTW using OptaPlanner

I have tried to run example https://github.com/droolsjbpm/optaplanner/tree/master/optaplanner-examples/src/main/java/org/optaplanner/examples/vehiclerouting as it is written here: …
Bjarni
  • 1
  • 1
  • 2
0
votes
0 answers

How to build a drl rule

Good Afternoon, I want to do a question, i'm working with OptaPlanner and I have problems to build a hard constraint, maybe you could help me; I'm confused, the problem that I'm trying to build is: I have many trips, and I need to combine in order…
0
votes
1 answer

Optaplanner 6.3.0 Variablelistener corruption

When running the TW-VRP example test "solveModel_cvrptw_100customers_AFastAssert" in the examples section on env mode FULL_ASSERT, then the following illegal state is shown: java.lang.IllegalStateException: VariableListener corruption: the entity…
truem
  • 37
  • 3
0
votes
1 answer

Optaplanner exception: the selectionList contains 2 times the same selection

I have this issue, after building my problem implementation, when running Optaplanner: java.lang.IllegalStateException: The selectionList contains 2 times the same selection (Edge to: MinMax1 from: s4,s5,) and (Edge to: Sum2 from: s3,s4,). at…
the_grandson
  • 15
  • 10
0
votes
1 answer

Optaplanner: Generating a partial solution to VRP where trucks and/or stops may remain unassigned based on Time windows

I am solving a variation on vehicle routing problem. The model worked until I implemented a change where certain vehicles and/or stops may remain unassigned because the construction filter does not allow the move due to time window considerations…
0
votes
1 answer

OptaPlanner customer-vehicle delivery restrictions

I am using OptaPlanner for vehicle routing and scheduling. I'd like to include the concept of customer-vehicle restrictions. Example 1: customers specified as mechanised customers can only receive delivery from vehicles that have been specified as…
Liz S
  • 1
  • 2