Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/11 17:25:35 (13 years ago)
Author:
jhelm
Message:

#1329: Implemented PriorityRulesVector based encoding and added new operators to the JSMEncoding. Added Gantt-Charts for visualization of schedules and problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPJob.cs

    r6121 r6177  
    3333  [Item("Job Class", "Represents a composition of tasks that require processing in a job shop scheduling problem.")]
    3434  [StorableClass]
    35   public class JSSPJob : ParameterizedNamedItem {
     35  public class JSSPJob : IndexedTaskList {
    3636    [StorableConstructor]
    3737    protected JSSPJob(bool deserializing) : base(deserializing) { }
    3838    protected JSSPJob(JSSPJob original, Cloner cloner)
    3939      : base(original, cloner) {
    40       this.JobIndex = cloner.Clone(original.JobIndex);
    41       this.Tasks = cloner.Clone(original.Tasks);
    4240    }
    4341    public override IDeepCloneable Clone(Cloner cloner) {
     
    4543    }
    4644
    47     #region Parameter Properties
    48     public ValueParameter<IntValue> JobIndexParameter {
    49       get { return (ValueParameter<IntValue>)Parameters["JobIndex"]; }
    50     }
    51 
    52     public ValueParameter<ItemList<Task>> TasksParameter {
    53       get { return (ValueParameter<ItemList<Task>>)Parameters["Tasks"]; }
    54     }
    55     #endregion
    56 
    57     #region Properties
    58     public IntValue JobIndex {
    59       get { return JobIndexParameter.Value; }
    60       set { JobIndexParameter.Value = value; }
    61     }
    62     public ItemList<Task> Tasks {
    63       get { return TasksParameter.Value; }
    64       set { TasksParameter.Value = value; }
    65     }
    66     #endregion
    67 
    68 
    69     public JSSPJob(IntValue ji) {
    70       Parameters.Add(new ValueParameter<IntValue>("JobIndex", "The index of the job in the associated JSSP-Instance.", new IntValue()));
    71       Parameters.Add(new ValueParameter<ItemList<Task>>("Tasks", "Taskdata defining duration, start-time and resource assignment of the tasks.", new ItemList<Task>()));
    72 
    73       JobIndex = ji;
    74       Tasks = new ItemList<Task>();
    75     }
    76 
     45    public JSSPJob(IntValue index) : base (index) {}
    7746
    7847    public override string ToString() {
    7948      StringBuilder sb = new StringBuilder();
    80       sb.Append("Job" + JobIndex + " [ ");
    81       foreach (Task t in Tasks) {
     49      sb.Append("Job#" + Index + " [ ");
     50      foreach (JSSPTask t in Tasks) {
    8251        sb.Append(t.ToString () + " ");
    8352      }
     
    8554      return sb.ToString();
    8655    }
    87 
    8856  }
    8957}
Note: See TracChangeset for help on using the changeset viewer.