Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/14/11 14:53:14 (13 years ago)
Author:
jhelm
Message:

#1329: Did some minor changes affecting datatypes.

File:
1 edited

Legend:

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

    r6406 r6412  
    7272      Task currentResult = RandomRule(tasks);
    7373      foreach (Task t in tasks) {
    74         if (t.Duration.Value < currentResult.Duration.Value)
     74        if (t.Duration < currentResult.Duration)
    7575          currentResult = t;
    7676      }
     
    8282      Task currentResult = RandomRule(tasks);
    8383      foreach (Task t in tasks) {
    84         if (t.Duration.Value > currentResult.Duration.Value)
     84        if (t.Duration > currentResult.Duration)
    8585          currentResult = t;
    8686      }
     
    9494      foreach (Task t in tasks) {
    9595        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;
    9999        }
    100100        if (remainingProcessingTime > currentLargestRemainingProcessingTime) {
     
    112112      foreach (Task t in tasks) {
    113113        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;
    117117        }
    118118        if (remainingProcessingTime < currentSmallestRemainingProcessingTime) {
     
    130130      foreach (Task t in tasks) {
    131131        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)
    134134            nrOfRemainingTasks++;
    135135        }
     
    148148      foreach (Task t in tasks) {
    149149        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)
    152152            nrOfRemainingTasks++;
    153153        }
     
    218218      foreach (Job j in jobs) {
    219219        foreach (Task t in j.Tasks) {
    220           t.IsScheduled.Value = false;
     220          t.IsScheduled = false;
    221221        }
    222222      }
     
    235235        //STEP 3 - Select an operation from the conflict set (various methods depending on how the algorithm should work..)
    236236        //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);
    238238
    239239        //STEP 4 - Adding the selected operation to the current schedule
    240         selectedTask.IsScheduled.Value = true;
     240        selectedTask.IsScheduled = true;
    241241        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);
    243243
    244244        //STEP 5 - Back to STEP 1
Note: See TracChangeset for help on using the changeset viewer.