Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/DistanceMeasures/DistanceMatrixData.cs @ 8670

Last change on this file since 8670 was 8670, checked in by svonolfe, 12 years ago

Added first version of the dynamic vehicle routing addon (#1955)

File size: 1.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Core;
6using HeuristicLab.Common;
7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
8using HeuristicLab.Data;
9using HeuristicLab.Parameters;
10
11namespace HeuristicLab.PDPSimulation.DistanceMeasures {
12  [StorableClass]
13  public class DistanceMatrixData: ParameterizedNamedItem, IStorableContent {
14    public ValueParameter<DoubleMatrix> DistanceMatrixParameter {
15      get { return (ValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
16    }
17
18    public DoubleMatrix DistanceMatrix {
19      get {
20        return DistanceMatrixParameter.Value;
21      }
22
23      set {
24        DistanceMatrixParameter.Value = value;
25      }
26    }
27
28    public ValueParameter<IntMatrix> PointMappingParameter {
29      get { return (ValueParameter<IntMatrix>)Parameters["PointMapping"]; }
30    }
31
32    public IntMatrix Mapping {
33      get {
34        return PointMappingParameter.Value;
35      }
36
37      set {
38        PointMappingParameter.Value = value;
39      }
40    }
41
42    public DistanceMatrixData()
43      : base() {
44        Parameters.Add(new ValueParameter<DoubleMatrix>("DistanceMatrix", new DoubleMatrix()));
45        Parameters.Add(new ValueParameter<IntMatrix>("PointMapping", new IntMatrix()));
46    }
47    [StorableConstructor]
48    private DistanceMatrixData(bool deserializing) : base(deserializing) {
49    }
50    private DistanceMatrixData(DistanceMatrixData original, Cloner cloner)
51      : base(original, cloner) {
52    }
53
54    public override IDeepCloneable Clone(Cloner cloner) {
55      return new DistanceMatrixData(this, cloner);
56    }
57   
58    #region IStorableContent Members
59
60    public string Filename {
61      get;
62      set;
63    }
64
65    #endregion
66  }
67}
Note: See TracBrowser for help on using the repository browser.