Skip to content

Commit 029754b

Browse files
committed
chore: temporally disabling the mixed model
1 parent 0ef89e6 commit 029754b

6 files changed

Lines changed: 23 additions & 1 deletion

File tree

benchmark/src/main/resources/benchmark.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@
674674
<xs:element minOccurs="0" name="valueSorterManner" type="tns:valueSorterManner"/>
675675

676676

677-
<xs:choice minOccurs="0">
677+
<xs:choice maxOccurs="unbounded" minOccurs="0">
678678

679679

680680
<xs:element name="queuedEntityPlacer" type="tns:queuedEntityPlacerConfig"/>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ public static <Solution_> SolutionDescriptor<Solution_> buildSolutionDescriptor(
166166
solutionDescriptor.constraintWeightSupplier.initialize(solutionDescriptor,
167167
descriptorPolicy.getMemberAccessorFactory(), descriptorPolicy.getDomainAccessType());
168168
}
169+
// Temporarily disabling the mixed-model feature
170+
if (solutionDescriptor.hasBothBasicAndListVariables()) {
171+
throw new IllegalStateException(
172+
"The mixed model is currently unavailable for general use. Please modify the model to utilize either a list variable or only basic variables.");
173+
}
169174
return solutionDescriptor;
170175
}
171176

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

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

50+
import org.junit.jupiter.api.Disabled;
5051
import org.junit.jupiter.api.Test;
5152

5253
import io.micrometer.core.instrument.Metrics;
@@ -348,6 +349,7 @@ void constructionHeuristicAllocateToValueFromQueue() {
348349
.filter(e -> e.getValue() == null)).isEmpty();
349350
}
350351

352+
@Disabled("The mixed model is currently unavailable for general use")
351353
@Test
352354
void failMixedModelDefaultConfiguration() {
353355
var solverConfig = PlannerTestUtils

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
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;
2324
import org.junit.jupiter.api.Test;
2425
import org.junit.jupiter.params.ParameterizedTest;
2526
import org.junit.jupiter.params.provider.Arguments;
@@ -43,6 +44,7 @@ void buildMoveSelector() {
4344
assertThat(selector.isSelectReversingMoveToo()).isTrue();
4445
}
4546

47+
@Disabled("The mixed model is currently unavailable for general use")
4648
@Test
4749
void buildMoveSelectorMultiEntity() {
4850
var config = new SubListChangeMoveSelectorConfig();

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
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;
1920
import org.junit.jupiter.api.Test;
2021
import org.junit.jupiter.params.ParameterizedTest;
2122
import org.junit.jupiter.params.provider.Arguments;
@@ -40,6 +41,7 @@ void buildBaseMoveSelector() {
4041
assertThat(selector.isSelectReversingMoveToo()).isTrue();
4142
}
4243

44+
@Disabled("The mixed model is currently unavailable for general use")
4345
@Test
4446
void buildMoveSelectorMultiEntity() {
4547
var config = new SubListSwapMoveSelectorConfig();

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
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;
149150
import org.junit.jupiter.api.Test;
150151
import org.junit.jupiter.api.Timeout;
151152
import org.junit.jupiter.api.extension.ExtendWith;
@@ -1656,6 +1657,7 @@ private static List<MoveSelectorConfig> generateMovesForMultiEntity() {
16561657
return allMoveSelectionConfigList;
16571658
}
16581659

1660+
@Disabled("The mixed model is currently unavailable for general use")
16591661
@Test
16601662
void solveMixedModel() {
16611663
// Same size for both list and basic variables
@@ -1667,6 +1669,7 @@ void solveMixedModel() {
16671669
executeSolveMixedModel(3, 2, 2);
16681670
}
16691671

1672+
@Disabled("The mixed model is currently unavailable for general use")
16701673
@Test
16711674
void solveMultiEntityMixedModel() {
16721675
// Same size for both list and basic variables
@@ -1749,6 +1752,7 @@ void executeSolveMultiEntityMixedModel(int entitySize, int valueSize, int otherV
17491752
}
17501753
}
17511754

1755+
@Disabled("The mixed model is currently unavailable for general use")
17521756
@Test
17531757
void solveMixedModelCustomMove() {
17541758
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1773,6 +1777,7 @@ void solveMixedModelCustomMove() {
17731777
.isEmpty();
17741778
}
17751779

1780+
@Disabled("The mixed model is currently unavailable for general use")
17761781
@Test
17771782
void solveMixedModelCustomPhase() {
17781783
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1805,6 +1810,7 @@ private static List<Pair<EntitySorterManner, ValueSorterManner>> getSortMannerLi
18051810
return sortMannerList;
18061811
}
18071812

1813+
@Disabled("The mixed model is currently unavailable for general use")
18081814
@ParameterizedTest
18091815
@MethodSource("getSortMannerList")
18101816
void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> sorterManner) {
@@ -1838,6 +1844,7 @@ void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> s
18381844
.isEmpty();
18391845
}
18401846

1847+
@Disabled("The mixed model is currently unavailable for general use")
18411848
@Test
18421849
void solvePinnedMixedModel() {
18431850
// We don't enable the LS because we want to ensure the pinned entity remains uninitialized
@@ -1861,6 +1868,7 @@ void solvePinnedMixedModel() {
18611868
assertThat(solution.getEntityList().get(0).getValueList()).isEmpty();
18621869
}
18631870

1871+
@Disabled("The mixed model is currently unavailable for general use")
18641872
@Test
18651873
void solveUnassignedMixedModel() {
18661874
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1887,6 +1895,7 @@ void solveUnassignedMixedModel() {
18871895
.hasSize(2);
18881896
}
18891897

1898+
@Disabled("The mixed model is currently unavailable for general use")
18901899
@Test
18911900
void solvePinnedAndUnassignedMixedModel() {
18921901
var solverConfig = PlannerTestUtils.buildSolverConfig(
@@ -1974,6 +1983,7 @@ private static List<MoveSelectorConfig> generateMovesForMixedModel() {
19741983
return allMoveSelectionConfigList;
19751984
}
19761985

1986+
@Disabled("The mixed model is currently unavailable for general use")
19771987
@ParameterizedTest
19781988
@MethodSource("generateMovesForMixedModel")
19791989
void solveMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {
@@ -2036,6 +2046,7 @@ private static List<MoveSelectorConfig> generateMovesForMultiEntityMixedModel()
20362046
return allMoveSelectionConfigList;
20372047
}
20382048

2049+
@Disabled("The mixed model is currently unavailable for general use")
20392050
@ParameterizedTest
20402051
@MethodSource("generateMovesForMultiEntityMixedModel")
20412052
void solveMultiEntityMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {

0 commit comments

Comments
 (0)