Re: [optaplanner-dev] SolverManager: dynamic SolverConfig

31 views
Skip to first unread message

Geoffrey De Smet

unread,
Aug 12, 2022, 10:57:03 AM8/12/22
to optapla...@googlegroups.com

This is a common use case that we don't cover well. Please create a JIRA for it.

The more-or-less workaround is:

@Inject
SolverConfig solverConfig;

And then call solverConfig.copyConfig().withTerminationSpentLimit(...) before using it to create a SolverManager.

But the trouble is that you create a new SolverManager per request, while there really should be only one 1 SolverManager (= 1 thread pool) per app.

With kind regards,
Geoffrey De Smet

On 05/08/2022 10:38, 'Marius Giepz' via OptaPlanner development wrote:
Hi!
We created an Optaplanner service on Quarkus. A SolverManager gets injected into the REST resource. As we understand, the SolverManager is provided by the Quarkus extension and is a Singleton. However we need to enable the user/client to configure the termination time on a per instance basis.
Is that possible somehow?

best regards,
Marius
--
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/969e2460-d287-48b0-b0f4-570ce936adcbn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages