Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ public static <Solution_> SolutionDescriptor<Solution_> buildSolutionDescriptor(
solutionDescriptor.constraintWeightSupplier.initialize(solutionDescriptor,
descriptorPolicy.getMemberAccessorFactory(), descriptorPolicy.getDomainAccessType());
}
// Temporally disabling the mixed model
if (solutionDescriptor.hasBothBasicAndListVariables()) {
throw new IllegalStateException("Combining list variable and basic variables is currently not supported.");
}
return solutionDescriptor;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import ai.timefold.solver.core.testutil.AbstractMeterTest;
import ai.timefold.solver.core.testutil.PlannerTestUtils;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

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

@Disabled("The mixed model is currently unavailable for general use")
@Test
void failMixedModelDefaultConfiguration() {
var solverConfig = PlannerTestUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import ai.timefold.solver.core.testdomain.list.TestdataListSolution;
import ai.timefold.solver.core.testdomain.mixed.multientity.TestdataMixedMultiEntitySolution;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand All @@ -43,6 +44,7 @@ void buildMoveSelector() {
assertThat(selector.isSelectReversingMoveToo()).isTrue();
}

@Disabled("The mixed model is currently unavailable for general use")
@Test
void buildMoveSelectorMultiEntity() {
var config = new SubListChangeMoveSelectorConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import ai.timefold.solver.core.testdomain.list.TestdataListSolution;
import ai.timefold.solver.core.testdomain.mixed.multientity.TestdataMixedMultiEntitySolution;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand All @@ -40,6 +41,7 @@ void buildBaseMoveSelector() {
assertThat(selector.isSelectReversingMoveToo()).isTrue();
}

@Disabled("The mixed model is currently unavailable for general use")
@Test
void buildMoveSelectorMultiEntity() {
var config = new SubListSwapMoveSelectorConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
import org.assertj.core.api.junit.jupiter.SoftAssertionsExtension;
import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -1656,6 +1657,19 @@ private static List<MoveSelectorConfig> generateMovesForMultiEntity() {
return allMoveSelectionConfigList;
}

@Test
void failMixedModel() {
var solverConfig = PlannerTestUtils
.buildSolverConfig(TestdataMixedSolution.class, TestdataMixedEntity.class, TestdataMixedValue.class,
TestdataMixedOtherValue.class)
.withPreviewFeature(DECLARATIVE_SHADOW_VARIABLES);

assertThatCode(() -> PlannerTestUtils.solve(solverConfig, new TestdataSolution("s1")))
.hasMessageContaining(
"Combining list variable and basic variables is currently not supported");
}

@Disabled("The mixed model is currently unavailable for general use")
@Test
void solveMixedModel() {
// Same size for both list and basic variables
Expand All @@ -1667,6 +1681,7 @@ void solveMixedModel() {
executeSolveMixedModel(3, 2, 2);
}

@Disabled("The mixed model is currently unavailable for general use")
@Test
void solveMultiEntityMixedModel() {
// Same size for both list and basic variables
Expand Down Expand Up @@ -1749,6 +1764,7 @@ void executeSolveMultiEntityMixedModel(int entitySize, int valueSize, int otherV
}
}

@Disabled("The mixed model is currently unavailable for general use")
@Test
void solveMixedModelCustomMove() {
var solverConfig = PlannerTestUtils.buildSolverConfig(
Expand All @@ -1773,6 +1789,7 @@ void solveMixedModelCustomMove() {
.isEmpty();
}

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

@Disabled("The mixed model is currently unavailable for general use")
@ParameterizedTest
@MethodSource("getSortMannerList")
void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> sorterManner) {
Expand Down Expand Up @@ -1838,6 +1856,7 @@ void solveMixedModelWithSortManner(Pair<EntitySorterManner, ValueSorterManner> s
.isEmpty();
}

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

@Disabled("The mixed model is currently unavailable for general use")
@Test
void solveUnassignedMixedModel() {
var solverConfig = PlannerTestUtils.buildSolverConfig(
Expand All @@ -1887,6 +1907,7 @@ void solveUnassignedMixedModel() {
.hasSize(2);
}

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

@Disabled("The mixed model is currently unavailable for general use")
@ParameterizedTest
@MethodSource("generateMovesForMixedModel")
void solveMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {
Expand Down Expand Up @@ -2036,6 +2058,7 @@ private static List<MoveSelectorConfig> generateMovesForMultiEntityMixedModel()
return allMoveSelectionConfigList;
}

@Disabled("The mixed model is currently unavailable for general use")
@ParameterizedTest
@MethodSource("generateMovesForMultiEntityMixedModel")
void solveMultiEntityMoveConfigMixedModel(MoveSelectorConfig moveSelectionConfig) {
Expand Down
Loading