0
<constructionHeuristic>
        <constructionHeuristicType>FIRST_FIT</constructionHeuristicType>
    </constructionHeuristic>
    <localSearch>
        <localSearchType>TABU_SEARCH</localSearchType>
    </localSearch>

Earlier, I was using the solver.xml file to configure the solver. However, now there are some methods in timefold that allow us to configure the solver using Java. How can I incorporate the configuration into the code below?

`var solverConfig= new SolverConfig()
                    .withSolutionClass(EventBinAssignation.class)
                    .withEntityClasses(Event.class)
                    .withEntityClasses(BinAvailablity.class)
                    .withConstraintProviderClass(OptaPlannerConstraintProvider.class)

                    // The solver runs only for 5 seconds on this small dataset.
                    // It's recommended to run for at least 5 minutes ("5m") otherwise.
                    .withTerminationSpentLimit(Duration.ofSeconds(5));



            SolverFactory<EventBinAssignation> solverFactory = SolverFactory.create(solverConfig); 
`

I am not able to find method so that i can add configuration of local-search and construction-heuristic

0 Answers0