- Timestamp:
- 05/10/11 17:25:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPJob.cs
r6121 r6177 33 33 [Item("Job Class", "Represents a composition of tasks that require processing in a job shop scheduling problem.")] 34 34 [StorableClass] 35 public class JSSPJob : ParameterizedNamedItem{35 public class JSSPJob : IndexedTaskList { 36 36 [StorableConstructor] 37 37 protected JSSPJob(bool deserializing) : base(deserializing) { } 38 38 protected JSSPJob(JSSPJob original, Cloner cloner) 39 39 : base(original, cloner) { 40 this.JobIndex = cloner.Clone(original.JobIndex);41 this.Tasks = cloner.Clone(original.Tasks);42 40 } 43 41 public override IDeepCloneable Clone(Cloner cloner) { … … 45 43 } 46 44 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) {} 77 46 78 47 public override string ToString() { 79 48 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) { 82 51 sb.Append(t.ToString () + " "); 83 52 } … … 85 54 return sb.ToString(); 86 55 } 87 88 56 } 89 57 }
Note: See TracChangeset
for help on using the changeset viewer.