Changeset 13202 for branches/PTSP/HeuristicLab.Problems.PTSP/3.3
- Timestamp:
- 11/17/15 09:28:57 (9 years ago)
- Location:
- branches/PTSP/HeuristicLab.Problems.PTSP/3.3
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PTSP/HeuristicLab.Problems.PTSP/3.3/HeuristicLab.Problems.PTSP-3.3.csproj
r12799 r13202 98 98 <Private>False</Private> 99 99 </Reference> 100 <Reference Include="HeuristicLab.Problems.Instances.TSPLIB-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 101 <SpecificVersion>False</SpecificVersion> 102 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.TSPLIB-3.3.dll</HintPath> 103 <Private>False</Private> 104 </Reference> 100 105 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 101 106 <SpecificVersion>False</SpecificVersion> … … 105 110 <Reference Include="System.Core" /> 106 111 <Reference Include="System.Drawing" /> 112 <Reference Include="System.IO.Compression" /> 107 113 <Reference Include="System.Xml.Linq" /> 108 114 <Reference Include="System.Data.DataSetExtensions" /> … … 112 118 </ItemGroup> 113 119 <ItemGroup> 120 <Compile Include="PTSPData.cs" /> 121 <Compile Include="PTSPLIBInstanceProvider.cs" /> 114 122 <None Include="Properties\AssemblyInfo.cs.frame" /> 115 123 <None Include="Plugin.cs.frame" /> -
branches/PTSP/HeuristicLab.Problems.PTSP/3.3/PTSP.cs
r12387 r13202 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 26 using System.Threading.Tasks; 22 using HeuristicLab.Common; 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.PermutationEncoding; 27 26 using HeuristicLab.Optimization; 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Core; 27 using HeuristicLab.Parameters; 30 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 29 using HeuristicLab.Problems.Instances; 32 using HeuristicLab.Encodings.PermutationEncoding;33 using HeuristicLab.Common;34 using HeuristicLab.Parameters;35 using HeuristicLab.Data;36 using HeuristicLab.Random;37 30 38 31 namespace HeuristicLab.Problems.PTSP { … … 59 52 get { return (ValueParameter<DoubleArray>)Parameters["ProbabilityMatrix"]; } 60 53 } 61 54 62 55 63 56 #endregion … … 84 77 set { ProbabilityMatrixParameter.Value = value; } 85 78 } 86 79 87 80 #endregion 88 81 89 82 90 83 public override bool Maximization { … … 112 105 }); 113 106 114 ProbabilityMatrix = new DoubleArray(new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1});115 107 ProbabilityMatrix = new DoubleArray(new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); 108 116 109 } 117 110 … … 134 127 BestKnownSolution = new Permutation(PermutationTypes.RelativeUndirected, data.BestKnownTour); 135 128 } 136 137 bool clearCoordinates = false, clearDistanceMatrix = false;138 if (data.Coordinates != null && data.Coordinates.GetLength(0) > 0)139 Coordinates = new DoubleMatrix(data.Coordinates);140 else clearCoordinates = true;141 129 142 // reset them after assigning the evaluator 143 if (clearCoordinates) Coordinates = null; 144 if (clearDistanceMatrix) DistanceMatrix = null; 130 Coordinates = data.Coordinates != null && data.Coordinates.GetLength(0) > 0 ? new DoubleMatrix(data.Coordinates) : null; 131 DistanceMatrix = new DistanceMatrix(data.GetDistanceMatrix()); 145 132 146 DistanceMatrix = new DistanceMatrix(data.GetDistanceMatrix());147 148 133 Encoding.Length = data.Dimension; 149 134
Note: See TracChangeset
for help on using the changeset viewer.