Rukawaa11
Rukawaa11

Reputation: 41

How to use Optaplanner to score only an existing solution (ordered data set) instead of looking for a new solution?

The problem I want to solve is to evaluate whether the input plan is reasonable, so when I input an ordered data set, I hope Optaplanner can directly score the plan based on the constraints I configured, and let me know which constraints the current plan violates.

The current situation is that I have completed the modeling part by referring to the tsp example through Optaplanner, but when I input the data set, the result is a new solution (plan ordering), and the scores shown are also for this new solution.

Can I just score my input data instead of solving it again? I only need to know the constraint satisfaction of the input data. Looking forward to your answer, thank you very much!

This is the input data: enter image description here

This is the output and score: enter image description here enter image description here

Upvotes: 0

Views: 160

Answers (1)

Yes, you can. See OptaPlanner documentation for ScoreManager.

Upvotes: 1

Related Questions