33import static ai .timefold .solver .core .config .heuristic .selector .entity .EntitySorterManner .DECREASING_DIFFICULTY ;
44import static ai .timefold .solver .core .config .heuristic .selector .entity .EntitySorterManner .DECREASING_DIFFICULTY_IF_AVAILABLE ;
55import static ai .timefold .solver .core .config .solver .PreviewFeature .DECLARATIVE_SHADOW_VARIABLES ;
6+ import static ai .timefold .solver .core .config .solver .PreviewFeature .MIXED_MODEL ;
67import static org .assertj .core .api .Assertions .assertThat ;
78import static org .assertj .core .api .Assertions .assertThatCode ;
89import static org .assertj .core .api .Assertions .fail ;
@@ -1648,7 +1649,7 @@ void solveMixedModel() {
16481649 var solverConfig = PlannerTestUtils .buildSolverConfig (
16491650 TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
16501651 TestdataMixedOtherValue .class )
1651- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1652+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
16521653 .withPhases (new ConstructionHeuristicPhaseConfig (),
16531654 new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
16541655 .withEasyScoreCalculatorClass (TestdataMixedEasyScoreCalculator .class );
@@ -1690,7 +1691,7 @@ void solveMixedModelCustomMove() {
16901691 var solverConfig = PlannerTestUtils .buildSolverConfig (
16911692 TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
16921693 TestdataMixedOtherValue .class )
1693- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1694+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
16941695 .withPhases (new ConstructionHeuristicPhaseConfig (),
16951696 new LocalSearchPhaseConfig ()
16961697 .withMoveSelectorConfig (new MoveIteratorFactoryConfig ()
@@ -1712,7 +1713,7 @@ void solveMixedModelCustomPhase() {
17121713 var solverConfig = PlannerTestUtils .buildSolverConfig (
17131714 TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
17141715 TestdataMixedOtherValue .class )
1715- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1716+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
17161717 .withPhases (new ConstructionHeuristicPhaseConfig (),
17171718 new CustomPhaseConfig ()
17181719 .withCustomPhaseCommands (new MixedCustomPhase ())
@@ -1743,7 +1744,7 @@ void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> s
17431744 var solverConfig = PlannerTestUtils .buildSolverConfig (
17441745 TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
17451746 TestdataMixedOtherValue .class )
1746- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1747+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
17471748 .withPhases (new ConstructionHeuristicPhaseConfig (),
17481749 new LocalSearchPhaseConfig ()
17491750 .withMoveSelectorConfig (
@@ -1774,7 +1775,7 @@ void solvePinnedMixedModel() {
17741775 var solverConfig = PlannerTestUtils .buildSolverConfig (
17751776 TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
17761777 TestdataMixedOtherValue .class )
1777- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1778+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
17781779 .withPhases (new ConstructionHeuristicPhaseConfig ())
17791780 .withEasyScoreCalculatorClass (TestdataMixedEasyScoreCalculator .class );
17801781
@@ -1793,6 +1794,7 @@ void solvePinnedMixedModel() {
17931794 void solveUnassignedMixedModel () {
17941795 var solverConfig = PlannerTestUtils .buildSolverConfig (
17951796 TestdataUnassignedMixedSolution .class , TestdataUnassignedMixedEntity .class )
1797+ .withPreviewFeature (MIXED_MODEL )
17961798 .withPhases (new ConstructionHeuristicPhaseConfig (),
17971799 new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
17981800 .withEasyScoreCalculatorClass (TestdataUnassignedMixedEasyScoreCalculator .class );
@@ -1819,6 +1821,7 @@ void solveUnassignedMixedModel() {
18191821 void solvePinnedAndUnassignedMixedModel () {
18201822 var solverConfig = PlannerTestUtils .buildSolverConfig (
18211823 TestdataUnassignedMixedSolution .class , TestdataUnassignedMixedEntity .class )
1824+ .withPreviewFeature (MIXED_MODEL )
18221825 .withPhases (new ConstructionHeuristicPhaseConfig (),
18231826 new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
18241827 .withEasyScoreCalculatorClass (TestdataUnassignedMixedEasyScoreCalculator .class );
@@ -1881,7 +1884,7 @@ void solveCustomConfigMixedModel() {
18811884 var solverConfig = PlannerTestUtils .buildSolverConfig (
18821885 TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
18831886 TestdataMixedOtherValue .class )
1884- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1887+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
18851888 .withPhases (new ConstructionHeuristicPhaseConfig ()
18861889 .withEntityPlacerConfigList (valuePlacerConfig , entityPlacerConfig ),
18871890 new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
@@ -1943,7 +1946,7 @@ void solveMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {
19431946 var solverConfig = PlannerTestUtils .buildSolverConfig (
19441947 TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
19451948 TestdataMixedOtherValue .class )
1946- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1949+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
19471950 .withPhases (new ConstructionHeuristicPhaseConfig (), localSearchConfig )
19481951 .withEasyScoreCalculatorClass (TestdataMixedEasyScoreCalculator .class );
19491952
@@ -2016,6 +2019,7 @@ void solveMultiEntityMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig
20162019 var solverConfig = PlannerTestUtils .buildSolverConfig (
20172020 TestdataMixedMultiEntitySolution .class , TestdataMixedMultiEntityFirstEntity .class ,
20182021 TestdataMixedMultiEntitySecondEntity .class )
2022+ .withPreviewFeature (MIXED_MODEL )
20192023 .withPhases (constructionHeuristicConfig , localSearchConfig )
20202024 .withEasyScoreCalculatorClass (TestdataMixedEntityEasyScoreCalculator .class );
20212025
0 commit comments