Changeset 15698 for branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/CPLEX
- Timestamp:
- 01/31/18 14:01:55 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/CPLEX/CplexSolver.cs
r15634 r15698 28 28 using HeuristicLab.Encodings.IntegerVectorEncoding; 29 29 using HeuristicLab.Optimization; 30 using HeuristicLab.Parameters; 30 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 32 using ILOG.CPLEX; … … 49 50 } 50 51 52 [Storable] 53 private ValueParameter<DateTimeValue> lastUpdateTimeParameter; 54 public IValueParameter<DateTimeValue> LastUpdateTimeParameter { 55 get { return lastUpdateTimeParameter; } 56 } 57 51 58 [StorableConstructor] 52 59 protected CplexSolver(bool deserializing) : base(deserializing) { } 53 60 protected CplexSolver(CplexSolver original, Cloner cloner) 54 61 : base(original, cloner) { 62 lastUpdateTimeParameter = cloner.Clone(original.lastUpdateTimeParameter); 55 63 } 56 64 public CplexSolver() { 57 65 Problem = new GQAP(); 58 ((MultiAnalyzer)Analyzer).AddOperator(new QualityPerClockAnalyzer()); 66 Parameters.Add(lastUpdateTimeParameter = new ValueParameter<DateTimeValue>("LastUpdateTime", "") { Hidden = true }); 67 var qpc = new QualityPerClockAnalyzer(); 68 qpc.LastUpdateTimeParameter.ActualName = LastUpdateTimeParameter.Name; 69 ((MultiAnalyzer)Analyzer).AddOperator(qpc); 59 70 } 60 71 … … 69 80 opl.AddDataSource(dataSource); 70 81 opl.Generate(); 82 LastUpdateTimeParameter.Value = new DateTimeValue(DateTime.UtcNow); 71 83 cplex.Solve(); 72 84 cplex.End();
Note: See TracChangeset
for help on using the changeset viewer.