- Timestamp:
- 05/07/19 15:30:17 (6 years ago)
- Location:
- trunk
- Files:
-
- 5 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/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 +
Note: See TracChangeset
for help on using the changeset viewer.