- Timestamp:
- 02/06/15 14:42:48 (10 years ago)
- Location:
- branches/ProgrammableProblem/HeuristicLab.Optimization/3.3
- Files:
-
- 1 added
- 29 edited
- 5 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/BasicProblem.cs
r11945 r11949 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Optimization;28 27 using HeuristicLab.Parameters; 29 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 29 31 namespace HeuristicLab. Problems.Programmable{30 namespace HeuristicLab.Optimization { 32 31 [StorableClass] 33 32 public abstract class BasicProblem<TEncoding, TEvaluator> : HeuristicOptimizationProblem<TEvaluator, ISolutionCreator>, IProblemDefinition, IStorableContent -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Encoding.cs
r11945 r11949 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 30 namespace HeuristicLab. Problems.Programmable{30 namespace HeuristicLab.Optimization { 31 31 [Item("Encoding", "Base class for describing different encodings.")] 32 32 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Individuals/Individual.cs
r11885 r11949 22 22 using System; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Encodings.BinaryVectorEncoding;25 using HeuristicLab.Encodings.IntegerVectorEncoding;26 using HeuristicLab.Encodings.PermutationEncoding;27 using HeuristicLab.Encodings.RealVectorEncoding;28 24 29 namespace HeuristicLab. Problems.Programmable{25 namespace HeuristicLab.Optimization { 30 26 public abstract class Individual { 31 27 protected IEncoding Encoding { get; private set; } … … 61 57 } 62 58 } 63 64 #region extension methods65 public static class IndividualExtensionMethods {66 public static BinaryVector BinaryVector(this Individual individual) {67 var encoding = individual.GetEncoding<BinaryVectorEncoding>();68 return individual.BinaryVector(encoding.Name);69 }70 public static BinaryVector BinaryVector(this Individual individual, string name) {71 return (BinaryVector)individual[name];72 }73 74 public static IntegerVector IntegerVector(this Individual individual) {75 var encoding = individual.GetEncoding<IntegerVectorEncoding>();76 return individual.IntegerVector(encoding.Name);77 }78 public static IntegerVector IntegerVector(this Individual individual, string name) {79 return (IntegerVector)individual[name];80 }81 82 public static Permutation Permutation(this Individual individual) {83 var encoding = individual.GetEncoding<PermutationEncoding>();84 return individual.Permutation(encoding.Name);85 }86 public static Permutation Permutation(this Individual individual, string name) {87 return (Permutation)individual[name];88 }89 90 public static RealVector RealVector(this Individual individual) {91 var encoding = individual.GetEncoding<RealVectorEncoding>();92 return individual.RealVector(encoding.Name);93 }94 public static RealVector RealVector(this Individual individual, string name) {95 return (RealVector)individual[name];96 }97 }98 #endregion99 59 } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Individuals/MultiEncodingIndividual.cs
r11885 r11949 26 26 using HeuristicLab.Core; 27 27 28 namespace HeuristicLab. Problems.Programmable{28 namespace HeuristicLab.Optimization { 29 29 public sealed class MultiEncodingIndividual : Individual { 30 30 private new MultiEncoding Encoding { -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Individuals/SingleEncodingIndividual.cs
r11885 r11949 24 24 using HeuristicLab.Core; 25 25 26 namespace HeuristicLab. Problems.Programmable{26 namespace HeuristicLab.Optimization { 27 27 public sealed class SingleEncodingIndividual : Individual { 28 28 public SingleEncodingIndividual(IEncoding encoding, IScope scope) -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IEncoding.cs
r11753 r11949 25 25 using HeuristicLab.Optimization; 26 26 27 namespace HeuristicLab. Problems.Programmable{27 namespace HeuristicLab.Optimization { 28 28 public interface IEncoding : IParameterizedNamedItem { 29 29 ISolutionCreator SolutionCreator { get; set; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IEncodingOperator.cs
r11739 r11949 22 22 using HeuristicLab.Core; 23 23 24 namespace HeuristicLab. Problems.Programmable{24 namespace HeuristicLab.Optimization { 25 25 public interface IEncodingOperator : IOperator { 26 26 ILookupParameter<IEncoding> EncodingParameter { get; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IMultiEncodingOperator.cs
r11885 r11949 22 22 using HeuristicLab.Core; 23 23 24 namespace HeuristicLab. Problems.Programmable{24 namespace HeuristicLab.Optimization { 25 25 public interface IMultiEncodingOperator : IOperator { 26 26 void AddEncoding(IEncoding encoding); -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IMultiObjectiveProblemDefinition.cs
r11880 r11949 23 23 using HeuristicLab.Optimization; 24 24 25 namespace HeuristicLab. Problems.Programmable{25 namespace HeuristicLab.Optimization { 26 26 public interface IMultiObjectiveProblemDefinition : IProblemDefinition { 27 27 bool[] Maximization { get; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IProblemDefinition.cs
r11768 r11949 22 22 using HeuristicLab.Core; 23 23 24 namespace HeuristicLab. Problems.Programmable{24 namespace HeuristicLab.Optimization { 25 25 public interface IProblemDefinition { 26 26 IEncoding Encoding { get; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISingleObjectiveMoveOperator.cs
r11753 r11949 21 21 using HeuristicLab.Optimization; 22 22 23 namespace HeuristicLab. Problems.Programmable{23 namespace HeuristicLab.Optimization { 24 24 public interface ISingleObjectiveMoveOperator : IMoveOperator { 25 25 } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISingleObjectiveProblemDefinition.cs
r11880 r11949 24 24 using HeuristicLab.Optimization; 25 25 26 namespace HeuristicLab. Problems.Programmable{26 namespace HeuristicLab.Optimization { 27 27 public interface ISingleObjectiveProblemDefinition : IProblemDefinition { 28 28 bool Maximization { get; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/IMultiObjectiveAnalysisOperator.cs
r11880 r11949 22 22 using System; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization;25 24 26 namespace HeuristicLab. Problems.Programmable{25 namespace HeuristicLab.Optimization { 27 26 internal interface IMultiObjectiveAnalysisOperator : IEncodingOperator, IAnalyzer { 28 27 Action<Individual[], double[][], ResultCollection, IRandom> AnalyzeAction { get; set; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/IMultiObjectiveEvaluationOperator.cs
r11740 r11949 24 24 using HeuristicLab.Optimization; 25 25 26 namespace HeuristicLab. Problems.Programmable{26 namespace HeuristicLab.Optimization { 27 27 internal interface IMultiObjectiveEvaluationOperator : IMultiObjectiveEvaluator, IEncodingOperator { 28 28 Func<Individual, IRandom, double[]> EvaluateFunc { get; set; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/INeighborBasedOperator.cs
r11739 r11949 24 24 using HeuristicLab.Core; 25 25 26 namespace HeuristicLab. Problems.Programmable{26 namespace HeuristicLab.Optimization { 27 27 internal interface INeighborBasedOperator : IEncodingOperator { 28 28 Func<Individual, IRandom, IEnumerable<Individual>> GetNeighborsFunc { get; set; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/ISingleObjectiveAnalysisOperator.cs
r11880 r11949 24 24 using HeuristicLab.Optimization; 25 25 26 namespace HeuristicLab. Problems.Programmable{26 namespace HeuristicLab.Optimization { 27 27 internal interface ISingleObjectiveAnalysisOperator : IEncodingOperator { 28 28 Action<Individual[], double[], ResultCollection, IRandom> AnalyzeAction { get; set; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/ISingleObjectiveEvaluationOperator.cs
r11739 r11949 24 24 using HeuristicLab.Optimization; 25 25 26 namespace HeuristicLab. Problems.Programmable{26 namespace HeuristicLab.Optimization { 27 27 internal interface ISingleObjectiveEvaluationOperator : ISingleObjectiveEvaluator, IEncodingOperator { 28 28 Func<Individual, IRandom, double> EvaluateFunc { get; set; } -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/MultiEncoding.cs
r11945 r11949 28 28 using HeuristicLab.PluginInfrastructure; 29 29 30 namespace HeuristicLab. Problems.Programmable{30 namespace HeuristicLab.Optimization { 31 31 [Item("MultiEncoding", "Describes a combined encoding consisting of multiple simpler encodings.")] 32 32 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/MultiObjectiveBasicProblem.cs
r11945 r11949 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Optimization;27 26 using HeuristicLab.Parameters; 28 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 28 30 namespace HeuristicLab. Problems.Programmable{29 namespace HeuristicLab.Optimization { 31 30 [StorableClass] 32 31 public abstract class MultiObjectiveBasicProblem<TEncoding> : BasicProblem<TEncoding, MultiObjectiveEvaluator>, IMultiObjectiveHeuristicOptimizationProblem, IMultiObjectiveProblemDefinition -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingCreator.cs
r11797 r11949 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Core; 26 using HeuristicLab.Optimization;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 29 namespace HeuristicLab. Problems.Programmable{28 namespace HeuristicLab.Optimization { 30 29 [Item("MultiEncodingCreator", "Contains solution creators that together create a multi-encoding.")] 31 30 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingCrossover.cs
r11797 r11949 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization;25 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 25 27 namespace HeuristicLab. Problems.Programmable{26 namespace HeuristicLab.Optimization { 28 27 [Item("MultiEncoding Crossover", "Applies different crossovers to cross a multi-encoding.")] 29 28 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingManipulator.cs
r11797 r11949 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 27 namespace HeuristicLab. Problems.Programmable{27 namespace HeuristicLab.Optimization { 28 28 [Item("MultiEncoding Manipulator", "Applies different manipulators to change a multi-encoding.")] 29 29 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingOperator.cs
r11885 r11949 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 30 namespace HeuristicLab. Problems.Programmable{30 namespace HeuristicLab.Optimization { 31 31 [StorableClass] 32 32 public abstract class MultiEncodingOperator<T> : Operator, IMultiEncodingOperator where T : class,IOperator { -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiObjectiveAnalyzer.cs
r11880 r11949 10 10 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 11 11 12 namespace HeuristicLab. Problems.Programmable{12 namespace HeuristicLab.Optimization { 13 13 [Item("Multi-objective Analyzer", "Calls the Analyze method of the problem definition.")] 14 14 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiObjectiveEvaluator.cs
r11740 r11949 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 30 31 namespace HeuristicLab. Problems.Programmable{31 namespace HeuristicLab.Optimization { 32 32 [Item("Multi-objective Evaluator", "Calls the Evaluate method of the problem definition and writes the return value into the scope.")] 33 33 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveAnalyzer.cs
r11880 r11949 10 10 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 11 11 12 namespace HeuristicLab. Problems.Programmable{12 namespace HeuristicLab.Optimization { 13 13 [Item("Single-objective Analyzer", "Calls the script's Analyze method to be able to write into the results collection.")] 14 14 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveEvaluator.cs
r11739 r11949 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 30 31 namespace HeuristicLab. Problems.Programmable{31 namespace HeuristicLab.Optimization { 32 32 [Item("Single-objective Evaluator", "Calls the script's Evaluate method to get the quality value of the parameter vector.")] 33 33 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveImprover.cs
r11885 r11949 31 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 32 33 namespace HeuristicLab. Problems.Programmable{33 namespace HeuristicLab.Optimization { 34 34 [Item("Single-objective Improver", "Improves a solution by calling GetNeighbors and Evaluate of the corresponding problem definition.")] 35 35 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveEvaluator.cs
r11753 r11949 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 30 31 namespace HeuristicLab. Problems.Programmable{31 namespace HeuristicLab.Optimization { 32 32 [Item("Single-objective MoveEvaluator", "Evaluates a parameter vector that results from a move.")] 33 33 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveGenerator.cs
r11885 r11949 32 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 33 34 namespace HeuristicLab. Problems.Programmable{34 namespace HeuristicLab.Optimization { 35 35 [Item("Single-objective MoveGenerator", "Calls the GetNeighbors method of the problem definition to obtain the moves.")] 36 36 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveMaker.cs
r11885 r11949 25 25 using HeuristicLab.Data; 26 26 using HeuristicLab.Operators; 27 using HeuristicLab.Optimization;28 27 using HeuristicLab.Parameters; 29 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 29 31 namespace HeuristicLab. Problems.Programmable{30 namespace HeuristicLab.Optimization { 32 31 [Item("Single-objective MoveMaker", "Applies a move.")] 33 32 [StorableClass] -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveBasicProblem.cs
r11945 r11949 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Analysis;25 24 using HeuristicLab.Common; 26 25 using HeuristicLab.Core; 27 26 using HeuristicLab.Data; 28 using HeuristicLab.Optimization;29 27 using HeuristicLab.Parameters; 30 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 29 32 namespace HeuristicLab. Problems.Programmable{30 namespace HeuristicLab.Optimization { 33 31 [StorableClass] 34 32 public abstract class SingleObjectiveBasicProblem<TEncoding> : BasicProblem<TEncoding, SingleObjectiveEvaluator>, … … 49 47 50 48 Operators.Add(Evaluator); 51 Operators.Add(new BestScopeSolutionAnalyzer());52 49 Operators.Add(new SingleObjectiveAnalyzer()); 53 50 Operators.Add(new SingleObjectiveImprover()); -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r11812 r11949 125 125 <Private>False</Private> 126 126 </Reference> 127 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 128 <SpecificVersion>False</SpecificVersion> 129 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath> 130 </Reference> 127 131 <Reference Include="HeuristicLab.Parameters-3.3"> 128 132 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> … … 153 157 <ItemGroup> 154 158 <Compile Include="Algorithms\BasicAlgorithm.cs" /> 159 <Compile Include="BasicProblems\BasicProblem.cs" /> 160 <Compile Include="BasicProblems\Encoding.cs" /> 161 <Compile Include="BasicProblems\Individuals\Individual.cs" /> 162 <Compile Include="BasicProblems\Individuals\MultiEncodingIndividual.cs" /> 163 <Compile Include="BasicProblems\Individuals\SingleEncodingIndividual.cs" /> 164 <Compile Include="BasicProblems\Interfaces\IEncoding.cs" /> 165 <Compile Include="BasicProblems\Interfaces\IEncodingOperator.cs" /> 166 <Compile Include="BasicProblems\Interfaces\IMultiEncodingOperator.cs" /> 167 <Compile Include="BasicProblems\Interfaces\IMultiObjectiveProblemDefinition.cs" /> 168 <Compile Include="BasicProblems\Interfaces\internal\IMultiObjectiveAnalysisOperator.cs" /> 169 <Compile Include="BasicProblems\Interfaces\internal\IMultiObjectiveEvaluationOperator.cs" /> 170 <Compile Include="BasicProblems\Interfaces\internal\INeighborBasedOperator.cs" /> 171 <Compile Include="BasicProblems\Interfaces\internal\ISingleObjectiveAnalysisOperator.cs" /> 172 <Compile Include="BasicProblems\Interfaces\internal\ISingleObjectiveEvaluationOperator.cs" /> 173 <Compile Include="BasicProblems\Interfaces\IProblemDefinition.cs" /> 174 <Compile Include="BasicProblems\Interfaces\ISingleObjectiveMoveOperator.cs" /> 175 <Compile Include="BasicProblems\Interfaces\ISingleObjectiveProblemDefinition.cs" /> 176 <Compile Include="BasicProblems\MultiEncoding.cs" /> 177 <Compile Include="BasicProblems\MultiObjectiveBasicProblem.cs" /> 178 <Compile Include="BasicProblems\Operators\MultiEncodingCreator.cs" /> 179 <Compile Include="BasicProblems\Operators\MultiEncodingCrossover.cs" /> 180 <Compile Include="BasicProblems\Operators\MultiEncodingManipulator.cs" /> 181 <Compile Include="BasicProblems\Operators\MultiEncodingOperator.cs" /> 182 <Compile Include="BasicProblems\Operators\MultiObjectiveAnalyzer.cs" /> 183 <Compile Include="BasicProblems\Operators\MultiObjectiveEvaluator.cs" /> 184 <Compile Include="BasicProblems\Operators\SingleObjectiveAnalyzer.cs" /> 185 <Compile Include="BasicProblems\Operators\SingleObjectiveEvaluator.cs" /> 186 <Compile Include="BasicProblems\Operators\SingleObjectiveImprover.cs" /> 187 <Compile Include="BasicProblems\Operators\SingleObjectiveMoveEvaluator.cs" /> 188 <Compile Include="BasicProblems\Operators\SingleObjectiveMoveGenerator.cs" /> 189 <Compile Include="BasicProblems\Operators\SingleObjectiveMoveMaker.cs" /> 190 <Compile Include="BasicProblems\SingleObjectiveBasicProblem.cs" /> 155 191 <Compile Include="Interfaces\ILocalImprovementAlgorithmOperator.cs" /> 156 192 <Compile Include="Interfaces\ISingleObjectivePathRelinker.cs" /> -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Plugin.cs.frame
r11174 r11949 33 33 [PluginDependency("HeuristicLab.Core", "3.3")] 34 34 [PluginDependency("HeuristicLab.Data", "3.3")] 35 [PluginDependency("HeuristicLab.Operators", "3.3")] 35 36 [PluginDependency("HeuristicLab.Parameters", "3.3")] 36 37 [PluginDependency("HeuristicLab.Persistence", "3.3")]
Note: See TracChangeset
for help on using the changeset viewer.