Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5753 for trunk


Ignore:
Timestamp:
03/18/11 15:36:57 (13 years ago)
Author:
svonolfe
Message:

Integrated VNS into trunk (#1425)

Location:
trunk/sources
Files:
11 edited
15 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab 3.3.sln

    r5440 r5753  
    330330EndProject
    331331Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3", "HeuristicLab.Algorithms.ParticleSwarmOptimization\3.3\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj", "{2C429157-9C34-4DD3-9D5F-B444B751E39A}"
     332EndProject
     333Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3", "HeuristicLab.Algorithms.VariableNeighborhoodSearch\3.3\HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3.csproj", "{E4CFB0C3-0589-4893-B38E-8BEDF885C765}"
    332334EndProject
    333335Global
     
    14961498    {2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.ActiveCfg = Release|x86
    14971499    {2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.Build.0 = Release|x86
     1500    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     1501    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Debug|Any CPU.Build.0 = Debug|Any CPU
     1502    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Debug|x64.ActiveCfg = Debug|x64
     1503    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Debug|x64.Build.0 = Debug|x64
     1504    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Debug|x86.ActiveCfg = Debug|x86
     1505    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Debug|x86.Build.0 = Debug|x86
     1506    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Release|Any CPU.ActiveCfg = Release|Any CPU
     1507    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Release|Any CPU.Build.0 = Release|Any CPU
     1508    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Release|x64.ActiveCfg = Release|x64
     1509    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Release|x64.Build.0 = Release|x64
     1510    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Release|x86.ActiveCfg = Release|x86
     1511    {E4CFB0C3-0589-4893-B38E-8BEDF885C765}.Release|x86.Build.0 = Release|x86
    14981512  EndGlobalSection
    14991513  GlobalSection(SolutionProperties) = preSolution
  • trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/HeuristicLab.Algorithms.LocalSearch-3.3.csproj

    r5163 r5753  
    1212    <AssemblyName>HeuristicLab.Algorithms.LocalSearch-3.3</AssemblyName>
    1313    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    14     <TargetFrameworkProfile></TargetFrameworkProfile>
     14    <TargetFrameworkProfile>
     15    </TargetFrameworkProfile>
    1516    <FileAlignment>512</FileAlignment>
    1617    <SignAssembly>true</SignAssembly>
     
    107108  <ItemGroup>
    108109    <Compile Include="HeuristicLabAlgorithmsLocalSearchPlugin.cs" />
     110    <Compile Include="LocalSearchImprovementOperator.cs" />
    109111    <Compile Include="LocalSearchMainLoop.cs" />
    110112    <Compile Include="Properties\AssemblyInfo.cs" />
  • trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs

    r5445 r5753  
    168168      variableCreator.Name = "Initialize EvaluatedMoves";
    169169      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedMoves", new IntValue()));
     170      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0)));
     171      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(0)));
    170172      variableCreator.Successor = resultsCollector;
    171173
     
    182184      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
    183185      mainLoop.EvaluatedMovesParameter.ActualName = "EvaluatedMoves";
     186      mainLoop.IterationsParameter.ActualName = "Iterations";
     187      mainLoop.BestQualityParameter.ActualName = "BestQuality";
    184188
    185189      moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
  • trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchMainLoop.cs

    r5445 r5753  
    4646      get { return (LookupParameter<DoubleValue>)Parameters["Quality"]; }
    4747    }
     48    public LookupParameter<DoubleValue> BestQualityParameter {
     49      get { return (LookupParameter<DoubleValue>)Parameters["BestLocalQuality"]; }
     50    }
    4851    public ValueLookupParameter<DoubleValue> BestKnownQualityParameter {
    4952      get { return (ValueLookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
     
    5154    public LookupParameter<DoubleValue> MoveQualityParameter {
    5255      get { return (LookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
     56    }
     57    public LookupParameter<IntValue> IterationsParameter {
     58      get { return (LookupParameter<IntValue>)Parameters["LocalIterations"]; }
    5359    }
    5460    public ValueLookupParameter<IntValue> MaximumIterationsParameter {
     
    7985    public LocalSearchMainLoop()
    8086      : base() {
    81       Initialize();
     87        Initialize();
    8288    }
    8389    private LocalSearchMainLoop(LocalSearchMainLoop original, Cloner cloner)
     
    9399      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
    94100      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
     101      Parameters.Add(new LookupParameter<DoubleValue>("BestLocalQuality", "The value which represents the best quality found so far."));
    95102      Parameters.Add(new ValueLookupParameter<DoubleValue>("BestKnownQuality", "The best known quality value found so far."));
    96103      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The value which represents the quality of a move."));
     104      Parameters.Add(new LookupParameter<IntValue>("LocalIterations", "The number of generations."));
    97105      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed."));
    98106      Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The variable collection where results should be stored."));
     
    107115
    108116      #region Create operators
    109       VariableCreator variableCreator = new VariableCreator();
    110117      SubScopesProcessor subScopesProcessor0 = new SubScopesProcessor();
    111118      Assigner bestQualityInitializer = new Assigner();
     
    124131      Placeholder moveMaker = new Placeholder();
    125132      Assigner bestQualityUpdater = new Assigner();
     133      ResultsCollector resultsCollector2 = new ResultsCollector();
    126134      MergingReducer mergingReducer = new MergingReducer();
    127135      Placeholder analyzer2 = new Placeholder();
     
    131139      ConditionalBranch iterationsTermination = new ConditionalBranch();
    132140
    133       variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0))); // Class LocalSearch expects this to be called Iterations
    134       variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(0)));
    135 
    136141      bestQualityInitializer.Name = "Initialize BestQuality";
    137       bestQualityInitializer.LeftSideParameter.ActualName = "BestQuality";
     142      bestQualityInitializer.LeftSideParameter.ActualName = BestQualityParameter.Name;
    138143      bestQualityInitializer.RightSideParameter.ActualName = QualityParameter.Name;
    139144
     
    142147
    143148      resultsCollector1.CopyValue = new BoolValue(false);
    144       resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Iterations"));
    145       resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
     149      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>(IterationsParameter.Name));
     150      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>(BestQualityParameter.Name, null, BestQualityParameter.Name));
    146151      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
    147152
     
    172177
    173178      bestQualityUpdater.Name = "Update BestQuality";
    174       bestQualityUpdater.LeftSideParameter.ActualName = "BestQuality";
     179      bestQualityUpdater.LeftSideParameter.ActualName = BestQualityParameter.Name;
    175180      bestQualityUpdater.RightSideParameter.ActualName = QualityParameter.Name;
     181
     182      resultsCollector2.CopyValue = new BoolValue(false);
     183      resultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>(BestQualityParameter.Name, null, BestQualityParameter.Name));
     184      resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name;
    176185
    177186      analyzer2.Name = "Analyzer (placeholder)";
     
    182191      iterationsCounter.Name = "Iterations Counter";
    183192      iterationsCounter.Increment = new IntValue(1);
    184       iterationsCounter.ValueParameter.ActualName = "Iterations";
     193      iterationsCounter.ValueParameter.ActualName = IterationsParameter.Name;
    185194
    186195      iterationsComparator.Name = "Iterations >= MaximumIterations";
    187196      iterationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
    188       iterationsComparator.LeftSideParameter.ActualName = "Iterations";
     197      iterationsComparator.LeftSideParameter.ActualName = IterationsParameter.Name;
    189198      iterationsComparator.RightSideParameter.ActualName = MaximumIterationsParameter.Name;
    190199      iterationsComparator.ResultParameter.ActualName = "Terminate";
     
    195204
    196205      #region Create operator graph
    197       OperatorGraph.InitialOperator = variableCreator;
    198       variableCreator.Successor = subScopesProcessor0;
     206      OperatorGraph.InitialOperator = subScopesProcessor0;
    199207      subScopesProcessor0.Operators.Add(bestQualityInitializer);
    200208      subScopesProcessor0.Successor = resultsCollector1;
  • trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/HeuristicLab.Algorithms.SimulatedAnnealing-3.3.csproj

    r5163 r5753  
    1212    <AssemblyName>HeuristicLab.Algorithms.SimulatedAnnealing-3.3</AssemblyName>
    1313    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    14     <TargetFrameworkProfile></TargetFrameworkProfile>
     14    <TargetFrameworkProfile>
     15    </TargetFrameworkProfile>
    1516    <FileAlignment>512</FileAlignment>
    1617    <SignAssembly>true</SignAssembly>
     
    107108  <ItemGroup>
    108109    <Compile Include="HeuristicLabAlgorithmsSimulatedAnnealingPlugin.cs" />
     110    <Compile Include="SimulatedAnnealingImprovementOperator.cs" />
    109111    <Compile Include="Properties\AssemblyInfo.cs" />
    110112    <Compile Include="SimulatedAnnealing.cs" />
  • trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs

    r5445 r5753  
    189189      variableCreator.Name = "Initialize EvaluatedMoves";
    190190      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedMoves", new IntValue()));
     191      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0)));
    191192      variableCreator.Successor = resultsCollector;
    192193
     
    206207      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
    207208      mainLoop.EvaluatedMovesParameter.ActualName = "EvaluatedMoves";
     209      mainLoop.IterationsParameter.ActualName = "Iterations";
    208210
    209211      foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name))
  • trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs

    r5445 r5753  
    6060      get { return (ValueLookupParameter<IntValue>)Parameters["InnerIterations"]; }
    6161    }
     62    public LookupParameter<IntValue> IterationsParameter {
     63      get { return (LookupParameter<IntValue>)Parameters["LocalIterations"]; }
     64    }
    6265    public ValueLookupParameter<IntValue> MaximumIterationsParameter {
    6366      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumIterations"]; }
     
    109112      Parameters.Add(new ValueLookupParameter<DoubleValue>("EndTemperature", "The end temperature."));
    110113      Parameters.Add(new ValueLookupParameter<IntValue>("InnerIterations", "The amount of inner iterations (number of moves before temperature is adjusted again)."));
     114      Parameters.Add(new LookupParameter<IntValue>("LocalIterations", "The number of generations."));
    111115      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "The maximum number of iterations which should be processed."));
    112116
     
    144148      ConditionalBranch iterationsTermination = new ConditionalBranch();
    145149
    146       variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0))); // Class SimulatedAnnealing expects this to be called Iterations
    147150      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("Temperature", new DoubleValue(double.MaxValue)));
    148151
    149       resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Iterations"));
     152      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>(IterationsParameter.Name));
    150153      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Temperature"));
    151154      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
     
    180183      iterationsCounter.Name = "Increment Iterations";
    181184      iterationsCounter.Increment = new IntValue(1);
    182       iterationsCounter.ValueParameter.ActualName = "Iterations";
     185      iterationsCounter.ValueParameter.ActualName = IterationsParameter.Name;
    183186
    184187      iterationsComparator.Name = "Iterations >= MaximumIterations";
    185       iterationsComparator.LeftSideParameter.ActualName = "Iterations";
     188      iterationsComparator.LeftSideParameter.ActualName = IterationsParameter.Name;
    186189      iterationsComparator.RightSideParameter.ActualName = MaximumIterationsParameter.Name;
    187190      iterationsComparator.ResultParameter.ActualName = "Terminate";
  • trunk/sources/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj

    r5351 r5753  
    124124      <SubType>Code</SubType>
    125125    </Compile>
     126    <Compile Include="SubScopesCloner.cs" />
    126127    <Compile Include="SubScopesCounter.cs" />
    127128    <Compile Include="SubScopesCreator.cs" />
  • trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj

    r5560 r5753  
    116116    <Compile Include="Interfaces\IDiscreteDoubleMatrixModifier.cs" />
    117117    <Compile Include="Interfaces\IGlobalParticleUpdater.cs" />
     118    <Compile Include="Interfaces\ILocalImprovementOperator.cs" />
    118119    <Compile Include="Interfaces\ILocalParticleUpdater.cs" />
    119120    <Compile Include="Interfaces\IMultiAnalyzer.cs" />
  • trunk/sources/HeuristicLab/3.3/Files.txt

    r5426 r5753  
    1414HeuristicLab.Algorithms.SimulatedAnnealing\3.3:HeuristicLab.Algorithms.SimulatedAnnealing-3.3.dll
    1515HeuristicLab.Algorithms.TabuSearch\3.3:HeuristicLab.Algorithms.TabuSearch-3.3.dll
     16HeuristicLab.Algorithms.VariableNeighborhoodSearch\3.3:HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3.dll
    1617HeuristicLab.Analysis\3.3:HeuristicLab.Analysis-3.3.dll
    1718HeuristicLab.Analysis.Views\3.3:HeuristicLab.Analysis.Views-3.3.dll
Note: See TracChangeset for help on using the changeset viewer.