Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/05/13 11:37:13 (11 years ago)
Author:
gkronber
Message:

#2026 added lawn mower problem. create a OSGA for solving the compiled problem directly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlEditor.cs

    r9843 r9846  
    2424using System.Linq;
    2525using System.Text;
     26using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
    2627using HeuristicLab.MainForm.WindowsForms;
     28using HeuristicLab.Optimization;
    2729using HeuristicLab.Problems.Instances;
    2830using HeuristicLab.Problems.Instances.Views;
     
    4648        Parser parser = new Parser(scanner);
    4749        parser.Parse();
    48         MainForm.MainFormManager.MainForm.ShowContent(parser.problem);
     50
     51        // generate an OSGA to solve the problem
     52        var osga = new OffspringSelectionGeneticAlgorithm();
     53        osga.Problem = parser.problem;
     54        osga.Engine = new SequentialEngine.SequentialEngine();
     55        osga.PopulationSize.Value = 500;
     56        osga.MutationProbability.Value = 0.15;
     57        osga.ComparisonFactorUpperBound.Value = 1.0;
     58        osga.ComparisonFactorLowerBound.Value = 1.0;
     59        osga.MutatorParameter.Value =
     60          osga.MutatorParameter.ValidValues.First(o => o.Name.Contains("MultiSymbolicExpressionTreeManipulator"));
     61        osga.SelectorParameter.Value =
     62          osga.SelectorParameter.ValidValues.First(o => o.Name.Contains("GenderSpecific"));
     63        osga.MaximumSelectionPressure.Value = 500;
     64        osga.MaximumGenerations.Value = 100;
     65        MainForm.MainFormManager.MainForm.ShowContent(osga);
    4966      }
    5067
Note: See TracChangeset for help on using the changeset viewer.