Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/19/10 02:15:10 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on operators and SGA
  • improved performance
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Routing.TSP/3.3/TSP.cs

    r2805 r2830  
    3434      get { return (ValueParameter<DoubleMatrixData>)Parameters["Coordinates"]; }
    3535    }
    36     private OperatorParameter SolutionGeneratorParameter {
    37       get { return (OperatorParameter)Parameters["SolutionGenerator"]; }
     36    private OperatorParameter SolutionCreatorParameter {
     37      get { return (OperatorParameter)Parameters["SolutionCreator"]; }
    3838    }
    39     private OperatorParameter EvaluatorParameter {
    40       get { return (OperatorParameter)Parameters["Evaluator"]; }
     39    private OperatorParameter SolutionEvaluatorParameter {
     40      get { return (OperatorParameter)Parameters["SolutionEvaluator"]; }
    4141    }
    4242
     
    4545      set { CoordinatesParameter.Value = value; }
    4646    }
    47     public IOperator SolutionGenerator {
    48       get { return SolutionGeneratorParameter.Value; }
    49       set { SolutionGeneratorParameter.Value = value; }
     47    public IOperator SolutionCreator {
     48      get { return SolutionCreatorParameter.Value; }
     49      set { SolutionCreatorParameter.Value = value; }
    5050    }
    51     public IOperator Evaluator {
    52       get { return EvaluatorParameter.Value; }
    53       set { EvaluatorParameter.Value = value; }
     51    public IOperator SolutionEvaluator {
     52      get { return SolutionEvaluatorParameter.Value; }
     53      set { SolutionEvaluatorParameter.Value = value; }
    5454    }
    5555
     
    5959      Parameters.Add(new ValueParameter<DoubleMatrixData>("Coordinates", "The x- and y-Coordinates of the cities.", new DoubleMatrixData(0, 0)));
    6060      Parameters.Add(new ValueParameter<DoubleData>("BestKnownQuality", "The quality of the best known solution of this TSP instance."));
    61       Parameters.Add(new OperatorParameter("SolutionGenerator", "The operator which should be used to generate new solutions."));
    62       Parameters.Add(new OperatorParameter("Evaluator", "The operator which should be used to evaluate solutions."));
     61      Parameters.Add(new OperatorParameter("SolutionCreator", "The operator which should be used to create new solutions."));
     62      Parameters.Add(new OperatorParameter("SolutionEvaluator", "The operator which should be used to evaluate solutions."));
    6363    }
    6464
     
    7070      RandomPermutationCreator creator = new RandomPermutationCreator();
    7171      creator.LengthParameter.Value = new IntData(cities);
    72       SolutionGenerator = creator;
     72      SolutionCreator = creator;
    7373      TSPRoundedEuclideanPathEvaluator evaluator = new TSPRoundedEuclideanPathEvaluator();
    74       Evaluator = evaluator;
     74      SolutionEvaluator = evaluator;
    7575    }
    7676  }
Note: See TracChangeset for help on using the changeset viewer.