Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3245


Ignore:
Timestamp:
03/31/10 18:36:19 (15 years ago)
Author:
gkronber
Message:

Added another visualizer that displays the symbolic expression tree of the best artificial ant solution. #952 (Artificial Ant Problem for 3.3)

Location:
trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs

    r3239 r3245  
    114114    }
    115115
    116     public OptionalValueParameter<IAntTrailVisualizer> VisualizerParameter {
    117       get { return (OptionalValueParameter<IAntTrailVisualizer>)Parameters["Visualizer"]; }
     116    public OptionalValueParameter<ISingleObjectiveSolutionsVisualizer> VisualizerParameter {
     117      get { return (OptionalValueParameter<ISingleObjectiveSolutionsVisualizer>)Parameters["Visualizer"]; }
    118118    }
    119119    IParameter IProblem.VisualizerParameter {
     
    165165      get { return ArtificialAntExpressionGrammarParameter.Value; }
    166166    }
    167     public IAntTrailVisualizer Visualizer {
     167    public ISingleObjectiveSolutionsVisualizer Visualizer {
    168168      get { return VisualizerParameter.Value; }
    169169      set { VisualizerParameter.Value = value; }
     
    197197      Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
    198198      Parameters.Add(new ValueParameter<IntValue>("MaxTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
    199       Parameters.Add(new ValueParameter<IAntTrailVisualizer>("Visualizer", "The operator which should be used to visualize artificial ant solutions.", visualizer));
     199      Parameters.Add(new ValueParameter<ISingleObjectiveSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize artificial ant solutions.", visualizer));
    200200
    201201      creator.SymbolicExpressionTreeParameter.ActualName = "AntTrailSolution";
     
    310310          antTrailVisualizer.WorldParameter.ActualName = WorldParameter.Name;
    311311          antTrailVisualizer.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
     312        }
     313        var bestSymExpressionVisualizer = Visualizer as BestSymbolicExpressionTreeVisualizer;
     314        if (bestSymExpressionVisualizer != null) {
     315          bestSymExpressionVisualizer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    312316        }
    313317      }
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLab.Problems.ArtificialAnt-3.3.csproj

    r3239 r3245  
    8383    <Compile Include="AntInterpreter.cs" />
    8484    <Compile Include="BestAntTrailVisualizer.cs" />
     85    <Compile Include="BestSymbolicExpressionTreeVisualizer.cs" />
    8586    <Compile Include="HeuristicLabProblemsArtificialAntPlugin.cs" />
    8687    <Compile Include="IAntTrailVisualizer.cs" />
Note: See TracChangeset for help on using the changeset viewer.