Changeset 16288 for branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/LinearProgrammingAlgorithm.cs
- Timestamp:
- 11/08/18 17:10:53 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/LinearProgrammingAlgorithm.cs
r16233 r16288 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Threading; 3 24 using Google.OrTools.LinearSolver; … … 38 59 39 60 [Storable] 40 private readonlyIConstrainedValueParameter<ISolver> solverParam;61 private IConstrainedValueParameter<ISolver> solverParam; 41 62 42 63 [Storable] 43 64 private readonly IFixedValueParameter<TimeSpanValue> timeLimitParam; 65 66 public IConstrainedValueParameter<ISolver> SolverParameter { 67 get { return solverParam; } 68 set { solverParam = value; } 69 } 44 70 45 71 public LinearProgrammingAlgorithm() { … … 77 103 78 104 [StorableConstructor] 79 pr ivateLinearProgrammingAlgorithm(bool deserializing)105 protected LinearProgrammingAlgorithm(bool deserializing) 80 106 : base(deserializing) { 81 107 } 82 108 83 pr ivateLinearProgrammingAlgorithm(LinearProgrammingAlgorithm original, Cloner cloner)109 protected LinearProgrammingAlgorithm(LinearProgrammingAlgorithm original, Cloner cloner) 84 110 : base(original, cloner) { 85 111 solverParam = cloner.Clone(original.solverParam); … … 166 192 Solver.Interrupt(); 167 193 } 194 168 195 protected override void Initialize(CancellationToken cancellationToken) { 169 196 base.Initialize(cancellationToken); 170 197 } 198 171 199 protected override void Run(CancellationToken cancellationToken) => Solver.Solve(this, cancellationToken); 172 200 }
Note: See TracChangeset
for help on using the changeset viewer.