Update score after field update

18 views
Skip to first unread message

Patrick Ondreovici

unread,
Dec 9, 2022, 6:46:39 AM12/9/22
to OptaPlanner development
Hi,
I have updated a normal field from a planning entity with ProblemChange, but the score remains the same. How can i update the score, after a problemChange ?

Radovan Synek

unread,
Dec 9, 2022, 7:02:37 AM12/9/22
to optapla...@googlegroups.com
Hello,

to update a normal field (not a planning variable field) of a planning entity, use the ProblemChangeDirector#changeProblemProperty [1] in your ProblemChange implementation. The next solution OptaPlanner will produce contains this change and the score is updated accordingly.

If that's not the case, please share your ProblemChange implementation, perhaps via StackOverflow (syntax highlighting helps) [2].


Regards,
Radek

On Fri, Dec 9, 2022 at 12:46 PM Patrick Ondreovici <ondre...@gmail.com> wrote:
Hi,
I have updated a normal field from a planning entity with ProblemChange, but the score remains the same. How can i update the score, after a problemChange ?

--
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/46d82c05-fc06-4e13-975c-6c1e57689b5cn%40googlegroups.com.


--

Radovan Synek

Principal Software Engineer, Business Automation

Red Hat EMEA

Brno, Czech Republic

Reply all
Reply to author
Forward
0 new messages