Changeset 3048 for trunk/sources/HeuristicLab.Problems.TSP/3.3/TSP.cs
- Timestamp:
- 03/15/10 23:49:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TSP/3.3/TSP.cs
r3017 r3048 43 43 44 44 #region Parameter Properties 45 public ValueParameter<Bool Data> MaximizationParameter {46 get { return (ValueParameter<Bool Data>)Parameters["Maximization"]; }45 public ValueParameter<BoolValue> MaximizationParameter { 46 get { return (ValueParameter<BoolValue>)Parameters["Maximization"]; } 47 47 } 48 48 IParameter ISingleObjectiveProblem.MaximizationParameter { 49 49 get { return MaximizationParameter; } 50 50 } 51 public ValueParameter<DoubleMatrix Data> CoordinatesParameter {52 get { return (ValueParameter<DoubleMatrix Data>)Parameters["Coordinates"]; }51 public ValueParameter<DoubleMatrix> CoordinatesParameter { 52 get { return (ValueParameter<DoubleMatrix>)Parameters["Coordinates"]; } 53 53 } 54 54 public ValueParameter<IPermutationCreator> SolutionCreatorParameter { … … 64 64 get { return EvaluatorParameter; } 65 65 } 66 public OptionalValueParameter<Double Data> BestKnownQualityParameter {67 get { return (OptionalValueParameter<Double Data>)Parameters["BestKnownQuality"]; }66 public OptionalValueParameter<DoubleValue> BestKnownQualityParameter { 67 get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; } 68 68 } 69 69 #endregion 70 70 71 71 #region Properties 72 public DoubleMatrix DataCoordinates {72 public DoubleMatrix Coordinates { 73 73 get { return CoordinatesParameter.Value; } 74 74 set { CoordinatesParameter.Value = value; } … … 91 91 get { return EvaluatorParameter.Value; } 92 92 } 93 public Double DataBestKnownQuality {93 public DoubleValue BestKnownQuality { 94 94 get { return BestKnownQualityParameter.Value; } 95 95 set { BestKnownQualityParameter.Value = value; } … … 106 106 TSPRoundedEuclideanPathEvaluator evaluator = new TSPRoundedEuclideanPathEvaluator(); 107 107 108 Parameters.Add(new ValueParameter<Bool Data>("Maximization", "Set to false as the Traveling Salesman Problem is a minimization problem.", new BoolData(false)));109 Parameters.Add(new ValueParameter<DoubleMatrix Data>("Coordinates", "The x- and y-Coordinates of the cities.", new DoubleMatrixData(0, 0)));108 Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as the Traveling Salesman Problem is a minimization problem.", new BoolValue(false))); 109 Parameters.Add(new ValueParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities.", new DoubleMatrix(0, 0))); 110 110 Parameters.Add(new ValueParameter<IPermutationCreator>("SolutionCreator", "The operator which should be used to create new TSP solutions.", creator)); 111 111 Parameters.Add(new ValueParameter<ITSPEvaluator>("Evaluator", "The operator which should be used to evaluate TSP solutions.", evaluator)); 112 Parameters.Add(new OptionalValueParameter<Double Data>("BestKnownQuality", "The quality of the best known solution of this TSP instance."));112 Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this TSP instance.")); 113 113 114 114 creator.PermutationParameter.ActualName = "TSPTour"; … … 131 131 TSPLIBParser parser = new TSPLIBParser(filename); 132 132 parser.Parse(); 133 Coordinates = new DoubleMatrix Data(parser.Vertices);133 Coordinates = new DoubleMatrix(parser.Vertices); 134 134 } 135 135 … … 190 190 } 191 191 private void ParameterizeSolutionCreator() { 192 SolutionCreator.LengthParameter.Value = new Int Data(Coordinates.Rows);192 SolutionCreator.LengthParameter.Value = new IntValue(Coordinates.Rows); 193 193 } 194 194 private void ParameterizeEvaluator() {
Note: See TracChangeset
for help on using the changeset viewer.