Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
avbasak1 committed Nov 1, 2021
1 parent 2e88332 commit 8f265c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,16 @@
public class TSPOptimizerLegacy {

/**
* Main method to initiate optimization.
* MainThread.sleep(5000) method to initiate optimization.
* @param args arguments
*/
public static void main(String[] args) {
try {
final Population initPopulation = getInitialPopulation(Constants.CITIES);

final TSPOptimizerLegacy optimizer = new TSPOptimizerLegacy();
final Population initPopulation = getInitialPopulation(Constants.CITIES);
final TSPOptimizerLegacy optimizer = new TSPOptimizerLegacy();

optimizer.optimize(initPopulation, Constants.CITIES);
optimizer.optimize(initPopulation, Constants.CITIES);

Thread.sleep(5000);

} catch (InterruptedException e) {
throw new GeneticException(e);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public void reset()

@Test
public void test() {
// to test a stochastic algorithm is hard, so this will rather be an usage
// example

// initialize a new genetic algorithm
GeneticAlgorithm<List<Integer>> ga = new GeneticAlgorithm<>(new OnePointCrossover<Integer, List<Integer>>(),
Expand Down

0 comments on commit 8f265c7

Please sign in to comment.