Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/17/17 12:51:44 (7 years ago)
Author:
abeham
Message:

#2457: worked on problem instance detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/MemPRContext.cs

    r14666 r14678  
    2525using System.Runtime.CompilerServices;
    2626using System.Threading;
    27 using HeuristicLab.Algorithms.DataAnalysis;
    2827using HeuristicLab.Algorithms.MemPR.Interfaces;
    29 using HeuristicLab.Analysis;
     28using HeuristicLab.Analysis.FitnessLandscape;
    3029using HeuristicLab.Common;
    3130using HeuristicLab.Core;
     
    3433using HeuristicLab.Parameters;
    3534using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    36 using HeuristicLab.Problems.DataAnalysis;
    3735using HeuristicLab.Random;
    3836using ExecutionContext = HeuristicLab.Core.ExecutionContext;
     
    167165
    168166    [Storable]
     167    private IValueParameter<DirectedPath<TSolution>> relinkedPaths;
     168    public DirectedPath<TSolution> RelinkedPaths {
     169      get { return relinkedPaths.Value; }
     170      set { relinkedPaths.Value = value; }
     171    }
     172
     173    [Storable]
    169174    private IValueParameter<IRandom> random;
    170175    public IRandom Random {
     
    221226    public IEnumerable<Tuple<double, double>> AdaptivewalkingStat {
    222227      get { return adaptivewalkingStat; }
     228    }
     229
     230    public double AverageQuality {
     231      get {
     232        return Problem.Parameters.ContainsKey("AverageQuality")
     233          ? ((IValueParameter<DoubleValue>)Problem.Parameters["AverageQuality"]).Value.Value
     234          : double.NaN;
     235      }
     236    }
     237
     238    public double LowerBound {
     239      get {
     240        return Problem.Parameters.ContainsKey("LowerBound")
     241          ? ((IValueParameter<DoubleValue>)Problem.Parameters["LowerBound"]).Value.Value
     242          : double.NaN;
     243      }
    223244    }
    224245
     
    245266      byHillclimbing = cloner.Clone(original.byHillclimbing);
    246267      byAdaptivewalking = cloner.Clone(original.byAdaptivewalking);
     268      relinkedPaths = cloner.Clone(original.relinkedPaths);
    247269      random = cloner.Clone(original.random);
    248270      breedingStat = original.breedingStat.Select(x => Tuple.Create(x.Item1, x.Item2, x.Item3, x.Item4)).ToList();
     
    273295      Parameters.Add(byHillclimbing = new ValueParameter<IntValue>("ByHillclimbing", new IntValue(0)));
    274296      Parameters.Add(byAdaptivewalking = new ValueParameter<IntValue>("ByAdaptivewalking", new IntValue(0)));
     297      Parameters.Add(relinkedPaths = new ValueParameter<DirectedPath<TSolution>>("RelinkedPaths", new DirectedPath<TSolution>()));
    275298      Parameters.Add(random = new ValueParameter<IRandom>("Random", new MersenneTwister()));
    276299
Note: See TracChangeset for help on using the changeset viewer.