Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/31/17 09:30:07 (8 years ago)
Author:
jkarder
Message:

#2205: worked on optimization networks

  • added lrp network 2
  • minor code changes
Location:
branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpNetwork.cs

    r14616 r14621  
    3131  [Item("TtpNetwork", "An abstract base class for TTP optimization networks.")]
    3232  [StorableClass]
    33   public abstract class TtpNetwork : Network {
     33  public abstract class TtpNetwork : Network, IOptimizer {
    3434    #region Constants
    3535    protected const string OrchestratorNodeName = "Orchestrator";
     
    104104      if (algorithm == null) return;
    105105
    106       algorithm.ExecutionStateChanged += OnExecutionStateChanged;
    107       algorithm.ExecutionTimeChanged += OnExecutionTimeChanged;
    108       algorithm.Prepared += OnPrepared;
    109       algorithm.Started += OnStarted;
    110       algorithm.Paused += OnPaused;
    111       algorithm.Stopped += OnStopped;
    112       algorithm.ExceptionOccurred += OnExceptionOccurred;
     106      algorithm.ExecutionStateChanged += (s, e) => OnExecutionStateChanged();
     107      algorithm.ExecutionTimeChanged += (s, e) => OnExecutionTimeChanged();
     108      algorithm.Prepared += (s, e) => OnPrepared();
     109      algorithm.Started += (s, e) => OnStarted();
     110      algorithm.Paused += (s, e) => OnPaused();
     111      algorithm.Stopped += (s, e) => OnStopped();
     112      algorithm.ExceptionOccurred += (s, e) => OnExceptionOccurred(e.Value);
    113113    }
    114114
     
    167167    }
    168168    #endregion
    169 
    170     protected void OnExecutionStateChanged(object sender, EventArgs e) { OnExecutionStateChanged(); }
    171     protected void OnExecutionTimeChanged(object sender, EventArgs e) { OnExecutionTimeChanged(); }
    172     protected void OnPrepared(object sender, EventArgs e) { OnPrepared(); }
    173     protected void OnStarted(object sender, EventArgs e) { OnStarted(); }
    174     protected void OnPaused(object sender, EventArgs e) { OnPaused(); }
    175     protected void OnStopped(object sender, EventArgs e) { OnStopped(); }
    176     protected void OnExceptionOccurred(object sender, EventArgs<Exception> e) { OnExceptionOccurred(e.Value); }
    177169  }
    178170}
  • branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpNetwork1.cs

    r14616 r14621  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Optimization;
    2827using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2928
     
    3231  [Creatable("Optimization Networks")]
    3332  [StorableClass]
    34   public sealed class TtpNetwork1 : TtpNetwork, IOptimizer {
     33  public sealed class TtpNetwork1 : TtpNetwork {
    3534    [StorableConstructor]
    3635    private TtpNetwork1(bool deserializing) : base(deserializing) { }
  • branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpNetwork2.cs

    r14616 r14621  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Optimization;
    2827using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2928
     
    3231  [Creatable("Optimization Networks")]
    3332  [StorableClass]
    34   public sealed class TtpNetwork2 : TtpNetwork, IOptimizer {
     33  public sealed class TtpNetwork2 : TtpNetwork {
    3534    [StorableConstructor]
    3635    private TtpNetwork2(bool deserializing) : base(deserializing) { }
  • branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpNetwork3.cs

    r14616 r14621  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Optimization;
    2827using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2928
     
    3231  [Creatable("Optimization Networks")]
    3332  [StorableClass]
    34   public sealed class TtpNetwork3 : TtpNetwork, IOptimizer {
     33  public sealed class TtpNetwork3 : TtpNetwork {
    3534    [StorableConstructor]
    3635    private TtpNetwork3(bool deserializing) : base(deserializing) { }
  • branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpOrchestratorNode.cs

    r14616 r14621  
    199199    }
    200200
    201     protected void InstanceParameter_Value_ToStringChanged(object sender, EventArgs e) {
     201    private void InstanceParameter_Value_ToStringChanged(object sender, EventArgs e) {
    202202      string filePath = InstanceParameter.Value.Value;
    203203      TtpUtils.Import(filePath, out tspCoordinates, out distanceType,
Note: See TracChangeset for help on using the changeset viewer.