How to get scoreCalculationSpeed and bestScore after get the best score

20 views
Skip to first unread message

Vicent Tony

unread,
Feb 9, 2022, 7:17:11 AM2/9/22
to OptaPlanner development
Hi Guys,
      I want to get scoreCalculationSpeed and bestScore after get the best score, but I can only get bestSoution info in current version.  I have to overide SolverFactory and DefaultSover to get that,  has anyone  known any other solution?   


The log text are as below:  
Solving ended: time spent (600001), best score ([0/0/0/0/0/0/0]hard/[-12/0/-17525/-86]soft), score calculation speed (25686/sec), phase total (2), environment mode (REPRODUCIBLE), move thread count (14).

01-getSpeedAndScoreInfo.png
02-getTimeScoreInfo.png


Vicent Tony

unread,
Feb 9, 2022, 7:25:27 AM2/9/22
to OptaPlanner development
WechatIMG12.png

Lukáš Petrovický

unread,
Feb 14, 2022, 3:37:28 AM2/14/22
to optapla...@googlegroups.com
Vicent,

first of all: please do not use OptaPlanner's internal classes, such as DefaultSolver. 
We make no guarantees on backwards compatibility there and you could find that in the next release, that class has changed significantly.

As for best score, best score is the score of the best solution. 
If you know the best solution, you know the best score, as score is part of the best solution.

As for score calculation speed, that is internal information and at this point in time, we have no intention in making it available via public API.
However, if you hook into our metrics via the Micrometer API (https://www.optaplanner.org/docs/optaplanner/latest/planner-configuration/planner-configuration.html#monitoring), you should be able to get to this information.

Regards!

--
You received this message because you are subscribed to the Google Groups "OptaPlanner development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optaplanner-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/optaplanner-dev/f5eba1ee-eb7d-4668-8f98-655077f86a0fn%40googlegroups.com.


--

Lukáš Petrovický

He/Him/His

Principal Software Engineer, Business Automation

lukas.pe...@redhat.com    IM: triceo/lpetrovi

My work week is Monday to Thursday.

Vicent Tony

unread,
Mar 6, 2022, 1:06:57 AM3/6/22
to optapla...@googlegroups.com
I got it, thx

Lukáš Petrovický <lpet...@redhat.com> 于2022年2月14日周一 16:37写道:
Reply all
Reply to author
Forward
0 new messages