Skip to content

Commit f244865

Browse files
committed
Revert "chore: temporally disabling the mixed model"
This reverts commit 64a1115.
1 parent 680689e commit f244865

5 files changed

Lines changed: 0 additions & 33 deletions

File tree

core/src/main/java/ai/timefold/solver/core/impl/domain/solution/descriptor/SolutionDescriptor.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ public static <Solution_> SolutionDescriptor<Solution_> buildSolutionDescriptor(
166166
solutionDescriptor.constraintWeightSupplier.initialize(solutionDescriptor,
167167
descriptorPolicy.getMemberAccessorFactory(), descriptorPolicy.getDomainAccessType());
168168
}
169-
// Temporally disabling the mixed model
170-
if (solutionDescriptor.hasBothBasicAndListVariables()) {
171-
throw new IllegalStateException("Combining list variable and basic variables is currently not supported.");
172-
}
173169
return solutionDescriptor;
174170
}
175171

core/src/test/java/ai/timefold/solver/core/impl/constructionheuristic/DefaultConstructionHeuristicPhaseTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import ai.timefold.solver.core.testutil.AbstractMeterTest;
4848
import ai.timefold.solver.core.testutil.PlannerTestUtils;
4949

50-
import org.junit.jupiter.api.Disabled;
5150
import org.junit.jupiter.api.Test;
5251

5352
import io.micrometer.core.instrument.Metrics;
@@ -349,7 +348,6 @@ void constructionHeuristicAllocateToValueFromQueue() {
349348
.filter(e -> e.getValue() == null)).isEmpty();
350349
}
351350

352-
@Disabled("The mixed model is currently unavailable for general use")
353351
@Test
354352
void failMixedModelDefaultConfiguration() {
355353
var solverConfig = PlannerTestUtils

core/src/test/java/ai/timefold/solver/core/impl/heuristic/selector/move/generic/list/SubListChangeMoveSelectorFactoryTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import ai.timefold.solver.core.testdomain.list.TestdataListSolution;
2121
import ai.timefold.solver.core.testdomain.mixed.multientity.TestdataMixedMultiEntitySolution;
2222

23-
import org.junit.jupiter.api.Disabled;
2423
import org.junit.jupiter.api.Test;
2524
import org.junit.jupiter.params.ParameterizedTest;
2625
import org.junit.jupiter.params.provider.Arguments;
@@ -44,7 +43,6 @@ void buildMoveSelector() {
4443
assertThat(selector.isSelectReversingMoveToo()).isTrue();
4544
}
4645

47-
@Disabled("The mixed model is currently unavailable for general use")
4846
@Test
4947
void buildMoveSelectorMultiEntity() {
5048
var config = new SubListChangeMoveSelectorConfig();

core/src/test/java/ai/timefold/solver/core/impl/heuristic/selector/move/generic/list/SubListSwapMoveSelectorFactoryTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import ai.timefold.solver.core.testdomain.list.TestdataListSolution;
1717
import ai.timefold.solver.core.testdomain.mixed.multientity.TestdataMixedMultiEntitySolution;
1818

19-
import org.junit.jupiter.api.Disabled;
2019
import org.junit.jupiter.api.Test;
2120
import org.junit.jupiter.params.ParameterizedTest;
2221
import org.junit.jupiter.params.provider.Arguments;
@@ -41,7 +40,6 @@ void buildBaseMoveSelector() {
4140
assertThat(selector.isSelectReversingMoveToo()).isTrue();
4241
}
4342

44-
@Disabled("The mixed model is currently unavailable for general use")
4543
@Test
4644
void buildMoveSelectorMultiEntity() {
4745
var config = new SubListSwapMoveSelectorConfig();

core/src/test/java/ai/timefold/solver/core/impl/solver/DefaultSolverTest.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@
146146
import org.assertj.core.api.junit.jupiter.SoftAssertionsExtension;
147147
import org.jspecify.annotations.NonNull;
148148
import org.jspecify.annotations.Nullable;
149-
import org.junit.jupiter.api.Disabled;
150149
import org.junit.jupiter.api.Test;
151150
import org.junit.jupiter.api.Timeout;
152151
import org.junit.jupiter.api.extension.ExtendWith;
@@ -1657,19 +1656,6 @@ private static List<MoveSelectorConfig> generateMovesForMultiEntity() {
16571656
return allMoveSelectionConfigList;
16581657
}
16591658

1660-
@Test
1661-
void failMixedModel() {
1662-
var solverConfig = PlannerTestUtils
1663-
.buildSolverConfig(TestdataMixedSolution.class, TestdataMixedEntity.class, TestdataMixedValue.class,
1664-
TestdataMixedOtherValue.class)
1665-
.withPreviewFeature(DECLARATIVE_SHADOW_VARIABLES);
1666-
1667-
assertThatCode(() -> PlannerTestUtils.solve(solverConfig, new TestdataSolution("s1")))
1668-
.hasMessageContaining(
1669-
"Combining list variable and basic variables is currently not supported");
1670-
}
1671-
1672-
@Disabled("The mixed model is currently unavailable for general use")
16731659
@Test
16741660
void solveMixedModel() {
16751661
// Same size for both list and basic variables
@@ -1681,7 +1667,6 @@ void solveMixedModel() {
16811667
executeSolveMixedModel(3, 2, 2);
16821668
}
16831669

1684-
@Disabled("The mixed model is currently unavailable for general use")
16851670
@Test
16861671
void solveMultiEntityMixedModel() {
16871672
// Same size for both list and basic variables
@@ -1764,7 +1749,6 @@ void executeSolveMultiEntityMixedModel(int entitySize, int valueSize, int otherV
17641749
}
17651750
}
17661751

1767-
@Disabled("The mixed model is currently unavailable for general use")
17681752
@Test
17691753
void solveMixedModelCustomMove() {
17701754
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1789,7 +1773,6 @@ void solveMixedModelCustomMove() {
17891773
.isEmpty();
17901774
}
17911775

1792-
@Disabled("The mixed model is currently unavailable for general use")
17931776
@Test
17941777
void solveMixedModelCustomPhase() {
17951778
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1822,7 +1805,6 @@ private static List<Pair<EntitySorterManner, ValueSorterManner>> getSortMannerLi
18221805
return sortMannerList;
18231806
}
18241807

1825-
@Disabled("The mixed model is currently unavailable for general use")
18261808
@ParameterizedTest
18271809
@MethodSource("getSortMannerList")
18281810
void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> sorterManner) {
@@ -1856,7 +1838,6 @@ void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> s
18561838
.isEmpty();
18571839
}
18581840

1859-
@Disabled("The mixed model is currently unavailable for general use")
18601841
@Test
18611842
void solvePinnedMixedModel() {
18621843
// We don't enable the LS because we want to ensure the pinned entity remains uninitialized
@@ -1880,7 +1861,6 @@ void solvePinnedMixedModel() {
18801861
assertThat(solution.getEntityList().get(0).getValueList()).isEmpty();
18811862
}
18821863

1883-
@Disabled("The mixed model is currently unavailable for general use")
18841864
@Test
18851865
void solveUnassignedMixedModel() {
18861866
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1907,7 +1887,6 @@ void solveUnassignedMixedModel() {
19071887
.hasSize(2);
19081888
}
19091889

1910-
@Disabled("The mixed model is currently unavailable for general use")
19111890
@Test
19121891
void solvePinnedAndUnassignedMixedModel() {
19131892
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1995,7 +1974,6 @@ private static List<MoveSelectorConfig> generateMovesForMixedModel() {
19951974
return allMoveSelectionConfigList;
19961975
}
19971976

1998-
@Disabled("The mixed model is currently unavailable for general use")
19991977
@ParameterizedTest
20001978
@MethodSource("generateMovesForMixedModel")
20011979
void solveMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {
@@ -2058,7 +2036,6 @@ private static List<MoveSelectorConfig> generateMovesForMultiEntityMixedModel()
20582036
return allMoveSelectionConfigList;
20592037
}
20602038

2061-
@Disabled("The mixed model is currently unavailable for general use")
20622039
@ParameterizedTest
20632040
@MethodSource("generateMovesForMultiEntityMixedModel")
20642041
void solveMultiEntityMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {

0 commit comments

Comments
 (0)