Changeset 11316
- Timestamp:
- 08/27/14 14:08:56 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.Orienteering
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs
r11314 r11316 45 45 46 46 #region Parameter Properties 47 public ValueParameter<DoubleMatrix> CoordinatesParameter {48 get { return ( ValueParameter<DoubleMatrix>)Parameters["Coordinates"]; }47 public OptionalValueParameter<DoubleMatrix> CoordinatesParameter { 48 get { return (OptionalValueParameter<DoubleMatrix>)Parameters["Coordinates"]; } 49 49 } 50 50 public ValueParameter<DistanceMatrix> DistanceMatrixParameter { … … 124 124 public OrienteeringProblem() 125 125 : base(new OrienteeringEvaluator(), new GreedyOrienteeringTourCreator()) { 126 Parameters.Add(new ValueParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the points."));126 Parameters.Add(new OptionalValueParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the points.")); 127 127 Parameters.Add(new ValueParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the points.")); 128 128 Parameters.Add(new ValueParameter<IntValue>("StartingPoint", "Index of the starting point.", new IntValue(0))); … … 301 301 } 302 302 private void UpdateDistanceMatrix() { 303 if (Coordinates == null) { 304 DistanceMatrix = new DistanceMatrix(0, 0); 305 return; 306 } 307 303 308 var coordinates = Coordinates; 304 309 int dimension = coordinates.Rows;
Note: See TracChangeset
for help on using the changeset viewer.