Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/26/10 15:18:42 (14 years ago)
Author:
abeham
Message:

#866

  • Updated external evaluation problem
  • Added some Drivers
  • Updated message
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluationProblem.cs

    r3852 r3859  
    2323using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2424using HeuristicLab.Parameters;
     25using System.Drawing;
     26using HeuristicLab.Optimization;
     27using HeuristicLab.Data;
     28using HeuristicLab.Operators;
    2529
    2630namespace HeuristicLab.Problems.ExternalEvaluation {
    2731  [Item("External Evaluation Problem", "A problem that is evaluated in a different process.")]
    2832  [StorableClass]
    29   public class ExternalEvaluationProblem : ParameterizedNamedItem {
     33  public class ExternalEvaluationProblem : ParameterizedNamedItem, ISingleObjectiveProblem {
     34    public override Image ItemImage {
     35      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; }
     36    }
     37
    3038    #region Parameters
     39    private IValueParameter<IExternalEvaluationDriver> DriverParameter {
     40      get { return (IValueParameter<IExternalEvaluationDriver>)Parameters["Driver"]; }
     41    }
     42    private IValueParameter<IExternalEvaluationProblemEvaluator> EvaluatorParameter {
     43      get { return (IValueParameter<IExternalEvaluationProblemEvaluator>)Parameters["Evaluator"]; }
     44    }
     45    public ValueParameter<BoolValue> MaximizationParameter {
     46      get { return (ValueParameter<BoolValue>)Parameters["Maximization"]; }
     47    }
     48    IParameter ISingleObjectiveProblem.MaximizationParameter {
     49      get { return MaximizationParameter; }
     50    }
     51    public ValueParameter<IOperator> SolutionCreatorParameter {
     52      get { return (ValueParameter<IOperator>)Parameters["SolutionCreator"]; }
     53    }
     54    IParameter IProblem.SolutionCreatorParameter {
     55      get { return SolutionCreatorParameter; }
     56    }
     57    IParameter IProblem.EvaluatorParameter {
     58      get { return EvaluatorParameter; }
     59    }
     60    public OptionalValueParameter<DoubleValue> BestKnownQualityParameter {
     61      get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
     62    }
     63    IParameter ISingleObjectiveProblem.BestKnownQualityParameter {
     64      get { return BestKnownQualityParameter; }
     65    }
     66    public OptionalValueParameter<IScope> BestKnownSolutionParameter {
     67      get { return (OptionalValueParameter<IScope>)Parameters["BestKnownSolution"]; }
     68    }
    3169    #endregion
    3270
    3371    public ExternalEvaluationProblem()
    3472      : base() {
     73      ExternalEvaluator evaluator = new ExternalEvaluator();
     74      EmptyOperator solutionCreator = new EmptyOperator();
     75
    3576      Parameters.Add(new ValueParameter<IExternalEvaluationDriver>("Driver", "The communication driver that is used to exchange data with the external process."));
     77      Parameters.Add(new ValueParameter<IExternalEvaluationProblemEvaluator>("Evaluator", "The evaluator that collects the values to exchange.", evaluator));
     78      Parameters.Add(new ValueParameter<IOperator>("SolutionCreator", "An operator to create the solution components.", solutionCreator));
    3679    }
    3780  }
Note: See TracChangeset for help on using the changeset viewer.