Pezetter
Pezetter

Reputation: 2862

OptaPlanner solution partitioning phase ends with all values assigned but doesnt trigger a score update

I've implemented a partitioned search phase with OptaPlanner. I've tried this on FAST_ASSERT and FULL_ASSERT.

My problem includes overconstrained planning. My planning variable is nullable. On startup, all entities are initialized with a null planning value. In production, there are over 5000 planning entities and anywhere between 20K-30K problem facts. I have a medium constraint that is exclusively for penalizing if the entities planning value is still null.

The first phase within the partition phase is a construction phase. Via the logs, it shows my medium score hitting zero on every partitioned construction phase. After the partition phase ends, the next local search shows a reset medium score. All the way back to an uninitialized solution.

For some context, heres the logs. Last local search phase within the partition search ends with 0 medium score. Immediately after, the partition search phase is done, but the score reverts back to the orginal, initialized score:

2023-06-09 11:07:33,736 INFO         org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase 199 :          Local Search phase (1) ended: time spent (18085), best score (0hard/0medium/-206soft), score calculation speed (1676/sec), step total (1). 
2023-06-09 11:09:06,454 INFO         o.o.core.impl.partitionedsearch.DefaultPartitionedSearchPhase 196 :  Partitioned Search phase (0) ended: time spent (110803), best score (0hard/-112980medium/0soft), score calculation speed (2377/sec), step total (0), partCount (7), runnablePartThreadLimit (14).

Interestingly enough, if I replace the construction phase with exhaustive search, the best score from the partition phase carries on and can thus be persisted. I'm wondering if I'm missing something fundamental about the construction phase?

Upvotes: 1

Views: 78

Answers (1)

Geoffrey De Smet
Geoffrey De Smet

Reputation: 27312

This might be caused by this issue with overconstrained planning which is fixed in Timefold 0.9.39 and 0.8.39.

Does it reproduce after you upgrade from OptaPlanner to Timefold (how to here)?

Upvotes: 1

Related Questions