3
3
import static ai .timefold .solver .core .config .heuristic .selector .entity .EntitySorterManner .DECREASING_DIFFICULTY ;
4
4
import static ai .timefold .solver .core .config .heuristic .selector .entity .EntitySorterManner .DECREASING_DIFFICULTY_IF_AVAILABLE ;
5
5
import static ai .timefold .solver .core .config .solver .PreviewFeature .DECLARATIVE_SHADOW_VARIABLES ;
6
+ import static ai .timefold .solver .core .config .solver .PreviewFeature .MIXED_MODEL ;
6
7
import static org .assertj .core .api .Assertions .assertThat ;
7
8
import static org .assertj .core .api .Assertions .assertThatCode ;
8
9
import static org .assertj .core .api .Assertions .fail ;
@@ -1648,7 +1649,7 @@ void solveMixedModel() {
1648
1649
var solverConfig = PlannerTestUtils .buildSolverConfig (
1649
1650
TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
1650
1651
TestdataMixedOtherValue .class )
1651
- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1652
+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
1652
1653
.withPhases (new ConstructionHeuristicPhaseConfig (),
1653
1654
new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
1654
1655
.withEasyScoreCalculatorClass (TestdataMixedEasyScoreCalculator .class );
@@ -1690,7 +1691,7 @@ void solveMixedModelCustomMove() {
1690
1691
var solverConfig = PlannerTestUtils .buildSolverConfig (
1691
1692
TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
1692
1693
TestdataMixedOtherValue .class )
1693
- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1694
+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
1694
1695
.withPhases (new ConstructionHeuristicPhaseConfig (),
1695
1696
new LocalSearchPhaseConfig ()
1696
1697
.withMoveSelectorConfig (new MoveIteratorFactoryConfig ()
@@ -1712,7 +1713,7 @@ void solveMixedModelCustomPhase() {
1712
1713
var solverConfig = PlannerTestUtils .buildSolverConfig (
1713
1714
TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
1714
1715
TestdataMixedOtherValue .class )
1715
- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1716
+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
1716
1717
.withPhases (new ConstructionHeuristicPhaseConfig (),
1717
1718
new CustomPhaseConfig ()
1718
1719
.withCustomPhaseCommands (new MixedCustomPhase ())
@@ -1743,7 +1744,7 @@ void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> s
1743
1744
var solverConfig = PlannerTestUtils .buildSolverConfig (
1744
1745
TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
1745
1746
TestdataMixedOtherValue .class )
1746
- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1747
+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
1747
1748
.withPhases (new ConstructionHeuristicPhaseConfig (),
1748
1749
new LocalSearchPhaseConfig ()
1749
1750
.withMoveSelectorConfig (
@@ -1774,7 +1775,7 @@ void solvePinnedMixedModel() {
1774
1775
var solverConfig = PlannerTestUtils .buildSolverConfig (
1775
1776
TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
1776
1777
TestdataMixedOtherValue .class )
1777
- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1778
+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
1778
1779
.withPhases (new ConstructionHeuristicPhaseConfig ())
1779
1780
.withEasyScoreCalculatorClass (TestdataMixedEasyScoreCalculator .class );
1780
1781
@@ -1793,6 +1794,7 @@ void solvePinnedMixedModel() {
1793
1794
void solveUnassignedMixedModel () {
1794
1795
var solverConfig = PlannerTestUtils .buildSolverConfig (
1795
1796
TestdataUnassignedMixedSolution .class , TestdataUnassignedMixedEntity .class )
1797
+ .withPreviewFeature (MIXED_MODEL )
1796
1798
.withPhases (new ConstructionHeuristicPhaseConfig (),
1797
1799
new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
1798
1800
.withEasyScoreCalculatorClass (TestdataUnassignedMixedEasyScoreCalculator .class );
@@ -1819,6 +1821,7 @@ void solveUnassignedMixedModel() {
1819
1821
void solvePinnedAndUnassignedMixedModel () {
1820
1822
var solverConfig = PlannerTestUtils .buildSolverConfig (
1821
1823
TestdataUnassignedMixedSolution .class , TestdataUnassignedMixedEntity .class )
1824
+ .withPreviewFeature (MIXED_MODEL )
1822
1825
.withPhases (new ConstructionHeuristicPhaseConfig (),
1823
1826
new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
1824
1827
.withEasyScoreCalculatorClass (TestdataUnassignedMixedEasyScoreCalculator .class );
@@ -1881,7 +1884,7 @@ void solveCustomConfigMixedModel() {
1881
1884
var solverConfig = PlannerTestUtils .buildSolverConfig (
1882
1885
TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
1883
1886
TestdataMixedOtherValue .class )
1884
- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1887
+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
1885
1888
.withPhases (new ConstructionHeuristicPhaseConfig ()
1886
1889
.withEntityPlacerConfigList (valuePlacerConfig , entityPlacerConfig ),
1887
1890
new LocalSearchPhaseConfig ().withTerminationConfig (new TerminationConfig ().withStepCountLimit (16 )))
@@ -1943,7 +1946,7 @@ void solveMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {
1943
1946
var solverConfig = PlannerTestUtils .buildSolverConfig (
1944
1947
TestdataMixedSolution .class , TestdataMixedEntity .class , TestdataMixedValue .class ,
1945
1948
TestdataMixedOtherValue .class )
1946
- .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES )
1949
+ .withPreviewFeature (DECLARATIVE_SHADOW_VARIABLES , MIXED_MODEL )
1947
1950
.withPhases (new ConstructionHeuristicPhaseConfig (), localSearchConfig )
1948
1951
.withEasyScoreCalculatorClass (TestdataMixedEasyScoreCalculator .class );
1949
1952
@@ -2016,6 +2019,7 @@ void solveMultiEntityMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig
2016
2019
var solverConfig = PlannerTestUtils .buildSolverConfig (
2017
2020
TestdataMixedMultiEntitySolution .class , TestdataMixedMultiEntityFirstEntity .class ,
2018
2021
TestdataMixedMultiEntitySecondEntity .class )
2022
+ .withPreviewFeature (MIXED_MODEL )
2019
2023
.withPhases (constructionHeuristicConfig , localSearchConfig )
2020
2024
.withEasyScoreCalculatorClass (TestdataMixedEntityEasyScoreCalculator .class );
2021
2025
0 commit comments