From ed6564a5da95ec6930ff6b50d0f067f63b4ae97a Mon Sep 17 00:00:00 2001 From: Thomas Weise Date: Mon, 6 Jul 2020 15:52:22 +0800 Subject: [PATCH] minor update of setups used in jssp experiments --- README.md | 4 +- pom.xml | 2 +- .../examples/jssp/EJSSPExperimentStage.java | 81 +++---------------- 3 files changed, 12 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index f287c9d..288b767 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ First, you need to add the following repository, which is a repository that can ``` Than you can add the dependency on our `aitoa-code` repository into your `dependencies` section. -Here, `0.8.58` is the current version of `aitoa-code`. +Here, `0.8.59` is the current version of `aitoa-code`. Notice that you may have more dependencies in your `dependencies` section, say on `junit`, but here I just put the one for `aitoa-code` as example. ```xml @@ -53,7 +53,7 @@ Notice that you may have more dependencies in your `dependencies` section, say o com.github.thomasWeise aitoa-code - 0.8.58 + 0.8.59 ``` diff --git a/pom.xml b/pom.xml index 65c3051..0171042 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ aitoa aitoa-code - 0.8.58 + 0.8.59 jar aitoa-code Example Source Codes from the Book "Introduction to Optimization Algorithms" diff --git a/src/main/java/aitoa/examples/jssp/EJSSPExperimentStage.java b/src/main/java/aitoa/examples/jssp/EJSSPExperimentStage.java index 9d21c06..5f42c80 100644 --- a/src/main/java/aitoa/examples/jssp/EJSSPExperimentStage.java +++ b/src/main/java/aitoa/examples/jssp/EJSSPExperimentStage.java @@ -544,7 +544,8 @@ public void configureBuilderForProblem( }, /** - * the twelfth stage: estimation of distribution algorithm + * the twelfth stage: estimation of distribution algorithm with + * local search */ STAGE_12 { @@ -566,83 +567,19 @@ public void configureBuilderForProblem( IMetaheuristic>> list = new ArrayList<>(); - for (final int muShift : new int[] { 4, 6, 7, 8, 9, 10, - 12 }) { - final int mu = 1 << muShift; - for (int lambdaShift = 5; lambdaShift <= 18; - lambdaShift++) { - final int lambda = 1 << lambdaShift; + for (int lambdaShift = 2; lambdaShift <= 6; + lambdaShift++) { + final int lambda = 1 << lambdaShift; + for (final int mu : new int[] { 2, 4, 8, 16 }) { if (mu < lambda) { - list.add(() -> new EDA<>(mu, lambda, // - new JSSPUMDAModelP(problem.instance))); - } - } - } - - for (final int mu : new int[] { 2, 3, 4, 7, 10 }) { - for (int lambdaShift = 4; lambdaShift <= 8; - lambdaShift++) { - final int lambda = 1 << lambdaShift; - if (mu < lambda) { - list.add(() -> new EDAWithClearing<>(mu, lambda, // - new JSSPUMDAModelP(problem.instance))); + list.add(() -> new HybridEDAWithClearing<>(mu, + lambda, Integer.MAX_VALUE, // + new JSSPUMDAModel(problem.instance))); } } } - return list.stream(); } - }, - - /** - * the thirteenth stage: estimation of distribution algorithm - * with local search - */ - STAGE_13 { - - /** - * Get a stream of algorithm suppliers for a given problem - * - * @param problem - * the problem - * @return the stream of suppliers - */ - @Override - public - Stream>> - getAlgorithms(// - final JSSPMakespanObjectiveFunction problem) { - - return Stream.of(// - () -> new HybridEDAWithClearing<>(2, 16, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(4, 16, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(8, 16, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(2, 32, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(4, 32, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(8, 32, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(16, 32, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(4, 8, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance)), // - () -> new HybridEDAWithClearing<>(2, 4, - Integer.MAX_VALUE, // - new JSSPUMDAModel(problem.instance))); - } /** * Configure the black box process builder for the given