Changeset 6685 for branches/GeneralizedQAP/HeuristicLab.Optimization/3.3
- Timestamp:
- 08/31/11 11:52:11 (13 years ago)
- Location:
- branches/GeneralizedQAP
- Files:
-
- 7 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP
- Property svn:mergeinfo changed
/trunk/sources (added) merged: 6648-6649,6652-6656,6661-6674,6676-6681,6684
- Property svn:mergeinfo changed
-
branches/GeneralizedQAP/HeuristicLab.Optimization/3.3/Calculator.cs
r6684 r6685 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 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 22 using System; 2 23 using System.Collections.Generic; 3 using System. Drawing;24 using System.Globalization; 4 25 using System.Linq; 5 26 using System.Text.RegularExpressions; … … 7 28 using HeuristicLab.Core; 8 29 using HeuristicLab.Data; 9 using HeuristicLab.Parameters;10 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 11 using System.Globalization;12 31 13 namespace HeuristicLab.Optimization { 14 32 namespace HeuristicLab.Optimization { 33 15 34 [StorableClass] 16 35 public class Calculator : IDeepCloneable { 17 36 18 37 #region Fields & Properties 19 38 20 39 private List<string> tokens; 21 40 … … 26 45 } 27 46 28 private static readonly Regex TokenRegex = new Regex(@"[a-zA-Z0-9._]+|""([^""]|\"")+""|[-+*/^]|log"); 47 private static readonly Regex TokenRegex = new Regex(@"[a-zA-Z0-9._]+|""([^""]|\"")+""|[-+*/^]|log"); 29 48 30 49 #endregion … … 36 55 public Calculator() { } 37 56 public Calculator(Calculator original, Cloner cloner) { 38 this.tokens = original.tokens.ToList(); 57 if (original.tokens != null) 58 this.tokens = original.tokens.ToList(); 39 59 } 40 60 public IDeepCloneable Clone(Cloner cloner) { … … 101 121 if (stack.Count != 1) 102 122 return new StringValue("Invalid final evaluation stack size != 1"); 103 return new DoubleValue(stack.Pop()); 104 } 123 return new DoubleValue(stack.Pop()); 124 } 105 125 } 106 126 } -
branches/GeneralizedQAP/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r6042 r6685 111 111 </ItemGroup> 112 112 <ItemGroup> 113 <Compile Include="RunCollectionSorter.cs" /> 114 <Compile Include="RunCollectionValueRemover.cs" /> 115 <Compile Include="IRunCollectionModifier.cs" /> 113 116 <None Include="HeuristicLabOptimizationPlugin.cs.frame" /> 114 117 <Compile Include="Algorithms\Algorithm.cs" /> 115 118 <Compile Include="BatchRun.cs" /> 119 <Compile Include="Calculator.cs" /> 116 120 <Compile Include="Interfaces\IDiscreteDoubleMatrixModifier.cs" /> 117 121 <Compile Include="Algorithms\HeuristicOptimizationEngineAlgorithm.cs" /> … … 136 140 <Compile Include="Interfaces\ISingleObjectiveHeuristicOptimizationProblem.cs" /> 137 141 <Compile Include="Problems\Problem.cs" /> 142 <Compile Include="RunCollectionFormulaModifer.cs" /> 143 <Compile Include="RunCollectionFuzzifier.cs" /> 144 <Compile Include="RunCollectionModificationEvaluator.cs" /> 138 145 <Compile Include="RunCollectionConstraints\RunCollectionComparisonConstraint.cs" /> 139 146 <Compile Include="RunCollectionConstraints\RunCollectionConstraintCollection.cs" /> 147 <Compile Include="RunCollectionConstraints\RunCollectionContentConstraint.cs" /> 140 148 <Compile Include="RunCollectionConstraints\RunCollectionTypeCompatiblityConstraint.cs" /> 141 149 <Compile Include="RunCollectionConstraints\RunCollectionEqualityConstraint.cs" /> … … 244 252 </BootstrapperPackage> 245 253 </ItemGroup> 254 <ItemGroup /> 246 255 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 247 256 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/GeneralizedQAP/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/GeneralizedQAP/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs
r5445 r6685 26 26 public interface IRunCollectionConstraint : IConstraint { 27 27 new RunCollection ConstrainedValue { get; set; } 28 } 29 30 public interface IRunCollectionColumnConstraint : IRunCollectionConstraint { 28 31 string ConstraintColumn { get; set; } 29 32 event EventHandler ConstraintColumnChanged; -
branches/GeneralizedQAP/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs
r5445 r6685 30 30 [StorableClass] 31 31 [Item("RunCollectionComparisonConstraint", "A constraint which compares the members of the contained runs with the constraint data.")] 32 public class RunCollectionComparisonConstraint : ComparisonConstraint, IRunCollectionCo nstraint {32 public class RunCollectionComparisonConstraint : ComparisonConstraint, IRunCollectionColumnConstraint { 33 33 [StorableConstructor] 34 34 protected RunCollectionComparisonConstraint(bool deserializing) : base(deserializing) { } -
branches/GeneralizedQAP/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs
r5445 r6685 30 30 [StorableClass] 31 31 [Item("RunCollectionEqualityConstraint", "A constraint which checks the members of the contained runs for equality to the constraint data.")] 32 public class RunCollectionEqualityConstraint : EqualityConstraint, IRunCollectionCo nstraint {32 public class RunCollectionEqualityConstraint : EqualityConstraint, IRunCollectionColumnConstraint { 33 33 [StorableConstructor] 34 34 protected RunCollectionEqualityConstraint(bool deserializing) : base(deserializing) { } … … 100 100 foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) { 101 101 IItem item = ConstrainedValue.GetValue(run, constraintColumn); 102 if ( !base.Check(item.ToString()))102 if (item != null && !base.Check(item.ToString())) 103 103 run.Visible = false; 104 104 } -
branches/GeneralizedQAP/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs
r5445 r6685 30 30 [StorableClass] 31 31 [Item("RunCollectionTypeCompatibilityConstraint", "A constraint which checks the members of the contained runs for type compabitiliby to the constraint data.")] 32 public class RunCollectionTypeCompatibilityConstraint : TypeCompatibilityConstraint, IRunCollectionCo nstraint {32 public class RunCollectionTypeCompatibilityConstraint : TypeCompatibilityConstraint, IRunCollectionColumnConstraint { 33 33 [StorableConstructor] 34 34 protected RunCollectionTypeCompatibilityConstraint(bool deserializing) {
Note: See TracChangeset
for help on using the changeset viewer.