lib/taskjuggler/ResourceScenario.rb in taskjuggler-3.4.0 vs lib/taskjuggler/ResourceScenario.rb in taskjuggler-3.5.0

- old
+ new

@@ -1,11 +1,11 @@ #!/usr/bin/env ruby -w # encoding: UTF-8 # # = ResourceScenario.rb -- The TaskJuggler III Project Management Software # -# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012 +# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 # by Chris Schlaeger <chris@linux.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. @@ -197,10 +197,11 @@ # "#{@scoreboard.idxToDate(sbIdx)}/#{sbIdx} for task #{task.fullId}\n" @scoreboard[sbIdx] = task # Track the total allocated slots for this resource. @effort += @efficiency @limits.inc(sbIdx) if @limits + task.incLimits(@scenarioIdx, sbIdx, @property) # Scoreboard iterations are fairly expensive but they are very frequent # operations in later processing. To limit the interations to the # relevant intervals, we store the interval for all bookings and for # each individual task. @@ -740,14 +741,18 @@ end end # Get the first available slot of the resource. def getMinSlot + initScoreboard unless @minslot + @minslot end # Get the last available slot of the resource. def getMaxSlot + initScoreboard unless @maxslot + @maxslot end private