Changes between Version 4 and Version 5 of Documentation/DevelopmentCenter/IntegrateHeuristicLab


Ignore:
Timestamp:
11/04/13 12:22:48 (6 years ago)
Author:
ascheibe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/DevelopmentCenter/IntegrateHeuristicLab

    v4 v5  
    105105
    106106And that's all! You have now created a HeuristicLab console client for a specific algorithm and problem. If you want to use different algorithms and problems, you have to reference the required assemblies and can then parameterize and execute these algorithms.
     107
     108== Creating an algorithm without loading it from a file ==
     109HeuristicLab algorithms and problems can of course also be used without loading them from a file. If you replace the above shown Main method with the following code, a Genetic Algorithm with standard parameterization and a traveling salesman problem with it's default problem instance is created and executed:
     110
     111{{{#!csharp
     112      GeneticAlgorithm ga = new GeneticAlgorithm();
     113      SequentialEngine engine = new SequentialEngine();
     114      TravelingSalesmanProblem problem = new TravelingSalesmanProblem();
     115      ga.Engine = engine;
     116      ga.Problem = problem;
     117
     118      RegisterAlgorithmEventHandlers(ga);
     119      ga.Start();
     120}}}
     121
     122
     123
     124