diff --git a/src/main/java/edu/kit/provideq/toolbox/knapsack/KnapsackConfiguration.java b/src/main/java/edu/kit/provideq/toolbox/knapsack/KnapsackConfiguration.java index 1e83fe89..db3ac66b 100644 --- a/src/main/java/edu/kit/provideq/toolbox/knapsack/KnapsackConfiguration.java +++ b/src/main/java/edu/kit/provideq/toolbox/knapsack/KnapsackConfiguration.java @@ -19,8 +19,9 @@ public class KnapsackConfiguration { /** * An optimization problem: - * For given items each with a weight and value, determine which items are part of a collection where - * the total weight is less than or equal to a given limit and the sum of values is as large as possible. + * For given items each with a weight and value, determine which items are part of a collection + * where the total weight is less than or equal to a given limit + * and the sum of values is as large as possible. */ public static final ProblemType KNAPSACK = new ProblemType<>( "knapsack", @@ -45,8 +46,8 @@ private Set> loadExampleProblems( ) { try { var problemInputStream = Objects.requireNonNull( - getClass().getResourceAsStream("5-items.txt"), - "5-items example for Knapsack is unavailable!" + getClass().getResourceAsStream("10-items.txt"), + "10-items example for Knapsack is unavailable!" ); var problem = new Problem<>(KNAPSACK); problem.setInput(resourceProvider.readStream(problemInputStream)); diff --git a/src/main/resources/edu/kit/provideq/toolbox/knapsack/10-items.txt b/src/main/resources/edu/kit/provideq/toolbox/knapsack/10-items.txt new file mode 100644 index 00000000..08260224 --- /dev/null +++ b/src/main/resources/edu/kit/provideq/toolbox/knapsack/10-items.txt @@ -0,0 +1,12 @@ +10 +1 505 23 +2 352 26 +3 458 20 +4 220 18 +5 354 32 +6 414 27 +7 498 29 +8 545 26 +9 473 30 +10 543 27 +99 \ No newline at end of file diff --git a/src/main/resources/edu/kit/provideq/toolbox/knapsack/5-items.txt b/src/main/resources/edu/kit/provideq/toolbox/knapsack/5-items.txt deleted file mode 100644 index 14cb8470..00000000 --- a/src/main/resources/edu/kit/provideq/toolbox/knapsack/5-items.txt +++ /dev/null @@ -1,7 +0,0 @@ -5 -1 3 4 -2 2 2 -3 4 1 -4 5 2 -5 1 3 -11 \ No newline at end of file