Changeset 16910 for trunk/HeuristicLab.ExactOptimization/3.3
- Timestamp:
- 05/07/19 15:30:17 (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/HeuristicLab.ExactOptimization/3.3
- Property svn:ignore
-
old new 12 12 *.nuget.props 13 13 *.nuget.targets 14 Plugin.cs
-
- Property svn:ignore
-
trunk/HeuristicLab.ExactOptimization/3.3/HeuristicLab.ExactOptimization-3.3.csproj
r16736 r16910 44 44 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 45 45 <DebugSymbols>true</DebugSymbols> 46 <OutputPath> bin\x86\Debug\</OutputPath>46 <OutputPath>..\..\bin\</OutputPath> 47 47 <DefineConstants>DEBUG;TRACE</DefineConstants> 48 48 <DebugType>full</DebugType> … … 60 60 </PropertyGroup> 61 61 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 62 <OutputPath> bin\x86\Release\</OutputPath>62 <OutputPath>..\..\bin\</OutputPath> 63 63 <DefineConstants>TRACE</DefineConstants> 64 64 <Optimize>true</Optimize> … … 77 77 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 78 78 <DebugSymbols>true</DebugSymbols> 79 <OutputPath> bin\x64\Debug\</OutputPath>79 <OutputPath>..\..\bin\</OutputPath> 80 80 <DefineConstants>DEBUG;TRACE</DefineConstants> 81 81 <DebugType>full</DebugType> … … 93 93 </PropertyGroup> 94 94 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 95 <OutputPath> bin\x64\Release\</OutputPath>95 <OutputPath>..\..\bin\</OutputPath> 96 96 <DefineConstants>TRACE</DefineConstants> 97 97 <Optimize>true</Optimize> … … 114 114 <SpecificVersion>False</SpecificVersion> 115 115 <HintPath>..\..\bin\Google.OrTools.dll</HintPath> 116 <Private>False</Private> 116 117 </Reference> 117 118 <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 118 119 <SpecificVersion>False</SpecificVersion> 119 120 <HintPath>..\..\bin\HEAL.Attic.dll</HintPath> 120 </Reference> 121 <Reference Include="HeuristicLab.OrTools-7.0.0, Version=6.10.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 122 <SpecificVersion>False</SpecificVersion> 123 <HintPath>..\..\bin\HeuristicLab.OrTools-7.0.0.dll</HintPath> 121 <Private>False</Private> 124 122 </Reference> 125 123 <Reference Include="System" /> … … 191 189 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project> 192 190 <Name>HeuristicLab.Analysis-3.3</Name> 191 <Private>False</Private> 193 192 </ProjectReference> 194 193 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 195 194 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project> 196 195 <Name>HeuristicLab.Collections-3.3</Name> 196 <Private>False</Private> 197 197 </ProjectReference> 198 198 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj"> 199 199 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project> 200 200 <Name>HeuristicLab.Common.Resources-3.3</Name> 201 <Private>False</Private> 201 202 </ProjectReference> 202 203 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 203 204 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> 204 205 <Name>HeuristicLab.Common-3.3</Name> 206 <Private>False</Private> 205 207 </ProjectReference> 206 208 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj"> 207 209 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project> 208 210 <Name>HeuristicLab.Core-3.3</Name> 211 <Private>False</Private> 209 212 </ProjectReference> 210 213 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> 211 214 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project> 212 215 <Name>HeuristicLab.Data-3.3</Name> 216 <Private>False</Private> 213 217 </ProjectReference> 214 218 <ProjectReference Include="..\..\HeuristicLab.Encodings.BinaryVectorEncoding\3.3\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.csproj"> 215 219 <Project>{66D249C3-A01D-42A8-82A2-919BC8EC3D83}</Project> 216 220 <Name>HeuristicLab.Encodings.BinaryVectorEncoding-3.3</Name> 221 <Private>False</Private> 217 222 </ProjectReference> 218 223 <ProjectReference Include="..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj"> 219 224 <Project>{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}</Project> 220 225 <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name> 226 <Private>False</Private> 221 227 </ProjectReference> 222 228 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 223 229 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> 224 230 <Name>HeuristicLab.Optimization-3.3</Name> 231 <Private>False</Private> 225 232 </ProjectReference> 226 233 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj"> 227 234 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project> 228 235 <Name>HeuristicLab.Parameters-3.3</Name> 236 <Private>False</Private> 229 237 </ProjectReference> 230 238 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj"> 231 239 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> 232 240 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 241 <Private>False</Private> 233 242 </ProjectReference> 234 243 <ProjectReference Include="..\..\HeuristicLab.Problems.Knapsack\3.3\HeuristicLab.Problems.Knapsack-3.3.csproj"> 235 244 <Project>{E10F395F-C8A6-48AD-B470-9AA7A1F43809}</Project> 236 245 <Name>HeuristicLab.Problems.Knapsack-3.3</Name> 246 <Private>False</Private> 237 247 </ProjectReference> 238 248 <ProjectReference Include="..\..\HeuristicLab.Problems.Programmable\3.3\HeuristicLab.Problems.Programmable-3.3.csproj"> 239 249 <Project>{EE07BFF8-B23D-41F5-8AD7-AC9598D7A2C9}</Project> 240 250 <Name>HeuristicLab.Problems.Programmable-3.3</Name> 251 <Private>False</Private> 241 252 </ProjectReference> 242 253 <ProjectReference Include="..\..\HeuristicLab.Problems.TravelingSalesman\3.3\HeuristicLab.Problems.TravelingSalesman-3.3.csproj"> 243 254 <Project>{D767C38D-8014-46B0-9A32-03A3AECCE34A}</Project> 244 255 <Name>HeuristicLab.Problems.TravelingSalesman-3.3</Name> 256 <Private>False</Private> 245 257 </ProjectReference> 246 258 <ProjectReference Include="..\..\HeuristicLab.Scripting\3.3\HeuristicLab.Scripting-3.3.csproj"> 247 259 <Project>{21977CC3-1757-4B3B-87BD-FF817AAA900F}</Project> 248 260 <Name>HeuristicLab.Scripting-3.3</Name> 261 <Private>False</Private> 249 262 </ProjectReference> 250 263 </ItemGroup> -
trunk/HeuristicLab.ExactOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/IncrementalLinearSolver.cs
r16736 r16910 88 88 public override void Reset() { 89 89 base.Reset(); 90 stopwatch.Reset();91 90 executionTime = TimeSpan.Zero; 92 91 } … … 114 113 return; 115 114 116 stopwatch. Start();115 stopwatch.Restart(); 117 116 Solve(problemDefinition, results, IntermediateTimeLimit); 118 117 stopwatch.Stop(); -
trunk/HeuristicLab.ExactOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/LinearSolver.cs
r16736 r16910 47 47 protected IFixedValueParameter<TextValue> solverSpecificParametersParam; 48 48 49 public static string LogDirectory { get; } 50 51 static LinearSolver() { 52 var solver = new Solver("", Solver.OptimizationProblemType.CbcMixedIntegerProgramming); 53 LogDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 54 Directory.CreateDirectory(LogDirectory); 55 solver.InitLogging(Assembly.GetExecutingAssembly().Location, LogDirectory); 56 } 57 49 58 public LinearSolver() { 50 59 Parameters.Add(problemTypeParam = … … 165 174 166 175 if (!solver.SetSolverSpecificParametersAsString(SolverSpecificParameters)) 167 throw new ArgumentException("Solver specific parameters could not be set."); 176 throw new ArgumentException("Solver specific parameters could not be set. " + 177 $"For details, see the log files in '{LogDirectory}'."); 168 178 169 179 resultStatus = (ResultStatus)solver.Solve(parameters); … … 225 235 solver = new Solver(Name, optimizationProblemType, libraryName ?? string.Empty); 226 236 } catch { 227 throw new InvalidOperationException($"Could not create {optimizationProblemType}.");237 solver = null; 228 238 } 229 239 230 240 if (solver == null) 231 throw new InvalidOperationException($"Could not create {optimizationProblemType}."); 241 throw new InvalidOperationException($"Could not create {optimizationProblemType}. " + 242 $"For details, see the log files in '{LogDirectory}'."); 232 243 233 244 solver.SuppressOutput(); -
trunk/HeuristicLab.ExactOptimization/3.3/LinearProgramming/Algorithms/Solvers/GlopSolver.cs
r16736 r16910 34 34 35 35 public GlopSolver() { 36 problemTypeParam.Value = (EnumValue<ProblemType>) problemTypeParam.Value.AsReadOnly();36 problemTypeParam.Value = (EnumValue<ProblemType>)new EnumValue<ProblemType>(ProblemType.LinearProgramming).AsReadOnly(); 37 37 SolverSpecificParameters = 38 38 "# for file format, see Protocol Buffers text format (https://developers.google.com/protocol-buffers/docs/overview#whynotxml)" + Environment.NewLine + -
trunk/HeuristicLab.ExactOptimization/3.3/LinearProgramming/Problems/FileBasedLinearProblemDefinition.cs
r16736 r16910 23 23 using System.IO; 24 24 using Google.OrTools.LinearSolver; 25 using HEAL.Attic; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Common.Resources; … … 29 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Parameters; 31 using HEAL.Attic;32 32 33 33 namespace HeuristicLab.ExactOptimization.LinearProgramming { … … 50 50 "Google OR-Tools Protocol Buffers Files (*.bin;*.prototxt)|*.bin;*.prototxt|" + 51 51 "All Files (*.*)|*.*"; 52 fileNameParam.Value. PathChanged += (o, e) => {52 fileNameParam.Value.StringValue.ValueChanged += (o, e) => { 53 53 if (File.Exists(FileName)) { 54 54 fileContent = File.ReadAllBytes(FileName); -
trunk/HeuristicLab.ExactOptimization/3.3/LinearProgramming/Problems/LinearProblem.cs
r16736 r16910 26 26 using System.Reflection; 27 27 using Google.OrTools.LinearSolver; 28 using HEAL.Attic; 28 29 using HeuristicLab.Common; 29 30 using HeuristicLab.Core; … … 31 32 using HeuristicLab.Optimization; 32 33 using HeuristicLab.Parameters; 33 using HEAL.Attic;34 34 35 35 namespace HeuristicLab.ExactOptimization.LinearProgramming { … … 44 44 public LinearProblem() { 45 45 Parameters.Remove(Parameters["Operators"]); 46 Parameters.Add(problemDefinitionParam = new ValueParameter<ILinearProblemDefinition>("Model", 47 new ProgrammableLinearProblemDefinition() , false));46 Parameters.Add(problemDefinitionParam = new ValueParameter<ILinearProblemDefinition>("Model", "The linear programming problem", 47 new ProgrammableLinearProblemDefinition()) { GetsCollected = false }); 48 48 } 49 49 … … 137 137 138 138 if (!exportSuccessful) 139 throw new InvalidDataException("Model could not be exported."); 139 throw new InvalidOperationException($"Model could not be exported. " + 140 $"For details, see the log files in '{LinearSolver.LogDirectory}'."); 140 141 } 141 142 -
trunk/HeuristicLab.ExactOptimization/3.3/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
Note: See TracChangeset
for help on using the changeset viewer.