Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/11/12 22:57:09 (11 years ago)
Author:
abeham
Message:

#1329:

  • Moved decoders and evaluators from encoding to problem
  • Removed unnecessary state variables in operators
  • Introduced parameters in interfaces and added wiring code
  • Removed ConcreteScheduleManipulator as it does not perform any manipulation
  • Made ErrorPolicy and ForcingStrategy configurable and added views for them
  • Renamed the SchedulingEvaluationAlgorithm and also converted the AlgorithmOperator to a SingleSuccessorOperator
  • Fixed Plugin- and AssemblyFileVersion
  • Added missing license headers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMRandomCreator.cs

    r8603 r8887  
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    30 
    3130namespace HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix {
    3231  [Item("JobSequenceMatrixCreator", "Creator class used to create Job Sequence Matrix solutions for standard JobShop scheduling problems.")]
    3332  [StorableClass]
    34   public class JSMRandomCreator : ScheduleCreator<JSMEncoding>, IStochasticOperator {
    35     #region Parameter Properties
     33  public class JSMRandomCreator : ScheduleCreator, IStochasticOperator {
     34
    3635    public ILookupParameter<IRandom> RandomParameter {
    3736      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
     
    4342      get { return (IValueLookupParameter<IntValue>)Parameters["Resources"]; }
    4443    }
    45     #endregion
    46 
    4744
    4845    [StorableConstructor]
    4946    protected JSMRandomCreator(bool deserializing) : base(deserializing) { }
    50     protected JSMRandomCreator(JSMRandomCreator original, Cloner cloner)
    51       : base(original, cloner) {
    52     }
    53     public override IDeepCloneable Clone(Cloner cloner) {
    54       return new JSMRandomCreator(this, cloner);
    55     }
     47    protected JSMRandomCreator(JSMRandomCreator original, Cloner cloner) : base(original, cloner) { }
    5648    public JSMRandomCreator()
    5749      : base() {
     
    6355    }
    6456
     57    public override IDeepCloneable Clone(Cloner cloner) {
     58      return new JSMRandomCreator(this, cloner);
     59    }
    6560
    6661    public static JSMEncoding Apply(int jobs, int resources, IRandom random) {
    67       JSMEncoding solution = new JSMEncoding();
    68 
     62      var solution = new JSMEncoding();
    6963      for (int i = 0; i < resources; i++) {
    7064        solution.JobSequenceMatrix.Add(new Permutation(PermutationTypes.Absolute, jobs, random));
    7165      }
    72 
    7366      return solution;
    7467    }
    7568
    76 
    77     protected override JSMEncoding CreateSolution() {
     69    protected override IScheduleEncoding CreateSolution() {
    7870      return Apply(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue);
    7971    }
Note: See TracChangeset for help on using the changeset viewer.