Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/13 13:13:41 (11 years ago)
Author:
spimming
Message:

#1888:

  • Merged revisions from trunk
Location:
branches/OaaS
Files:
2 deleted
16 edited
8 copied

Legend:

Unmodified
Added
Removed
  • branches/OaaS

  • branches/OaaS/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs

    r8212 r9363  
    134134      storeAlgorithmInEachRun = false;
    135135      runsCounter = 0;
    136       Runs = new RunCollection();
     136      Runs = new RunCollection { OptimizerName = Name };
    137137    }
    138138    protected Algorithm(string name)
     
    142142      storeAlgorithmInEachRun = false;
    143143      runsCounter = 0;
    144       Runs = new RunCollection();
     144      Runs = new RunCollection { OptimizerName = Name };
    145145    }
    146146    protected Algorithm(string name, ParameterCollection parameters)
     
    150150      storeAlgorithmInEachRun = false;
    151151      runsCounter = 0;
    152       Runs = new RunCollection();
     152      Runs = new RunCollection { OptimizerName = Name };
    153153    }
    154154    protected Algorithm(string name, string description)
     
    158158      storeAlgorithmInEachRun = false;
    159159      runsCounter = 0;
    160       Runs = new RunCollection();
     160      Runs = new RunCollection { OptimizerName = Name };
    161161    }
    162162    protected Algorithm(string name, string description, ParameterCollection parameters)
     
    166166      storeAlgorithmInEachRun = false;
    167167      runsCounter = 0;
    168       Runs = new RunCollection();
     168      Runs = new RunCollection { OptimizerName = Name };
    169169    }
    170170    [StorableConstructor]
     
    250250
    251251    #region Events
     252    protected override void OnNameChanged() {
     253      base.OnNameChanged();
     254      Runs.OptimizerName = Name;
     255    }
     256
    252257    public event EventHandler ExecutionStateChanged;
    253258    protected virtual void OnExecutionStateChanged() {
  • branches/OaaS/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs

    r7259 r9363  
    107107      if (Analyzer != null && Problem != null) {
    108108        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
    109           Analyzer.Operators.Add(analyzer);
     109          Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
    110110        }
    111111      }
  • branches/OaaS/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj

    r7228 r9363  
    114114  </ItemGroup>
    115115  <ItemGroup>
     116    <Compile Include="Interfaces\ISingleObjectivePathRelinker.cs" />
     117    <Compile Include="Interfaces\ISingleObjectiveImprovementOperator.cs" />
     118    <Compile Include="Interfaces\ISingleObjectiveSolutionSimilarityCalculator.cs" />
     119    <Compile Include="Interfaces\IImprovementOperator.cs" />
     120    <Compile Include="Interfaces\IPathRelinker.cs" />
     121    <Compile Include="Interfaces\ISimilarityBasedOperator.cs" />
     122    <Compile Include="Interfaces\ISolutionSimilarityCalculator.cs" />
     123    <Compile Include="MetaOptimizers\BatchRun.cs" />
     124    <Compile Include="MetaOptimizers\Experiment.cs" />
     125    <Compile Include="MetaOptimizers\TimeLimitRun.cs" />
    116126    <Compile Include="RunCollectionModification\RunCollectionRunRemover.cs" />
    117127    <Compile Include="Plugin.cs" />
     
    123133    <None Include="Plugin.cs.frame" />
    124134    <Compile Include="Algorithms\Algorithm.cs" />
    125     <Compile Include="BatchRun.cs" />
    126135    <Compile Include="RunCollectionModification\Calculator.cs" />
    127136    <Compile Include="Interfaces\IDiscreteDoubleMatrixModifier.cs" />
     
    166175    <Compile Include="RunCollectionConstraints\IRunCollectionConstraint.cs" />
    167176    <Compile Include="OptimizerList.cs" />
    168     <Compile Include="Experiment.cs" />
    169177    <Compile Include="Interfaces\IOptimizer.cs" />
    170178    <Compile Include="RunCollection.cs" />
     
    274282  -->
    275283  <PropertyGroup>
    276     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     284    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    277285set ProjectDir=$(ProjectDir)
    278286set SolutionDir=$(SolutionDir)
     
    281289call PreBuildEvent.cmd
    282290</PreBuildEvent>
     291    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     292export ProjectDir=$(ProjectDir)
     293export SolutionDir=$(SolutionDir)
     294
     295$SolutionDir/PreBuildEvent.sh
     296</PreBuildEvent>
    283297  </PropertyGroup>
    284298</Project>
  • branches/OaaS/HeuristicLab.Optimization/3.3/Interfaces/IMultiAnalyzer.cs

    r7259 r9363  
    2626  /// An interface which represents a multi analysis operator.
    2727  /// </summary>
    28   public interface IMultiAnalyzer : IMultiOperator<IAnalyzer>, IAnalyzer { }
     28  public interface IMultiAnalyzer : ICheckedMultiOperator<IAnalyzer>, IAnalyzer { }
    2929}
  • branches/OaaS/HeuristicLab.Optimization/3.3/Interfaces/IRunCollectionModifier.cs

    r7228 r9363  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/OaaS/HeuristicLab.Optimization/3.3/Plugin.cs.frame

    r7259 r9363  
    2626  /// Plugin class for HeuristicLab.Optimization plugin.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.Optimization", "3.3.6.$WCREV$")]
     28  [Plugin("HeuristicLab.Optimization", "3.3.7.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Optimization-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • branches/OaaS/HeuristicLab.Optimization/3.3/Properties/AssemblyInfo.cs.frame

    r7259 r9363  
    5454// by using the '*' as shown below:
    5555[assembly: AssemblyVersion("3.3.0.0")]
    56 [assembly: AssemblyFileVersion("3.3.6.$WCREV$")]
     56[assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollection.cs

    r7798 r9363  
    4444      : base(original, cloner) {
    4545      updateOfRunsInProgress = false;
     46      optimizerName = original.optimizerName;
     47
    4648      resultNames = new List<string>(original.resultNames);
    4749      parameterNames = new List<string>(original.parameterNames);
     
    104106    }
    105107
     108    private string optimizerName = string.Empty;
     109    [Storable]
     110    public string OptimizerName {
     111      get { return optimizerName; }
     112      set {
     113        if (value != optimizerName && !string.IsNullOrEmpty(value)) {
     114          optimizerName = value;
     115          OnOptimizerNameChanged();
     116        }
     117      }
     118    }
     119
     120    // BackwardsCompatibility3.3
     121    #region Backwards compatible code, remove with 3.4
     122    [Storable(AllowOneWay = true)]
     123    private string AlgorithmName {
     124      set { optimizerName = value; }
     125    }
     126    #endregion
     127
    106128    [StorableHook(HookType.AfterDeserialization)]
    107129    private void AfterDeserialization() {
     
    120142    protected virtual void OnUpdateOfRunsInProgressChanged() {
    121143      var handler = UpdateOfRunsInProgressChanged;
     144      if (handler != null) handler(this, EventArgs.Empty);
     145    }
     146
     147    public event EventHandler OptimizerNameChanged;
     148    protected virtual void OnOptimizerNameChanged() {
     149      var handler = OptimizerNameChanged;
    122150      if (handler != null) handler(this, EventArgs.Empty);
    123151    }
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollectionModification/Calculator.cs

    r7228 r9363  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System;
    223using System.Collections.Generic;
    324using System.Globalization;
    425using System.Linq;
     26using System.Text;
    527using System.Text.RegularExpressions;
    628using HeuristicLab.Common;
     
    830using HeuristicLab.Data;
    931using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    10 using System.Text;
    1132
    1233namespace HeuristicLab.Optimization {
     
    2142    [Storable]
    2243    public string Formula {
    23       get { return string.Join(" ", tokens); }
     44      get { return tokens == null ? string.Empty : string.Join(" ", tokens); }
    2445      set { tokens = Tokenize(value).ToList(); }
    2546    }
     
    5677      int i = 0;
    5778      try {
    58         for (; i<tokens.Count; i++) {
     79        for (; i < tokens.Count; i++) {
    5980          var token = tokens[i];
    6081          double d;
     
    6485            stack.Push(GetVariableValue(variables, token.Substring(1, token.Length - 2).Replace("\\\"", "\"")));
    6586          } else if (token.StartsWith("'")) {
    66             stack.Push(token.Substring(1, token.Length-2).Replace("\\'", "'"));
     87            stack.Push(token.Substring(1, token.Length - 2).Replace("\\'", "'"));
    6788          } else {
    6889            Apply(token, stack, variables);
    6990          }
    7091        }
    71       } catch (Exception x) {
     92      }
     93      catch (Exception x) {
    7294        throw new Exception(string.Format(
    7395          "Calculation of '{1}'{0}failed at token #{2}: {3} {0}current stack is: {0}{4}", Environment.NewLine,
    74           Formula, i, TokenWithContext(tokens, i, 3), 
     96          Formula, i, TokenWithContext(tokens, i, 3),
    7597          string.Join(Environment.NewLine, stack.Select(AsString))),
    7698          x);
     
    89111    private string TokenWithContext(List<string> tokens, int i, int context) {
    90112      var sb = new StringBuilder();
    91       if (i > context+1)
     113      if (i > context + 1)
    92114        sb.Append("... ");
    93115      int prefix = Math.Max(0, i - context);
     
    104126    private static void Apply(string token, Stack<object> stack, IDictionary<string, IItem> variables) {
    105127      switch (token) {
    106         case "null":  stack.Push(null); break;
    107         case "true":  stack.Push(true); break;
     128        case "null": stack.Push(null); break;
     129        case "true": stack.Push(true); break;
    108130        case "false": stack.Push(false); break;
    109131
     
    186208      try {
    187209        stack.Push(func(a));
    188       } catch (Exception) {
     210      }
     211      catch (Exception) {
    189212        stack.Push(a);
    190213        throw;
     
    199222      try {
    200223        stack.Push(func(a, b));
    201       } catch (Exception) {
     224      }
     225      catch (Exception) {
    202226        stack.Push(b);
    203227        stack.Push(a);
     
    214238      try {
    215239        stack.Push(func(a, b, c));
    216       } catch (Exception) {
     240      }
     241      catch (Exception) {
    217242        stack.Push(a);
    218243        stack.Push(b);
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionDiscretizer.cs

    r7228 r9363  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionFormulaModifer.cs

    r7228 r9363  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionGroupCreater.cs

    r7228 r9363  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionRunRemover.cs

    r7228 r9363  
    1 using System.Collections.Generic;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System.Collections.Generic;
    223using HeuristicLab.Common;
    324using HeuristicLab.Core;
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionSorter.cs

    r7228 r9363  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/OaaS/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionValueRemover.cs

    r7228 r9363  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
Note: See TracChangeset for help on using the changeset viewer.