using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Encodings.PermutationEncoding; using HeuristicLab.Optimization; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HeuristicLab.Problems.PermutationFlowShop { [Item("One Max Problem", "Represents a problem whose objective is to maximize the number of true values.")] [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 210)] [StorableClass] public class PermutationFlowShopProblem : SingleObjectiveBasicProblem { [StorableConstructor] protected PermutationFlowShopProblem(bool deserializing) : base(deserializing) { } protected PermutationFlowShopProblem(PermutationFlowShopProblem original, Cloner cloner) : base(original, cloner) { } public PermutationFlowShopProblem() { } public override IDeepCloneable Clone(Cloner cloner) { return new PermutationFlowShopProblem(this, cloner); } public override bool Maximization { get { return false; } } public override double Evaluate(Individual individual, IRandom random) { var permutation = individual.Permutation(); return random.NextDouble(); } } }