Skip to content

Commit

Permalink
minor update of setups used in jssp experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasWeise committed Jul 6, 2020
1 parent ed86fa9 commit ed6564a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 75 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ 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
<dependencies>
<dependency>
<groupId>com.github.thomasWeise</groupId>
<artifactId>aitoa-code</artifactId>
<version>0.8.58</version>
<version>0.8.59</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>aitoa</groupId>
<artifactId>aitoa-code</artifactId>
<version>0.8.58</version>
<version>0.8.59</version>
<packaging>jar</packaging>
<name>aitoa-code</name>
<description>Example Source Codes from the Book "Introduction to Optimization Algorithms"</description>
Expand Down
81 changes: 9 additions & 72 deletions src/main/java/aitoa/examples/jssp/EJSSPExperimentStage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -566,83 +567,19 @@ public void configureBuilderForProblem(
IMetaheuristic<int[], JSSPCandidateSolution>>> 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<Supplier<
IMetaheuristic<int[], JSSPCandidateSolution>>>
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
Expand Down

0 comments on commit ed6564a

Please sign in to comment.