- Timestamp:
- 06/14/11 14:53:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Decoders/PRVDecoder.cs
r6406 r6412 72 72 Task currentResult = RandomRule(tasks); 73 73 foreach (Task t in tasks) { 74 if (t.Duration .Value < currentResult.Duration.Value)74 if (t.Duration < currentResult.Duration) 75 75 currentResult = t; 76 76 } … … 82 82 Task currentResult = RandomRule(tasks); 83 83 foreach (Task t in tasks) { 84 if (t.Duration .Value > currentResult.Duration.Value)84 if (t.Duration > currentResult.Duration) 85 85 currentResult = t; 86 86 } … … 94 94 foreach (Task t in tasks) { 95 95 double remainingProcessingTime = 0; 96 foreach (Task jt in jobs[t.JobNr .Value].Tasks) {97 if (!jt.IsScheduled .Value)98 remainingProcessingTime += jt.Duration .Value;96 foreach (Task jt in jobs[t.JobNr].Tasks) { 97 if (!jt.IsScheduled) 98 remainingProcessingTime += jt.Duration; 99 99 } 100 100 if (remainingProcessingTime > currentLargestRemainingProcessingTime) { … … 112 112 foreach (Task t in tasks) { 113 113 double remainingProcessingTime = 0; 114 foreach (Task jt in jobs[t.JobNr .Value].Tasks) {115 if (!jt.IsScheduled .Value)116 remainingProcessingTime += jt.Duration .Value;114 foreach (Task jt in jobs[t.JobNr].Tasks) { 115 if (!jt.IsScheduled) 116 remainingProcessingTime += jt.Duration; 117 117 } 118 118 if (remainingProcessingTime < currentSmallestRemainingProcessingTime) { … … 130 130 foreach (Task t in tasks) { 131 131 int nrOfRemainingTasks = 0; 132 foreach (Task jt in jobs[t.JobNr .Value].Tasks) {133 if (!jt.IsScheduled .Value)132 foreach (Task jt in jobs[t.JobNr].Tasks) { 133 if (!jt.IsScheduled) 134 134 nrOfRemainingTasks++; 135 135 } … … 148 148 foreach (Task t in tasks) { 149 149 int nrOfRemainingTasks = 0; 150 foreach (Task jt in jobs[t.JobNr .Value].Tasks) {151 if (!jt.IsScheduled .Value)150 foreach (Task jt in jobs[t.JobNr].Tasks) { 151 if (!jt.IsScheduled) 152 152 nrOfRemainingTasks++; 153 153 } … … 218 218 foreach (Job j in jobs) { 219 219 foreach (Task t in j.Tasks) { 220 t.IsScheduled .Value= false;220 t.IsScheduled = false; 221 221 } 222 222 } … … 235 235 //STEP 3 - Select an operation from the conflict set (various methods depending on how the algorithm should work..) 236 236 //Task selectedTask = SelectTaskFromConflictSet(conflictSet, solution.PriorityRulesVector [currentDecisionIndex++], solution.NrOfRules.Value); 237 Task selectedTask = SelectTaskFromConflictSet(conflictSet, solution.PriorityRulesVector[minimal.JobNr .Value], solution.NrOfRules.Value);237 Task selectedTask = SelectTaskFromConflictSet(conflictSet, solution.PriorityRulesVector[minimal.JobNr], solution.NrOfRules.Value); 238 238 239 239 //STEP 4 - Adding the selected operation to the current schedule 240 selectedTask.IsScheduled .Value= true;240 selectedTask.IsScheduled = true; 241 241 double startTime = GTAlgorithmUtils.ComputeEarliestStartTime(selectedTask, resultingSchedule); 242 resultingSchedule.ScheduleTask(selectedTask.ResourceNr .Value, startTime, selectedTask.Duration.Value, selectedTask.JobNr.Value);242 resultingSchedule.ScheduleTask(selectedTask.ResourceNr, startTime, selectedTask.Duration, selectedTask.JobNr); 243 243 244 244 //STEP 5 - Back to STEP 1
Note: See TracChangeset
for help on using the changeset viewer.