Changeset 15633
- Timestamp:
- 01/19/18 09:05:35 (7 years ago)
- Location:
- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSolverNet
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSolverNet/GQAPBinarySolver.cs
r15575 r15633 196 196 model.Minimize(obj); 197 197 198 model.Close(); 199 200 // Parameterizes the solver. 201 LSPhase phase = localSolver.CreatePhase(); 202 phase.SetTimeLimit((int)Math.Ceiling(MaximumRuntime.TotalSeconds)); 203 204 localSolver.AddCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked); 205 206 localSolver.Solve(); 207 208 localSolver.RemoveCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked); 209 localSolver.Dispose(); 198 try { 199 model.Close(); 200 201 // Parameterizes the solver. 202 LSPhase phase = localSolver.CreatePhase(); 203 phase.SetTimeLimit((int)Math.Ceiling(MaximumRuntime.TotalSeconds)); 204 205 localSolver.AddCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked); 206 207 localSolver.Solve(); 208 209 localSolver.RemoveCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked); 210 } finally { 211 localSolver.Dispose(); 212 } 213 214 Context.RunOperator(Analyzer, CancellationToken.None); 210 215 } 211 216 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSolverNet/GQAPIntegerSolver.cs
r15575 r15633 181 181 localSolver.Dispose(); 182 182 } 183 184 Context.RunOperator(Analyzer, CancellationToken.None); 183 185 } 184 186 }
Note: See TracChangeset
for help on using the changeset viewer.