doc/TaskJuggler/TaskScenario.html in taskjuggler-0.0.5 vs doc/TaskJuggler/TaskScenario.html in taskjuggler-0.0.6
- old
+ new
@@ -67,122 +67,126 @@
<div id="method-list-section" class="section">
<h3 class="section-header">Methods</h3>
<ul class="link-list">
- <li><a href="#M001346">::new</a></li>
+ <li><a href="#method-c-new">::new</a></li>
- <li><a href="#M001348">#Xref</a></li>
+ <li><a href="#method-i-Xref">#Xref</a></li>
- <li><a href="#M001368">#addBooking</a></li>
+ <li><a href="#method-i-addBooking">#addBooking</a></li>
- <li><a href="#M001389">#bookBookings</a></li>
+ <li><a href="#method-i-bookBookings">#bookBookings</a></li>
- <li><a href="#M001388">#bookResource</a></li>
+ <li><a href="#method-i-bookResource">#bookResource</a></li>
- <li><a href="#M001387">#bookResources</a></li>
+ <li><a href="#method-i-bookResources">#bookResources</a></li>
- <li><a href="#M001398">#calcCompletion</a></li>
+ <li><a href="#method-i-calcCompletion">#calcCompletion</a></li>
- <li><a href="#M001358">#calcCriticalness</a></li>
+ <li><a href="#method-i-calcCriticalness">#calcCriticalness</a></li>
- <li><a href="#M001359">#calcPathCriticalness</a></li>
+ <li><a href="#method-i-calcPathCriticalness">#calcPathCriticalness</a></li>
- <li><a href="#M001397">#calcPathCriticalnessEndSuccs</a></li>
+ <li><a href="#method-i-calcPathCriticalnessEndSuccs">#calcPathCriticalnessEndSuccs</a></li>
- <li><a href="#M001399">#calcStatus</a></li>
+ <li><a href="#method-i-calcStatus">#calcStatus</a></li>
- <li><a href="#M001363">#canInheritDate?</a></li>
+ <li><a href="#method-i-canInheritDate%3F">#canInheritDate?</a></li>
- <li><a href="#M001356">#candidates</a></li>
+ <li><a href="#method-i-candidates">#candidates</a></li>
- <li><a href="#M001394">#checkDependency</a></li>
+ <li><a href="#method-i-checkDependency">#checkDependency</a></li>
- <li><a href="#M001355">#checkForLoops</a></li>
+ <li><a href="#method-i-checkForLoops">#checkForLoops</a></li>
- <li><a href="#M001382">#collectTimeOffIntervals</a></li>
+ <li><a href="#method-i-collectTimeOffIntervals">#collectTimeOffIntervals</a></li>
- <li><a href="#M001357">#countResourceAllocations</a></li>
+ <li><a href="#method-i-countResourceAllocations">#countResourceAllocations</a></li>
- <li><a href="#M001366">#earliestStart</a></li>
+ <li><a href="#method-i-earliestStart">#earliestStart</a></li>
- <li><a href="#M001352">#finishScheduling</a></li>
+ <li><a href="#method-i-finishScheduling">#finishScheduling</a></li>
- <li><a href="#M001380">#getAllocatedTime</a></li>
+ <li><a href="#method-i-getAllocatedTime">#getAllocatedTime</a></li>
- <li><a href="#M001381">#getEffectiveWork</a></li>
+ <li><a href="#method-i-getEffectiveWork">#getEffectiveWork</a></li>
- <li><a href="#M001390">#hasDependencies</a></li>
+ <li><a href="#method-i-hasDependencies">#hasDependencies</a></li>
- <li><a href="#M001349">#hasDependency?</a></li>
+ <li><a href="#method-i-hasDependency%3F">#hasDependency?</a></li>
- <li><a href="#M001365">#hasDurationSpec?</a></li>
+ <li><a href="#method-i-hasDurationSpec%3F">#hasDurationSpec?</a></li>
- <li><a href="#M001384">#hasResourceAllocated?</a></li>
+ <li><a href="#method-i-hasResourceAllocated%3F">#hasResourceAllocated?</a></li>
- <li><a href="#M001391">#hasSuccessors</a></li>
+ <li><a href="#method-i-hasSuccessors">#hasSuccessors</a></li>
- <li><a href="#M001383">#isDependencyOf</a></li>
+ <li><a href="#method-i-isDependencyOf">#isDependencyOf</a></li>
- <li><a href="#M001367">#latestEnd</a></li>
+ <li><a href="#method-i-isFeatureOf">#isFeatureOf</a></li>
- <li><a href="#M001392">#markAsRunaway</a></li>
+ <li><a href="#method-i-latestEnd">#latestEnd</a></li>
- <li><a href="#M001393">#markMilestone</a></li>
+ <li><a href="#method-i-limitsOk%3F">#limitsOk?</a></li>
- <li><a href="#M001386">#nextSlot</a></li>
+ <li><a href="#method-i-markAsRunaway">#markAsRunaway</a></li>
- <li><a href="#M001353">#postScheduleCheck</a></li>
+ <li><a href="#method-i-markMilestone">#markMilestone</a></li>
- <li><a href="#M001351">#preScheduleCheck</a></li>
+ <li><a href="#method-i-nextSlot">#nextSlot</a></li>
- <li><a href="#M001347">#prepareScheduling</a></li>
+ <li><a href="#method-i-postScheduleCheck">#postScheduleCheck</a></li>
- <li><a href="#M001362">#propagateDate</a></li>
+ <li><a href="#method-i-preScheduleCheck">#preScheduleCheck</a></li>
- <li><a href="#M001396">#propagateDateToDep</a></li>
+ <li><a href="#method-i-prepareScheduling">#prepareScheduling</a></li>
- <li><a href="#M001350">#propagateInitialValues</a></li>
+ <li><a href="#method-i-propagateDate">#propagateDate</a></li>
- <li><a href="#M001369">#query_complete</a></li>
+ <li><a href="#method-i-propagateDateToDep">#propagateDateToDep</a></li>
- <li><a href="#M001370">#query_cost</a></li>
+ <li><a href="#method-i-propagateInitialValues">#propagateInitialValues</a></li>
- <li><a href="#M001371">#query_duration</a></li>
+ <li><a href="#method-i-query_complete">#query_complete</a></li>
- <li><a href="#M001374">#query_effort</a></li>
+ <li><a href="#method-i-query_cost">#query_cost</a></li>
- <li><a href="#M001372">#query_effortdone</a></li>
+ <li><a href="#method-i-query_duration">#query_duration</a></li>
- <li><a href="#M001373">#query_effortleft</a></li>
+ <li><a href="#method-i-query_effort">#query_effort</a></li>
- <li><a href="#M001375">#query_followers</a></li>
+ <li><a href="#method-i-query_effortdone">#query_effortdone</a></li>
- <li><a href="#M001376">#query_precursors</a></li>
+ <li><a href="#method-i-query_effortleft">#query_effortleft</a></li>
- <li><a href="#M001377">#query_resources</a></li>
+ <li><a href="#method-i-query_followers">#query_followers</a></li>
- <li><a href="#M001378">#query_revenue</a></li>
+ <li><a href="#method-i-query_precursors">#query_precursors</a></li>
- <li><a href="#M001379">#query_targets</a></li>
+ <li><a href="#method-i-query_resources">#query_resources</a></li>
- <li><a href="#M001360">#readyForScheduling?</a></li>
+ <li><a href="#method-i-query_revenue">#query_revenue</a></li>
- <li><a href="#M001354">#resetLoopFlags</a></li>
+ <li><a href="#method-i-query_targets">#query_targets</a></li>
- <li><a href="#M001361">#schedule</a></li>
+ <li><a href="#method-i-readyForScheduling%3F">#readyForScheduling?</a></li>
- <li><a href="#M001364">#scheduleContainer</a></li>
+ <li><a href="#method-i-resetLoopFlags">#resetLoopFlags</a></li>
- <li><a href="#M001385">#scheduleSlot</a></li>
+ <li><a href="#method-i-schedule">#schedule</a></li>
- <li><a href="#M001395">#setDetermination</a></li>
+ <li><a href="#method-i-scheduleContainer">#scheduleContainer</a></li>
- <li><a href="#M001400">#targets</a></li>
+ <li><a href="#method-i-scheduleSlot">#scheduleSlot</a></li>
- <li><a href="#M001401">#turnover</a></li>
+ <li><a href="#method-i-setDetermination">#setDetermination</a></li>
+ <li><a href="#method-i-targets">#targets</a></li>
+
+ <li><a href="#method-i-turnover">#turnover</a></li>
+
</ul>
</div>
<!-- Included Modules -->
@@ -194,10 +198,12 @@
<div id="fileindex-section" class="section project-section">
<h3 class="section-header">Files</h3>
<ul>
+ <li class="file"><a href="../CHANGELOG.html">CHANGELOG</a></li>
+
<li class="file"><a href="../COPYING.html">COPYING</a></li>
<li class="file"><a href="../README.html">README</a></li>
</ul>
@@ -363,10 +369,12 @@
<li><a href="../TaskJuggler/NikuReport.html">TaskJuggler::NikuReport</a></li>
<li><a href="../TaskJuggler/NikuResource.html">TaskJuggler::NikuResource</a></li>
+ <li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
+
<li><a href="../TaskJuggler/OnShiftCache.html">TaskJuggler::OnShiftCache</a></li>
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
<li><a href="../TaskJuggler/ProcessIntercomIface.html">TaskJuggler::ProcessIntercomIface</a></li>
@@ -377,10 +385,12 @@
<li><a href="../TaskJuggler/ProjectBrokerIface.html">TaskJuggler::ProjectBrokerIface</a></li>
<li><a href="../TaskJuggler/ProjectFileParser.html">TaskJuggler::ProjectFileParser</a></li>
+ <li><a href="../TaskJuggler/ProjectFileScanner.html">TaskJuggler::ProjectFileScanner</a></li>
+
<li><a href="../TaskJuggler/ProjectRecord.html">TaskJuggler::ProjectRecord</a></li>
<li><a href="../TaskJuggler/ProjectServer.html">TaskJuggler::ProjectServer</a></li>
<li><a href="../TaskJuggler/ProjectServerIface.html">TaskJuggler::ProjectServerIface</a></li>
@@ -393,16 +403,20 @@
<li><a href="../TaskJuggler/PropertyTreeNode.html">TaskJuggler::PropertyTreeNode</a></li>
<li><a href="../TaskJuggler/Query.html">TaskJuggler::Query</a></li>
+ <li><a href="../TaskJuggler/RTFHandlers.html">TaskJuggler::RTFHandlers</a></li>
+
<li><a href="../TaskJuggler/RTFNavigator.html">TaskJuggler::RTFNavigator</a></li>
<li><a href="../TaskJuggler/RTFQuery.html">TaskJuggler::RTFQuery</a></li>
<li><a href="../TaskJuggler/RTFReport.html">TaskJuggler::RTFReport</a></li>
+ <li><a href="../TaskJuggler/RTFReportLink.html">TaskJuggler::RTFReportLink</a></li>
+
<li><a href="../TaskJuggler/RealFormat.html">TaskJuggler::RealFormat</a></li>
<li><a href="../TaskJuggler/RealFormatAttribute.html">TaskJuggler::RealFormatAttribute</a></li>
<li><a href="../TaskJuggler/ReferenceAttribute.html">TaskJuggler::ReferenceAttribute</a></li>
@@ -417,10 +431,12 @@
<li><a href="../TaskJuggler/ReportServerIface.html">TaskJuggler::ReportServerIface</a></li>
<li><a href="../TaskJuggler/ReportServerRecord.html">TaskJuggler::ReportServerRecord</a></li>
+ <li><a href="../TaskJuggler/ReportServlet.html">TaskJuggler::ReportServlet</a></li>
+
<li><a href="../TaskJuggler/ReportTable.html">TaskJuggler::ReportTable</a></li>
<li><a href="../TaskJuggler/ReportTableCell.html">TaskJuggler::ReportTableCell</a></li>
<li><a href="../TaskJuggler/ReportTableColumn.html">TaskJuggler::ReportTableColumn</a></li>
@@ -545,10 +561,12 @@
<li><a href="../TaskJuggler/TextScanner/BufferStreamHandle.html">TaskJuggler::TextScanner::BufferStreamHandle</a></li>
<li><a href="../TaskJuggler/TextScanner/FileStreamHandle.html">TaskJuggler::TextScanner::FileStreamHandle</a></li>
+ <li><a href="../TaskJuggler/TextScanner/MacroStackEntry.html">TaskJuggler::TextScanner::MacroStackEntry</a></li>
+
<li><a href="../TaskJuggler/TextScanner/StreamHandle.html">TaskJuggler::TextScanner::StreamHandle</a></li>
<li><a href="../TaskJuggler/TimeSheet.html">TaskJuggler::TimeSheet</a></li>
<li><a href="../TaskJuggler/TimeSheetReceiver.html">TaskJuggler::TimeSheetReceiver</a></li>
@@ -589,12 +607,16 @@
<li><a href="../TaskJuggler/TjpExportRE.html">TaskJuggler::TjpExportRE</a></li>
<li><a href="../TaskJuggler/TjpSyntaxRules.html">TaskJuggler::TjpSyntaxRules</a></li>
+ <li><a href="../TaskJuggler/URLParameter.html">TaskJuggler::URLParameter</a></li>
+
<li><a href="../TaskJuggler/UserManual.html">TaskJuggler::UserManual</a></li>
+ <li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li>
+
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
<li><a href="../TaskJuggler/XMLBlob.html">TaskJuggler::XMLBlob</a></li>
@@ -617,10 +639,12 @@
<li><a href="../RuntimeConfig.html">RuntimeConfig</a></li>
<li><a href="../String.html">String</a></li>
+ <li><a href="../StringIO.html">StringIO</a></li>
+
</ul>
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
</div>
@@ -666,11 +690,11 @@
<div id="public-class-method-details" class="method-section section">
<h3 class="section-header">Public Class Methods</h3>
<div id="new-method" class="method-detail ">
- <a name="M001346"></a>
+ <a name="method-c-new"></a>
<div class="method-heading">
<span class="method-name">new</span><span
class="method-args">(task, scenarioIdx, attributes)</span>
@@ -711,11 +735,11 @@
<div id="public-instance-method-details" class="method-section section">
<h3 class="section-header">Public Instance Methods</h3>
<div id="-ref-method" class="method-detail ">
- <a name="M001348"></a>
+ <a name="method-i-Xref"></a>
<div class="method-heading">
<span class="method-name">Xref</span><span
class="method-args">()</span>
@@ -767,11 +791,11 @@
</div>
<div id="add-ooking-method" class="method-detail ">
- <a name="M001368"></a>
+ <a name="method-i-addBooking"></a>
<div class="method-heading">
<span class="method-name">addBooking</span><span
class="method-args">(booking)</span>
@@ -786,20 +810,20 @@
<div class="method-source-code"
id="add-ooking-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1084</span>
-1084: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">addBooking</span>(<span class="ruby-identifier">booking</span>)
-1085: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span>
-1086: <span class="ruby-comment cmt"># For the first item use the assignment form so that the 'provided'</span>
-1087: <span class="ruby-comment cmt"># attribute is set properly.</span>
-1088: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'booking'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = [ <span class="ruby-identifier">booking</span> ]
-1089: <span class="ruby-keyword kw">else</span>
-1090: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'booking'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">booking</span>
-1091: <span class="ruby-keyword kw">end</span>
-1092: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1090</span>
+1090: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">addBooking</span>(<span class="ruby-identifier">booking</span>)
+1091: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span>
+1092: <span class="ruby-comment cmt"># For the first item use the assignment form so that the 'provided'</span>
+1093: <span class="ruby-comment cmt"># attribute is set properly.</span>
+1094: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'booking'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = [ <span class="ruby-identifier">booking</span> ]
+1095: <span class="ruby-keyword kw">else</span>
+1096: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'booking'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">booking</span>
+1097: <span class="ruby-keyword kw">end</span>
+1098: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -807,11 +831,11 @@
</div>
<div id="calc-riticalness-method" class="method-detail ">
- <a name="M001358"></a>
+ <a name="method-i-calcCriticalness"></a>
<div class="method-heading">
<span class="method-name">calcCriticalness</span><span
class="method-args">()</span>
@@ -871,11 +895,11 @@
</div>
<div id="calc-ath-riticalness-method" class="method-detail ">
- <a name="M001359"></a>
+ <a name="method-i-calcPathCriticalness"></a>
<div class="method-heading">
<span class="method-name">calcPathCriticalness</span><span
class="method-args">(atEnd = false)</span>
@@ -957,11 +981,11 @@
</div>
<div id="can-nherit-ate--method" class="method-detail ">
- <a name="M001363"></a>
+ <a name="method-i-canInheritDate%3F"></a>
<div class="method-heading">
<span class="method-name">canInheritDate?</span><span
class="method-args">(atEnd)</span>
@@ -980,63 +1004,63 @@
<div class="method-source-code"
id="can-nherit-ate--source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 872</span>
-872: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">canInheritDate?</span>(<span class="ruby-identifier">atEnd</span>)
-873: <span class="ruby-comment cmt"># Inheriting a start or end date from the enclosing task or the project</span>
-874: <span class="ruby-comment cmt"># is allowed for the following scenarios:</span>
-875: <span class="ruby-comment cmt"># - --> - inherit start and end when no bookings but allocations</span>
-876: <span class="ruby-comment cmt"># present</span>
-877: <span class="ruby-comment cmt"># - <-- - dito</span>
-878: <span class="ruby-comment cmt">#</span>
-879: <span class="ruby-comment cmt"># - x-> - inhS</span>
-880: <span class="ruby-comment cmt"># - x-> | inhS</span>
-881: <span class="ruby-comment cmt"># - x-> -D inhS</span>
-882: <span class="ruby-comment cmt"># - x-> |D inhS</span>
-883: <span class="ruby-comment cmt"># - --> | inhS</span>
-884: <span class="ruby-comment cmt"># - --> -D inhS</span>
-885: <span class="ruby-comment cmt"># - --> |D inhS</span>
-886: <span class="ruby-comment cmt"># - <-- | inhS</span>
-887: <span class="ruby-comment cmt"># | --> - inhE</span>
-888: <span class="ruby-comment cmt"># | <-x - inhE</span>
-889: <span class="ruby-comment cmt"># |D <-x - inhE</span>
-890: <span class="ruby-comment cmt"># - <-x - inhE</span>
-891: <span class="ruby-comment cmt"># -D <-x - inhE</span>
-892: <span class="ruby-comment cmt"># | <-- - inhE</span>
-893: <span class="ruby-comment cmt"># |D <-- - inhE</span>
-894: <span class="ruby-comment cmt"># -D <-- - inhE</span>
-895: <span class="ruby-comment cmt"># Return false if we already have a date or if we have a dependency for</span>
-896: <span class="ruby-comment cmt"># this end.</span>
-897: <span class="ruby-identifier">thisEnd</span> = <span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>
-898: <span class="ruby-identifier">hasThisDeps</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">empty?</span>
-899: <span class="ruby-identifier">hasThisSpec</span> = <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hasThisDeps</span>
-900: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hasThisSpec</span>
-901:
-902: <span class="ruby-comment cmt"># Containter task can inherit the date if they have no dependencies.</span>
-903: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
-904:
-905: <span class="ruby-identifier">thatEnd</span> = <span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'start'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'end'</span>
-906: <span class="ruby-identifier">hasThatDeps</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">empty?</span>
-907: <span class="ruby-identifier">hasThatSpec</span> = <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hasThatDeps</span>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 876</span>
+876: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">canInheritDate?</span>(<span class="ruby-identifier">atEnd</span>)
+877: <span class="ruby-comment cmt"># Inheriting a start or end date from the enclosing task or the project</span>
+878: <span class="ruby-comment cmt"># is allowed for the following scenarios:</span>
+879: <span class="ruby-comment cmt"># - --> - inherit start and end when no bookings but allocations</span>
+880: <span class="ruby-comment cmt"># present</span>
+881: <span class="ruby-comment cmt"># - <-- - dito</span>
+882: <span class="ruby-comment cmt">#</span>
+883: <span class="ruby-comment cmt"># - x-> - inhS</span>
+884: <span class="ruby-comment cmt"># - x-> | inhS</span>
+885: <span class="ruby-comment cmt"># - x-> -D inhS</span>
+886: <span class="ruby-comment cmt"># - x-> |D inhS</span>
+887: <span class="ruby-comment cmt"># - --> | inhS</span>
+888: <span class="ruby-comment cmt"># - --> -D inhS</span>
+889: <span class="ruby-comment cmt"># - --> |D inhS</span>
+890: <span class="ruby-comment cmt"># - <-- | inhS</span>
+891: <span class="ruby-comment cmt"># | --> - inhE</span>
+892: <span class="ruby-comment cmt"># | <-x - inhE</span>
+893: <span class="ruby-comment cmt"># |D <-x - inhE</span>
+894: <span class="ruby-comment cmt"># - <-x - inhE</span>
+895: <span class="ruby-comment cmt"># -D <-x - inhE</span>
+896: <span class="ruby-comment cmt"># | <-- - inhE</span>
+897: <span class="ruby-comment cmt"># |D <-- - inhE</span>
+898: <span class="ruby-comment cmt"># -D <-- - inhE</span>
+899: <span class="ruby-comment cmt"># Return false if we already have a date or if we have a dependency for</span>
+900: <span class="ruby-comment cmt"># this end.</span>
+901: <span class="ruby-identifier">thisEnd</span> = <span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>
+902: <span class="ruby-identifier">hasThisDeps</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">empty?</span>
+903: <span class="ruby-identifier">hasThisSpec</span> = <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hasThisDeps</span>
+904: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hasThisSpec</span>
+905:
+906: <span class="ruby-comment cmt"># Containter task can inherit the date if they have no dependencies.</span>
+907: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
908:
-909: <span class="ruby-comment cmt"># Check for tasks that have no start and end spec, no duration spec but</span>
-910: <span class="ruby-comment cmt"># allocates. They can inherit the start and end date.</span>
-911: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hasThatSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span>
+909: <span class="ruby-identifier">thatEnd</span> = <span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'start'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'end'</span>
+910: <span class="ruby-identifier">hasThatDeps</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">empty?</span>
+911: <span class="ruby-identifier">hasThatSpec</span> = <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hasThatDeps</span>
912:
-913: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">^</span> <span class="ruby-identifier">atEnd</span>
-914: <span class="ruby-comment cmt"># the scheduling direction is pointing away from this end</span>
-915: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span>
+913: <span class="ruby-comment cmt"># Check for tasks that have no start and end spec, no duration spec but</span>
+914: <span class="ruby-comment cmt"># allocates. They can inherit the start and end date.</span>
+915: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hasThatSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span>
916:
-917: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">hasThatSpec</span>
-918: <span class="ruby-keyword kw">else</span>
-919: <span class="ruby-comment cmt"># the scheduling direction is pointing towards this end</span>
-920: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">&&</span>
-921: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-comment cmt">#&& a('allocate').empty?</span>
-922: <span class="ruby-keyword kw">end</span>
-923: <span class="ruby-keyword kw">end</span></pre>
+917: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">^</span> <span class="ruby-identifier">atEnd</span>
+918: <span class="ruby-comment cmt"># the scheduling direction is pointing away from this end</span>
+919: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span>
+920:
+921: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">hasThatSpec</span>
+922: <span class="ruby-keyword kw">else</span>
+923: <span class="ruby-comment cmt"># the scheduling direction is pointing towards this end</span>
+924: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thatEnd</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">&&</span>
+925: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-comment cmt">#&& a('allocate').empty?</span>
+926: <span class="ruby-keyword kw">end</span>
+927: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1044,11 +1068,11 @@
</div>
<div id="candidates-method" class="method-detail ">
- <a name="M001356"></a>
+ <a name="method-i-candidates"></a>
<div class="method-heading">
<span class="method-name">candidates</span><span
class="method-args">()</span>
@@ -1089,11 +1113,11 @@
</div>
<div id="check-or-oops-method" class="method-detail ">
- <a name="M001355"></a>
+ <a name="method-i-checkForLoops"></a>
<div class="method-heading">
<span class="method-name">checkForLoops</span><span
class="method-args">(path, atEnd, fromOutside)</span>
@@ -1276,11 +1300,11 @@
</div>
<div id="collect-ime-ff-ntervals-method" class="method-detail ">
- <a name="M001382"></a>
+ <a name="method-i-collectTimeOffIntervals"></a>
<div class="method-heading">
<span class="method-name">collectTimeOffIntervals</span><span
class="method-args">(iv, minDuration)</span>
@@ -1298,18 +1322,18 @@
<div class="method-source-code"
id="collect-ime-ff-ntervals-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1326</span>
-1326: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collectTimeOffIntervals</span>(<span class="ruby-identifier">iv</span>, <span class="ruby-identifier">minDuration</span>)
-1327: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>)
-1328: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>).<span class="ruby-identifier">collectTimeOffIntervals</span>(<span class="ruby-identifier">iv</span>, <span class="ruby-identifier">minDuration</span>)
-1329: <span class="ruby-keyword kw">else</span>
-1330: []
-1331: <span class="ruby-keyword kw">end</span>
-1332: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1332</span>
+1332: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collectTimeOffIntervals</span>(<span class="ruby-identifier">iv</span>, <span class="ruby-identifier">minDuration</span>)
+1333: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>)
+1334: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>).<span class="ruby-identifier">collectTimeOffIntervals</span>(<span class="ruby-identifier">iv</span>, <span class="ruby-identifier">minDuration</span>)
+1335: <span class="ruby-keyword kw">else</span>
+1336: []
+1337: <span class="ruby-keyword kw">end</span>
+1338: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1317,11 +1341,11 @@
</div>
<div id="count-esource-llocations-method" class="method-detail ">
- <a name="M001357"></a>
+ <a name="method-i-countResourceAllocations"></a>
<div class="method-heading">
<span class="method-name">countResourceAllocations</span><span
class="method-args">()</span>
@@ -1361,11 +1385,11 @@
</div>
<div id="earliest-tart-method" class="method-detail ">
- <a name="M001366"></a>
+ <a name="method-i-earliestStart"></a>
<div class="method-heading">
<span class="method-name">earliestStart</span><span
class="method-args">()</span>
@@ -1384,64 +1408,64 @@
<div class="method-source-code"
id="earliest-tart-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 973</span>
- 973: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">earliestStart</span>
- 974: <span class="ruby-comment cmt"># This is the date that we will return.</span>
- 975: <span class="ruby-identifier">startDate</span> = <span class="ruby-keyword kw">nil</span>
- 976: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'depends'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span>
- 977: <span class="ruby-identifier">potentialStartDate</span> =
- 978: <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">task</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">onEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
- 979: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">potentialStartDate</span>.<span class="ruby-identifier">nil?</span>
- 980:
- 981: <span class="ruby-comment cmt"># Determine the end date of a 'length' gap.</span>
- 982: <span class="ruby-identifier">dateAfterLengthGap</span> = <span class="ruby-identifier">potentialStartDate</span>
- 983: <span class="ruby-identifier">gapLength</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapLength</span>
- 984: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dateAfterLengthGap</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>] <span class="ruby-keyword kw">do</span>
- 985: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">dateAfterLengthGap</span>)
- 986: <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
- 987: <span class="ruby-keyword kw">end</span>
- 988: <span class="ruby-identifier">dateAfterLengthGap</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
- 989: <span class="ruby-keyword kw">end</span>
- 990:
- 991: <span class="ruby-comment cmt"># Determine the end date of a 'duration' gap.</span>
- 992: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dateAfterLengthGap</span> <span class="ruby-operator">></span> <span class="ruby-identifier">potentialStartDate</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
- 993: <span class="ruby-identifier">potentialStartDate</span> = <span class="ruby-identifier">dateAfterLengthGap</span>
- 994: <span class="ruby-keyword kw">else</span>
- 995: <span class="ruby-identifier">potentialStartDate</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
- 996: <span class="ruby-keyword kw">end</span>
- 997:
- 998: <span class="ruby-identifier">startDate</span> = <span class="ruby-identifier">potentialStartDate</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span>
- 999: <span class="ruby-identifier">startDate</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">potentialStartDate</span>
-1000: <span class="ruby-keyword kw">end</span>
-1001:
-1002: <span class="ruby-comment cmt"># If any of the parent tasks has an explicit start date, the task must</span>
-1003: <span class="ruby-comment cmt"># start at or after this date.</span>
-1004: <span class="ruby-identifier">task</span> = <span class="ruby-ivar">@property</span>
-1005: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">task</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>) <span class="ruby-keyword kw">do</span>
-1006: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">&&</span>
-1007: (<span class="ruby-identifier">startDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">></span> <span class="ruby-identifier">startDate</span>)
-1008: <span class="ruby-identifier">startDate</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
-1009: <span class="ruby-keyword kw">break</span>
-1010: <span class="ruby-keyword kw">end</span>
-1011: <span class="ruby-keyword kw">end</span>
-1012:
-1013: <span class="ruby-comment cmt"># When the computed start date is after the already determined end date</span>
-1014: <span class="ruby-comment cmt"># of the task, the start dependencies were too weak. This happens when</span>
-1015: <span class="ruby-comment cmt"># task B depends on A and they are specified this way:</span>
-1016: <span class="ruby-comment cmt"># task A: | --> D-</span>
-1017: <span class="ruby-comment cmt"># task B: -D <-- |</span>
-1018: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">startDate</span> <span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
-1019: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'weak_start_dep'</span>,
-1020: <span class="ruby-node">"Task #{@property.fullId} has a too weak start dependencies "</span> <span class="ruby-operator">+</span>
-1021: <span class="ruby-value str">"to be scheduled properly."</span>)
-1022: <span class="ruby-keyword kw">end</span>
-1023:
-1024: <span class="ruby-identifier">startDate</span>
-1025: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 979</span>
+ 979: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">earliestStart</span>
+ 980: <span class="ruby-comment cmt"># This is the date that we will return.</span>
+ 981: <span class="ruby-identifier">startDate</span> = <span class="ruby-keyword kw">nil</span>
+ 982: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'depends'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span>
+ 983: <span class="ruby-identifier">potentialStartDate</span> =
+ 984: <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">task</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">onEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+ 985: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">potentialStartDate</span>.<span class="ruby-identifier">nil?</span>
+ 986:
+ 987: <span class="ruby-comment cmt"># Determine the end date of a 'length' gap.</span>
+ 988: <span class="ruby-identifier">dateAfterLengthGap</span> = <span class="ruby-identifier">potentialStartDate</span>
+ 989: <span class="ruby-identifier">gapLength</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapLength</span>
+ 990: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dateAfterLengthGap</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>] <span class="ruby-keyword kw">do</span>
+ 991: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">dateAfterLengthGap</span>)
+ 992: <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
+ 993: <span class="ruby-keyword kw">end</span>
+ 994: <span class="ruby-identifier">dateAfterLengthGap</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
+ 995: <span class="ruby-keyword kw">end</span>
+ 996:
+ 997: <span class="ruby-comment cmt"># Determine the end date of a 'duration' gap.</span>
+ 998: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dateAfterLengthGap</span> <span class="ruby-operator">></span> <span class="ruby-identifier">potentialStartDate</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
+ 999: <span class="ruby-identifier">potentialStartDate</span> = <span class="ruby-identifier">dateAfterLengthGap</span>
+1000: <span class="ruby-keyword kw">else</span>
+1001: <span class="ruby-identifier">potentialStartDate</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
+1002: <span class="ruby-keyword kw">end</span>
+1003:
+1004: <span class="ruby-identifier">startDate</span> = <span class="ruby-identifier">potentialStartDate</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span>
+1005: <span class="ruby-identifier">startDate</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">potentialStartDate</span>
+1006: <span class="ruby-keyword kw">end</span>
+1007:
+1008: <span class="ruby-comment cmt"># If any of the parent tasks has an explicit start date, the task must</span>
+1009: <span class="ruby-comment cmt"># start at or after this date.</span>
+1010: <span class="ruby-identifier">task</span> = <span class="ruby-ivar">@property</span>
+1011: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">task</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>) <span class="ruby-keyword kw">do</span>
+1012: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">&&</span>
+1013: (<span class="ruby-identifier">startDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">></span> <span class="ruby-identifier">startDate</span>)
+1014: <span class="ruby-identifier">startDate</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+1015: <span class="ruby-keyword kw">break</span>
+1016: <span class="ruby-keyword kw">end</span>
+1017: <span class="ruby-keyword kw">end</span>
+1018:
+1019: <span class="ruby-comment cmt"># When the computed start date is after the already determined end date</span>
+1020: <span class="ruby-comment cmt"># of the task, the start dependencies were too weak. This happens when</span>
+1021: <span class="ruby-comment cmt"># task B depends on A and they are specified this way:</span>
+1022: <span class="ruby-comment cmt"># task A: | --> D-</span>
+1023: <span class="ruby-comment cmt"># task B: -D <-- |</span>
+1024: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">startDate</span> <span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
+1025: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'weak_start_dep'</span>,
+1026: <span class="ruby-node">"Task #{@property.fullId} has a too weak start dependencies "</span> <span class="ruby-operator">+</span>
+1027: <span class="ruby-value str">"to be scheduled properly."</span>)
+1028: <span class="ruby-keyword kw">end</span>
+1029:
+1030: <span class="ruby-identifier">startDate</span>
+1031: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1449,11 +1473,11 @@
</div>
<div id="finish-cheduling-method" class="method-detail ">
- <a name="M001352"></a>
+ <a name="method-i-finishScheduling"></a>
<div class="method-heading">
<span class="method-name">finishScheduling</span><span
class="method-args">()</span>
@@ -1490,11 +1514,11 @@
</div>
<div id="get-llocated-ime-method" class="method-detail ">
- <a name="M001380"></a>
+ <a name="method-i-getAllocatedTime"></a>
<div class="method-heading">
<span class="method-name">getAllocatedTime</span><span
class="method-args">(startIdx, endIdx, resource = nil)</span>
@@ -1512,34 +1536,34 @@
<div class="method-source-code"
id="get-llocated-ime-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1274</span>
-1274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>)
-1275: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0.0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
-1276:
-1277: <span class="ruby-identifier">allocatedTime</span> = <span class="ruby-value">0.0</span>
-1278: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
-1279: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
-1280: <span class="ruby-identifier">allocatedTime</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
-1281: <span class="ruby-identifier">resource</span>)
-1282: <span class="ruby-keyword kw">end</span>
-1283: <span class="ruby-keyword kw">else</span>
-1284: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>
-1285: <span class="ruby-identifier">allocatedTime</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-ivar">@scenarioIdx</span>,
-1286: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
-1287: <span class="ruby-ivar">@property</span>)
-1288: <span class="ruby-keyword kw">else</span>
-1289: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
-1290: <span class="ruby-identifier">allocatedTime</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
-1291: <span class="ruby-ivar">@property</span>)
-1292: <span class="ruby-keyword kw">end</span>
-1293: <span class="ruby-keyword kw">end</span>
-1294: <span class="ruby-keyword kw">end</span>
-1295: <span class="ruby-identifier">allocatedTime</span>
-1296: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1280</span>
+1280: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>)
+1281: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0.0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
+1282:
+1283: <span class="ruby-identifier">allocatedTime</span> = <span class="ruby-value">0.0</span>
+1284: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
+1285: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
+1286: <span class="ruby-identifier">allocatedTime</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
+1287: <span class="ruby-identifier">resource</span>)
+1288: <span class="ruby-keyword kw">end</span>
+1289: <span class="ruby-keyword kw">else</span>
+1290: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>
+1291: <span class="ruby-identifier">allocatedTime</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-ivar">@scenarioIdx</span>,
+1292: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
+1293: <span class="ruby-ivar">@property</span>)
+1294: <span class="ruby-keyword kw">else</span>
+1295: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
+1296: <span class="ruby-identifier">allocatedTime</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
+1297: <span class="ruby-ivar">@property</span>)
+1298: <span class="ruby-keyword kw">end</span>
+1299: <span class="ruby-keyword kw">end</span>
+1300: <span class="ruby-keyword kw">end</span>
+1301: <span class="ruby-identifier">allocatedTime</span>
+1302: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1547,11 +1571,11 @@
</div>
<div id="get-ffective-ork-method" class="method-detail ">
- <a name="M001381"></a>
+ <a name="method-i-getEffectiveWork"></a>
<div class="method-heading">
<span class="method-name">getEffectiveWork</span><span
class="method-args">(startIdx, endIdx, resource = nil)</span>
@@ -1571,33 +1595,33 @@
<div class="method-source-code"
id="get-ffective-ork-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1301</span>
-1301: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>)
-1302: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0.0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
-1303:
-1304: <span class="ruby-identifier">workLoad</span> = <span class="ruby-value">0.0</span>
-1305: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
-1306: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
-1307: <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
-1308: <span class="ruby-identifier">resource</span>)
-1309: <span class="ruby-keyword kw">end</span>
-1310: <span class="ruby-keyword kw">else</span>
-1311: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>
-1312: <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
-1313: <span class="ruby-ivar">@property</span>)
-1314: <span class="ruby-keyword kw">else</span>
-1315: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
-1316: <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
-1317: <span class="ruby-ivar">@property</span>)
-1318: <span class="ruby-keyword kw">end</span>
-1319: <span class="ruby-keyword kw">end</span>
-1320: <span class="ruby-keyword kw">end</span>
-1321: <span class="ruby-identifier">workLoad</span>
-1322: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1307</span>
+1307: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>)
+1308: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0.0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
+1309:
+1310: <span class="ruby-identifier">workLoad</span> = <span class="ruby-value">0.0</span>
+1311: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
+1312: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
+1313: <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
+1314: <span class="ruby-identifier">resource</span>)
+1315: <span class="ruby-keyword kw">end</span>
+1316: <span class="ruby-keyword kw">else</span>
+1317: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>
+1318: <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
+1319: <span class="ruby-ivar">@property</span>)
+1320: <span class="ruby-keyword kw">else</span>
+1321: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
+1322: <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
+1323: <span class="ruby-ivar">@property</span>)
+1324: <span class="ruby-keyword kw">end</span>
+1325: <span class="ruby-keyword kw">end</span>
+1326: <span class="ruby-keyword kw">end</span>
+1327: <span class="ruby-identifier">workLoad</span>
+1328: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1605,11 +1629,11 @@
</div>
<div id="has-ependency--method" class="method-detail ">
- <a name="M001349"></a>
+ <a name="method-i-hasDependency%3F"></a>
<div class="method-heading">
<span class="method-name">hasDependency?</span><span
class="method-args">(depType, target, onEnd)</span>
@@ -1643,11 +1667,11 @@
</div>
<div id="has-uration-pec--method" class="method-detail ">
- <a name="M001365"></a>
+ <a name="method-i-hasDurationSpec%3F"></a>
<div class="method-heading">
<span class="method-name">hasDurationSpec?</span><span
class="method-args">()</span>
@@ -1664,14 +1688,14 @@
<div class="method-source-code"
id="has-uration-pec--source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 966</span>
-966: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasDurationSpec?</span>
-967: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
-968: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 972</span>
+972: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasDurationSpec?</span>
+973: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
+974: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1679,11 +1703,11 @@
</div>
<div id="has-esource-llocated--method" class="method-detail ">
- <a name="M001384"></a>
+ <a name="method-i-hasResourceAllocated%3F"></a>
<div class="method-heading">
<span class="method-name">hasResourceAllocated?</span><span
class="method-args">(interval, resource)</span>
@@ -1701,22 +1725,22 @@
<div class="method-source-code"
id="has-esource-llocated--source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1369</span>
-1369: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasResourceAllocated?</span>(<span class="ruby-identifier">interval</span>, <span class="ruby-identifier">resource</span>)
-1370: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span>
-1371: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">allocated?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">interval</span>, <span class="ruby-ivar">@property</span>)
-1372: <span class="ruby-keyword kw">else</span>
-1373: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
-1374: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">hasResourceAllocated?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">interval</span>,
-1375: <span class="ruby-identifier">resource</span>)
-1376: <span class="ruby-keyword kw">end</span>
-1377: <span class="ruby-keyword kw">end</span>
-1378: <span class="ruby-keyword kw">false</span>
-1379: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1391</span>
+1391: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasResourceAllocated?</span>(<span class="ruby-identifier">interval</span>, <span class="ruby-identifier">resource</span>)
+1392: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span>
+1393: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">allocated?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">interval</span>, <span class="ruby-ivar">@property</span>)
+1394: <span class="ruby-keyword kw">else</span>
+1395: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
+1396: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">hasResourceAllocated?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">interval</span>,
+1397: <span class="ruby-identifier">resource</span>)
+1398: <span class="ruby-keyword kw">end</span>
+1399: <span class="ruby-keyword kw">end</span>
+1400: <span class="ruby-keyword kw">false</span>
+1401: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1724,11 +1748,11 @@
</div>
<div id="is-ependency-f-method" class="method-detail ">
- <a name="M001383"></a>
+ <a name="method-i-isDependencyOf"></a>
<div class="method-heading">
<span class="method-name">isDependencyOf</span><span
class="method-args">(task, depth)</span>
@@ -1739,61 +1763,108 @@
<div class="method-description">
<p>
Check if the <a href="Task.html">Task</a> <em>task</em> depends on this
task. <em>depth</em> specifies how many dependent task are traversed at
-max. A value of 0 means no limit.
+max. A value of 0 means no limit. TODO: Change this to a non-recursive
+implementation.
</p>
<div class="method-source-code"
id="is-ependency-f-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1336</span>
-1336: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span>)
-1337: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@property</span>
-1338:
-1339: <span class="ruby-comment cmt"># Check if any of the parent tasks is a dependency of _task_.</span>
-1340: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
-1341: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span>
-1342: <span class="ruby-comment cmt"># If the parent is a dependency, than all childs are as well.</span>
-1343: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span>)
-1344: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">parent</span>
-1345: <span class="ruby-keyword kw">end</span>
-1346:
-1347:
-1348: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'startsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
-1349: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">1</span>]
-1350: <span class="ruby-comment cmt"># must be a start->start dependency</span>
-1351: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span>)
-1352: <span class="ruby-keyword kw">end</span>
-1353: <span class="ruby-keyword kw">end</span>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1343</span>
+1343: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span>)
+1344: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@property</span>
+1345:
+1346: <span class="ruby-comment cmt"># Check if any of the parent tasks is a dependency of _task_.</span>
+1347: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
+1348: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span>
+1349: <span class="ruby-comment cmt"># If the parent is a dependency, than all childs are as well.</span>
+1350: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span>)
+1351: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">parent</span>
+1352: <span class="ruby-keyword kw">end</span>
+1353:
1354:
-1355: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">depth</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
-1356:
-1357: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
-1358: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">1</span>]
-1359: <span class="ruby-comment cmt"># must be an end->start dependency</span>
-1360: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)
-1361: <span class="ruby-keyword kw">end</span>
-1362: <span class="ruby-keyword kw">end</span>
+1355: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'startsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
+1356: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">1</span>]
+1357: <span class="ruby-comment cmt"># must be a start->start dependency</span>
+1358: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span>)
+1359: <span class="ruby-keyword kw">end</span>
+1360: <span class="ruby-keyword kw">end</span>
+1361:
+1362: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">depth</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
1363:
-1364: <span class="ruby-keyword kw">false</span>
-1365: <span class="ruby-keyword kw">end</span></pre>
+1364: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
+1365: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">1</span>]
+1366: <span class="ruby-comment cmt"># must be an end->start dependency</span>
+1367: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">depth</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)
+1368: <span class="ruby-keyword kw">end</span>
+1369: <span class="ruby-keyword kw">end</span>
+1370:
+1371: <span class="ruby-keyword kw">false</span>
+1372: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
+ <div id="is-eature-f-method" class="method-detail ">
+ <a name="method-i-isFeatureOf"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">isFeatureOf</span><span
+ class="method-args">(task)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+If <em>task</em> or any of its sub-tasks depend on this task or any of its
+sub-tasks, we call this task a feature of <em>task</em>.
+</p>
+
+
+
+ <div class="method-source-code"
+ id="is-eature-f-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1376</span>
+1376: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">isFeatureOf</span>(<span class="ruby-identifier">task</span>)
+1377: <span class="ruby-identifier">sources</span> = <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">all</span>
+1378: <span class="ruby-identifier">destinations</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">all</span>
+1379:
+1380: <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
+1381: <span class="ruby-identifier">destinations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span>
+1382: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">isDependencyOf</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">d</span>, <span class="ruby-value">0</span>)
+1383: <span class="ruby-keyword kw">end</span>
+1384: <span class="ruby-keyword kw">end</span>
+1385:
+1386: <span class="ruby-keyword kw">false</span>
+1387: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
<div id="latest-nd-method" class="method-detail ">
- <a name="M001367"></a>
+ <a name="method-i-latestEnd"></a>
<div class="method-heading">
<span class="method-name">latestEnd</span><span
class="method-args">()</span>
@@ -1812,64 +1883,64 @@
<div class="method-source-code"
id="latest-nd-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1030</span>
-1030: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">latestEnd</span>
-1031: <span class="ruby-comment cmt"># This is the date that we will return.</span>
-1032: <span class="ruby-identifier">endDate</span> = <span class="ruby-keyword kw">nil</span>
-1033: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'precedes'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span>
-1034: <span class="ruby-identifier">potentialEndDate</span> =
-1035: <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">task</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">onEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
-1036: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">potentialEndDate</span>.<span class="ruby-identifier">nil?</span>
-1037:
-1038: <span class="ruby-comment cmt"># Determine the end date of a 'length' gap.</span>
-1039: <span class="ruby-identifier">dateBeforeLengthGap</span> = <span class="ruby-identifier">potentialEndDate</span>
-1040: <span class="ruby-identifier">gapLength</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapLength</span>
-1041: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-keyword kw">do</span>
-1042: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator">-</span>
-1043: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>])
-1044: <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
-1045: <span class="ruby-keyword kw">end</span>
-1046: <span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator">-=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
-1047: <span class="ruby-keyword kw">end</span>
-1048:
-1049: <span class="ruby-comment cmt"># Determine the end date of a 'duration' gap.</span>
-1050: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">potentialEndDate</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
-1051: <span class="ruby-identifier">potentialEndDate</span> = <span class="ruby-identifier">dateBeforeLengthGap</span>
-1052: <span class="ruby-keyword kw">else</span>
-1053: <span class="ruby-identifier">potentialEndDate</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
-1054: <span class="ruby-keyword kw">end</span>
-1055:
-1056: <span class="ruby-identifier">endDate</span> = <span class="ruby-identifier">potentialEndDate</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">endDate</span> <span class="ruby-operator">></span> <span class="ruby-identifier">potentialEndDate</span>
-1057: <span class="ruby-keyword kw">end</span>
-1058:
-1059: <span class="ruby-comment cmt"># If any of the parent tasks has an explicit end date, the task must end</span>
-1060: <span class="ruby-comment cmt"># at or before this date.</span>
-1061: <span class="ruby-identifier">task</span> = <span class="ruby-ivar">@property</span>
-1062: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">task</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>) <span class="ruby-keyword kw">do</span>
-1063: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">&&</span>
-1064: (<span class="ruby-identifier">endDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><</span> <span class="ruby-identifier">endDate</span>)
-1065: <span class="ruby-identifier">endDate</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
-1066: <span class="ruby-keyword kw">break</span>
-1067: <span class="ruby-keyword kw">end</span>
-1068: <span class="ruby-keyword kw">end</span>
-1069:
-1070: <span class="ruby-comment cmt"># When the computed end date is before the already determined start date</span>
-1071: <span class="ruby-comment cmt"># of the task, the end dependencies were too weak. This happens when</span>
-1072: <span class="ruby-comment cmt"># task A precedes B and they are specified this way:</span>
-1073: <span class="ruby-comment cmt"># task A: | --> D-</span>
-1074: <span class="ruby-comment cmt"># task B: -D <-- |</span>
-1075: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">endDate</span> <span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)
-1076: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'weak_end_dep'</span>,
-1077: <span class="ruby-node">"Task #{@property.fullId} has a too weak end dependencies "</span> <span class="ruby-operator">+</span>
-1078: <span class="ruby-value str">"to be scheduled properly."</span>)
-1079: <span class="ruby-keyword kw">end</span>
-1080:
-1081: <span class="ruby-identifier">endDate</span>
-1082: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1036</span>
+1036: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">latestEnd</span>
+1037: <span class="ruby-comment cmt"># This is the date that we will return.</span>
+1038: <span class="ruby-identifier">endDate</span> = <span class="ruby-keyword kw">nil</span>
+1039: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'precedes'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span>
+1040: <span class="ruby-identifier">potentialEndDate</span> =
+1041: <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">task</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">onEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+1042: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">potentialEndDate</span>.<span class="ruby-identifier">nil?</span>
+1043:
+1044: <span class="ruby-comment cmt"># Determine the end date of a 'length' gap.</span>
+1045: <span class="ruby-identifier">dateBeforeLengthGap</span> = <span class="ruby-identifier">potentialEndDate</span>
+1046: <span class="ruby-identifier">gapLength</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapLength</span>
+1047: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-keyword kw">do</span>
+1048: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator">-</span>
+1049: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>])
+1050: <span class="ruby-identifier">gapLength</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
+1051: <span class="ruby-keyword kw">end</span>
+1052: <span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator">-=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
+1053: <span class="ruby-keyword kw">end</span>
+1054:
+1055: <span class="ruby-comment cmt"># Determine the end date of a 'duration' gap.</span>
+1056: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dateBeforeLengthGap</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">potentialEndDate</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
+1057: <span class="ruby-identifier">potentialEndDate</span> = <span class="ruby-identifier">dateBeforeLengthGap</span>
+1058: <span class="ruby-keyword kw">else</span>
+1059: <span class="ruby-identifier">potentialEndDate</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">gapDuration</span>
+1060: <span class="ruby-keyword kw">end</span>
+1061:
+1062: <span class="ruby-identifier">endDate</span> = <span class="ruby-identifier">potentialEndDate</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">endDate</span> <span class="ruby-operator">></span> <span class="ruby-identifier">potentialEndDate</span>
+1063: <span class="ruby-keyword kw">end</span>
+1064:
+1065: <span class="ruby-comment cmt"># If any of the parent tasks has an explicit end date, the task must end</span>
+1066: <span class="ruby-comment cmt"># at or before this date.</span>
+1067: <span class="ruby-identifier">task</span> = <span class="ruby-ivar">@property</span>
+1068: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">task</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>) <span class="ruby-keyword kw">do</span>
+1069: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">&&</span>
+1070: (<span class="ruby-identifier">endDate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><</span> <span class="ruby-identifier">endDate</span>)
+1071: <span class="ruby-identifier">endDate</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+1072: <span class="ruby-keyword kw">break</span>
+1073: <span class="ruby-keyword kw">end</span>
+1074: <span class="ruby-keyword kw">end</span>
+1075:
+1076: <span class="ruby-comment cmt"># When the computed end date is before the already determined start date</span>
+1077: <span class="ruby-comment cmt"># of the task, the end dependencies were too weak. This happens when</span>
+1078: <span class="ruby-comment cmt"># task A precedes B and they are specified this way:</span>
+1079: <span class="ruby-comment cmt"># task A: | --> D-</span>
+1080: <span class="ruby-comment cmt"># task B: -D <-- |</span>
+1081: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">endDate</span> <span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)
+1082: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'weak_end_dep'</span>,
+1083: <span class="ruby-node">"Task #{@property.fullId} has a too weak end dependencies "</span> <span class="ruby-operator">+</span>
+1084: <span class="ruby-value str">"to be scheduled properly."</span>)
+1085: <span class="ruby-keyword kw">end</span>
+1086:
+1087: <span class="ruby-identifier">endDate</span>
+1088: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -1877,11 +1948,11 @@
</div>
<div id="post-chedule-heck-method" class="method-detail ">
- <a name="M001353"></a>
+ <a name="method-i-postScheduleCheck"></a>
<div class="method-heading">
<span class="method-name">postScheduleCheck</span><span
class="method-args">()</span>
@@ -2068,11 +2139,11 @@
</div>
<div id="pre-chedule-heck-method" class="method-detail ">
- <a name="M001351"></a>
+ <a name="method-i-preScheduleCheck"></a>
<div class="method-heading">
<span class="method-name">preScheduleCheck</span><span
class="method-args">()</span>
@@ -2245,11 +2316,11 @@
302: <span class="ruby-identifier">startSpeced</span> = <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">provided</span>(<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>)
303: <span class="ruby-identifier">endSpeced</span> = <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">provided</span>(<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>)
304: <span class="ruby-keyword kw">if</span> ((<span class="ruby-identifier">startSpeced</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">endSpeced</span>) <span class="ruby-operator">||</span>
305: (<span class="ruby-identifier">hasDependencies</span>(<span class="ruby-keyword kw">false</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">endSpeced</span>) <span class="ruby-operator">||</span>
306: (<span class="ruby-identifier">hasDependencies</span>(<span class="ruby-keyword kw">true</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">startSpeced</span>)) <span class="ruby-operator">&&</span>
-307: <span class="ruby-identifier">durationSpecs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>)
+307: <span class="ruby-identifier">durationSpecs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@property</span>.<span class="ruby-identifier">provided</span>(<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>)
308: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_overspecified'</span>,
309: <span class="ruby-node">"Task #{@property.fullId} has a start, an end and a "</span> <span class="ruby-operator">+</span>
310: <span class="ruby-value str">'duration specification.'</span>)
311: <span class="ruby-keyword kw">end</span>
312: <span class="ruby-keyword kw">end</span>
@@ -2271,11 +2342,11 @@
</div>
<div id="prepare-cheduling-method" class="method-detail ">
- <a name="M001347"></a>
+ <a name="method-i-prepareScheduling"></a>
<div class="method-heading">
<span class="method-name">prepareScheduling</span><span
class="method-args">()</span>
@@ -2371,11 +2442,11 @@
</div>
<div id="propagate-ate-method" class="method-detail ">
- <a name="M001362"></a>
+ <a name="method-i-propagateDate"></a>
<div class="method-heading">
<span class="method-name">propagateDate</span><span
class="method-args">(date, atEnd)</span>
@@ -2417,33 +2488,37 @@
840: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
841: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-identifier">otherEnd</span>).<span class="ruby-identifier">nil?</span>
842: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span>), <span class="ruby-operator">!</span><span class="ruby-identifier">atEnd</span>)
843: <span class="ruby-keyword kw">end</span>
844: <span class="ruby-constant">Log</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"Milestone #{@property.fullId}: #{a('start')} -> #{a('end')}"</span>
-845: <span class="ruby-keyword kw">end</span>
-846:
-847: <span class="ruby-comment cmt"># Propagate date to all dependent tasks.</span>
-848: <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-849: <span class="ruby-identifier">propagateDateToDep</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span>)
-850: <span class="ruby-keyword kw">end</span>
-851: <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-852: <span class="ruby-identifier">propagateDateToDep</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span>)
-853: <span class="ruby-keyword kw">end</span>
-854:
-855: <span class="ruby-comment cmt"># Propagate date to sub tasks which have only an implicit</span>
-856: <span class="ruby-comment cmt"># dependency on the parent task and no other criteria for this end of</span>
-857: <span class="ruby-comment cmt"># the task.</span>
-858: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
-859: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">canInheritDate?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">atEnd</span>)
-860: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">date</span>, <span class="ruby-identifier">atEnd</span>)
-861: <span class="ruby-keyword kw">end</span>
-862: <span class="ruby-keyword kw">end</span>
-863:
-864: <span class="ruby-comment cmt"># The date propagation might have completed the date set of the enclosing</span>
-865: <span class="ruby-comment cmt"># containter task. If so, we can schedule it as well.</span>
-866: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">scheduleContainer</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
-867: <span class="ruby-keyword kw">end</span></pre>
+845: <span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">&&</span>
+846: <span class="ruby-operator">!</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span>
+847: <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span>)
+848: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
+849: <span class="ruby-keyword kw">end</span>
+850:
+851: <span class="ruby-comment cmt"># Propagate date to all dependent tasks.</span>
+852: <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+853: <span class="ruby-identifier">propagateDateToDep</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span>)
+854: <span class="ruby-keyword kw">end</span>
+855: <span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+856: <span class="ruby-identifier">propagateDateToDep</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span>)
+857: <span class="ruby-keyword kw">end</span>
+858:
+859: <span class="ruby-comment cmt"># Propagate date to sub tasks which have only an implicit</span>
+860: <span class="ruby-comment cmt"># dependency on the parent task and no other criteria for this end of</span>
+861: <span class="ruby-comment cmt"># the task.</span>
+862: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
+863: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">canInheritDate?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">atEnd</span>)
+864: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">date</span>, <span class="ruby-identifier">atEnd</span>)
+865: <span class="ruby-keyword kw">end</span>
+866: <span class="ruby-keyword kw">end</span>
+867:
+868: <span class="ruby-comment cmt"># The date propagation might have completed the date set of the enclosing</span>
+869: <span class="ruby-comment cmt"># containter task. If so, we can schedule it as well.</span>
+870: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">scheduleContainer</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
+871: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2451,11 +2526,11 @@
</div>
<div id="propagate-nitial-alues-method" class="method-detail ">
- <a name="M001350"></a>
+ <a name="method-i-propagateInitialValues"></a>
<div class="method-heading">
<span class="method-name">propagateInitialValues</span><span
class="method-args">()</span>
@@ -2501,11 +2576,11 @@
</div>
<div id="query-complete-method" class="method-detail ">
- <a name="M001369"></a>
+ <a name="method-i-query_complete"></a>
<div class="method-heading">
<span class="method-name">query_complete</span><span
class="method-args">(query)</span>
@@ -2520,19 +2595,19 @@
<div class="method-source-code"
id="query-complete-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1094</span>
-1094: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_complete</span>(<span class="ruby-identifier">query</span>)
-1095: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span>
-1096: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">complete</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'complete'</span>).<span class="ruby-identifier">to_i</span>
-1097: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-node">"#{complete}%"</span>
-1098: <span class="ruby-keyword kw">else</span>
-1099: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">''</span>
-1100: <span class="ruby-keyword kw">end</span>
-1101: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1100</span>
+1100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_complete</span>(<span class="ruby-identifier">query</span>)
+1101: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span>
+1102: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">complete</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'complete'</span>).<span class="ruby-identifier">to_i</span>
+1103: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-node">"#{complete}%"</span>
+1104: <span class="ruby-keyword kw">else</span>
+1105: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">''</span>
+1106: <span class="ruby-keyword kw">end</span>
+1107: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2540,11 +2615,11 @@
</div>
<div id="query-cost-method" class="method-detail ">
- <a name="M001370"></a>
+ <a name="method-i-query_cost"></a>
<div class="method-heading">
<span class="method-name">query_cost</span><span
class="method-args">(query)</span>
@@ -2564,21 +2639,21 @@
<div class="method-source-code"
id="query-cost-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1106</span>
-1106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_cost</span>(<span class="ruby-identifier">query</span>)
-1107: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">costAccount</span>
-1108: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">cost</span> =
-1109: <span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">costAccount</span>,
-1110: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
-1111: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">currencyFormat</span>.<span class="ruby-identifier">format</span>(<span class="ruby-identifier">cost</span>)
-1112: <span class="ruby-keyword kw">else</span>
-1113: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No cost account'</span>
-1114: <span class="ruby-keyword kw">end</span>
-1115: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1112</span>
+1112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_cost</span>(<span class="ruby-identifier">query</span>)
+1113: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">costAccount</span>
+1114: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">cost</span> =
+1115: <span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">costAccount</span>,
+1116: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
+1117: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">currencyFormat</span>.<span class="ruby-identifier">format</span>(<span class="ruby-identifier">cost</span>)
+1118: <span class="ruby-keyword kw">else</span>
+1119: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No cost account'</span>
+1120: <span class="ruby-keyword kw">end</span>
+1121: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2586,11 +2661,11 @@
</div>
<div id="query-duration-method" class="method-detail ">
- <a name="M001371"></a>
+ <a name="method-i-query_duration"></a>
<div class="method-heading">
<span class="method-name">query_duration</span><span
class="method-args">(query)</span>
@@ -2608,16 +2683,16 @@
<div class="method-source-code"
id="query-duration-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1119</span>
-1119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_duration</span>(<span class="ruby-identifier">query</span>)
-1120: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">duration</span> =
-1121: (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)) <span class="ruby-operator">/</span> (<span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span>)
-1122: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleDuration</span>(<span class="ruby-identifier">duration</span>)
-1123: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1125</span>
+1125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_duration</span>(<span class="ruby-identifier">query</span>)
+1126: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">duration</span> =
+1127: (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)) <span class="ruby-operator">/</span> (<span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span>)
+1128: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleDuration</span>(<span class="ruby-identifier">duration</span>)
+1129: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2625,11 +2700,11 @@
</div>
<div id="query-effort-method" class="method-detail ">
- <a name="M001374"></a>
+ <a name="method-i-query_effort"></a>
<div class="method-heading">
<span class="method-name">query_effort</span><span
class="method-args">(query)</span>
@@ -2648,16 +2723,16 @@
<div class="method-source-code"
id="query-effort-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1155</span>
-1155: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effort</span>(<span class="ruby-identifier">query</span>)
-1156: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">work</span> =
-1157: <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
-1158: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleLoad</span>(<span class="ruby-identifier">work</span>)
-1159: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1161</span>
+1161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effort</span>(<span class="ruby-identifier">query</span>)
+1162: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">work</span> =
+1163: <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
+1164: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleLoad</span>(<span class="ruby-identifier">work</span>)
+1165: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2665,11 +2740,11 @@
</div>
<div id="query-effortdone-method" class="method-detail ">
- <a name="M001372"></a>
+ <a name="method-i-query_effortdone"></a>
<div class="method-heading">
<span class="method-name">query_effortdone</span><span
class="method-args">(query)</span>
@@ -2689,19 +2764,19 @@
<div class="method-source-code"
id="query-effortdone-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1128</span>
-1128: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effortdone</span>(<span class="ruby-identifier">query</span>)
-1129: <span class="ruby-comment cmt"># For this query, we always override the query period.</span>
-1130: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">effort</span> =
-1131: <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>]),
-1132: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]),
-1133: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
-1134: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleLoad</span>(<span class="ruby-identifier">effort</span>)
-1135: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1134</span>
+1134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effortdone</span>(<span class="ruby-identifier">query</span>)
+1135: <span class="ruby-comment cmt"># For this query, we always override the query period.</span>
+1136: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">effort</span> =
+1137: <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>]),
+1138: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]),
+1139: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
+1140: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleLoad</span>(<span class="ruby-identifier">effort</span>)
+1141: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2709,11 +2784,11 @@
</div>
<div id="query-effortleft-method" class="method-detail ">
- <a name="M001373"></a>
+ <a name="method-i-query_effortleft"></a>
<div class="method-heading">
<span class="method-name">query_effortleft</span><span
class="method-args">(query)</span>
@@ -2733,21 +2808,21 @@
<div class="method-source-code"
id="query-effortleft-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1141</span>
-1141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effortleft</span>(<span class="ruby-identifier">query</span>)
-1142: <span class="ruby-comment cmt"># For this query, we always override the query period.</span>
-1143: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">start</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]
-1144: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">end</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>]
-1145: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">effort</span> =
-1146: <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]),
-1147: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>]),
-1148: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
-1149: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleLoad</span>(<span class="ruby-identifier">effort</span>)
-1150: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1147</span>
+1147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effortleft</span>(<span class="ruby-identifier">query</span>)
+1148: <span class="ruby-comment cmt"># For this query, we always override the query period.</span>
+1149: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">start</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]
+1150: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">end</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>]
+1151: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">effort</span> =
+1152: <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]),
+1153: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>]),
+1154: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
+1155: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scaleLoad</span>(<span class="ruby-identifier">effort</span>)
+1156: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2755,11 +2830,11 @@
</div>
<div id="query-followers-method" class="method-detail ">
- <a name="M001375"></a>
+ <a name="method-i-query_followers"></a>
<div class="method-heading">
<span class="method-name">query_followers</span><span
class="method-args">(query)</span>
@@ -2774,42 +2849,42 @@
<div class="method-source-code"
id="query-followers-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1161</span>
-1161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_followers</span>(<span class="ruby-identifier">query</span>)
-1162: <span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
-1163:
-1164: <span class="ruby-comment cmt"># First gather the task that depend on the start of this task.</span>
-1165: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'startsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-1166: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
-1167: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
-1168: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1169: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->[ #{taskEnd}"</span>
-1170: <span class="ruby-keyword kw">else</span>
-1171: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1172: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->] #{taskStart}"</span>
-1173: <span class="ruby-keyword kw">end</span>
-1174: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
-1175: <span class="ruby-keyword kw">end</span>
-1176: <span class="ruby-comment cmt"># Than add the tasks that depend on the end of this task.</span>
-1177: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-1178: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
-1179: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
-1180: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1181: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->[ #{taskEnd}"</span>
-1182: <span class="ruby-keyword kw">else</span>
-1183: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1184: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->] #{taskStart}"</span>
-1185: <span class="ruby-keyword kw">end</span>
-1186: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
-1187: <span class="ruby-keyword kw">end</span>
-1188:
-1189: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>)
-1190: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
-1191: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1167</span>
+1167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_followers</span>(<span class="ruby-identifier">query</span>)
+1168: <span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
+1169:
+1170: <span class="ruby-comment cmt"># First gather the task that depend on the start of this task.</span>
+1171: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'startsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+1172: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
+1173: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
+1174: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1175: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->] #{taskEnd}"</span>
+1176: <span class="ruby-keyword kw">else</span>
+1177: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1178: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->[ #{taskStart}"</span>
+1179: <span class="ruby-keyword kw">end</span>
+1180: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
+1181: <span class="ruby-keyword kw">end</span>
+1182: <span class="ruby-comment cmt"># Than add the tasks that depend on the end of this task.</span>
+1183: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+1184: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
+1185: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
+1186: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1187: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->] #{taskEnd}"</span>
+1188: <span class="ruby-keyword kw">else</span>
+1189: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1190: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->[ #{taskStart}"</span>
+1191: <span class="ruby-keyword kw">end</span>
+1192: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
+1193: <span class="ruby-keyword kw">end</span>
+1194:
+1195: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>)
+1196: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
+1197: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2817,11 +2892,11 @@
</div>
<div id="query-precursors-method" class="method-detail ">
- <a name="M001376"></a>
+ <a name="method-i-query_precursors"></a>
<div class="method-heading">
<span class="method-name">query_precursors</span><span
class="method-args">(query)</span>
@@ -2836,42 +2911,42 @@
<div class="method-source-code"
id="query-precursors-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1193</span>
-1193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_precursors</span>(<span class="ruby-identifier">query</span>)
-1194: <span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
-1195:
-1196: <span class="ruby-comment cmt"># First gather the task that depend on the start of this task.</span>
-1197: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'startpreds'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-1198: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
-1199: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
-1200: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1201: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->[ #{taskEnd}"</span>
-1202: <span class="ruby-keyword kw">else</span>
-1203: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1204: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->[ #{taskStart}"</span>
-1205: <span class="ruby-keyword kw">end</span>
-1206: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
-1207: <span class="ruby-keyword kw">end</span>
-1208: <span class="ruby-comment cmt"># Than add the tasks that depend on the end of this task.</span>
-1209: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endpreds'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-1210: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
-1211: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
-1212: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1213: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->] #{taskEnd}"</span>
-1214: <span class="ruby-keyword kw">else</span>
-1215: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
-1216: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->] #{taskStart}"</span>
-1217: <span class="ruby-keyword kw">end</span>
-1218: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
-1219: <span class="ruby-keyword kw">end</span>
-1220:
-1221: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>)
-1222: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
-1223: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1199</span>
+1199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_precursors</span>(<span class="ruby-identifier">query</span>)
+1200: <span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
+1201:
+1202: <span class="ruby-comment cmt"># First gather the task that depend on the start of this task.</span>
+1203: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'startpreds'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+1204: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
+1205: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
+1206: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1207: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->] #{taskEnd}"</span>
+1208: <span class="ruby-keyword kw">else</span>
+1209: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1210: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->[ #{taskStart}"</span>
+1211: <span class="ruby-keyword kw">end</span>
+1212: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
+1213: <span class="ruby-keyword kw">end</span>
+1214: <span class="ruby-comment cmt"># Than add the tasks that depend on the end of this task.</span>
+1215: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endpreds'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+1216: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"* <nowiki>#{task.name}</nowiki> (#{task.fullId}) "</span>
+1217: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onEnd</span>
+1218: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1219: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"[->] #{taskEnd}"</span>
+1220: <span class="ruby-keyword kw">else</span>
+1221: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">timeFormat</span>)
+1222: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"]->[ #{taskStart}"</span>
+1223: <span class="ruby-keyword kw">end</span>
+1224: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n"</span>
+1225: <span class="ruby-keyword kw">end</span>
+1226:
+1227: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>)
+1228: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
+1229: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2879,11 +2954,11 @@
</div>
<div id="query-resources-method" class="method-detail ">
- <a name="M001377"></a>
+ <a name="method-i-query_resources"></a>
<div class="method-heading">
<span class="method-name">query_resources</span><span
class="method-args">(query)</span>
@@ -2901,23 +2976,23 @@
<div class="method-source-code"
id="query-resources-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1227</span>
-1227: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_resources</span>(<span class="ruby-identifier">query</span>)
-1228: <span class="ruby-identifier">list</span> = <span class="ruby-value str">''</span>
-1229: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span>
-1230: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">resource</span>) <span class="ruby-operator">></span> <span class="ruby-value">0.0</span>
-1231: <span class="ruby-identifier">list</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">', '</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">empty?</span>
-1232: <span class="ruby-identifier">list</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"#{resource.name} (#{resource.fullId})"</span>
-1233: <span class="ruby-keyword kw">end</span>
-1234: <span class="ruby-keyword kw">end</span>
-1235: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">list</span>
-1236: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">list</span>)
-1237: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
-1238: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1233</span>
+1233: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_resources</span>(<span class="ruby-identifier">query</span>)
+1234: <span class="ruby-identifier">list</span> = <span class="ruby-value str">''</span>
+1235: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span>
+1236: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">resource</span>) <span class="ruby-operator">></span> <span class="ruby-value">0.0</span>
+1237: <span class="ruby-identifier">list</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">', '</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">empty?</span>
+1238: <span class="ruby-identifier">list</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"#{resource.name} (#{resource.fullId})"</span>
+1239: <span class="ruby-keyword kw">end</span>
+1240: <span class="ruby-keyword kw">end</span>
+1241: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">list</span>
+1242: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">list</span>)
+1243: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
+1244: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2925,11 +3000,11 @@
</div>
<div id="query-revenue-method" class="method-detail ">
- <a name="M001378"></a>
+ <a name="method-i-query_revenue"></a>
<div class="method-heading">
<span class="method-name">query_revenue</span><span
class="method-args">(query)</span>
@@ -2949,21 +3024,21 @@
<div class="method-source-code"
id="query-revenue-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1243</span>
-1243: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_revenue</span>(<span class="ruby-identifier">query</span>)
-1244: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">revenueAccount</span>
-1245: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">revenue</span> =
-1246: <span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">revenueAccount</span>,
-1247: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
-1248: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">currencyFormat</span>.<span class="ruby-identifier">format</span>(<span class="ruby-identifier">revenue</span>)
-1249: <span class="ruby-keyword kw">else</span>
-1250: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No revenue account'</span>
-1251: <span class="ruby-keyword kw">end</span>
-1252: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1249</span>
+1249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_revenue</span>(<span class="ruby-identifier">query</span>)
+1250: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">revenueAccount</span>
+1251: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">sortable</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">numerical</span> = <span class="ruby-identifier">revenue</span> =
+1252: <span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">revenueAccount</span>,
+1253: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
+1254: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">currencyFormat</span>.<span class="ruby-identifier">format</span>(<span class="ruby-identifier">revenue</span>)
+1255: <span class="ruby-keyword kw">else</span>
+1256: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No revenue account'</span>
+1257: <span class="ruby-keyword kw">end</span>
+1258: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -2971,11 +3046,11 @@
</div>
<div id="query-targets-method" class="method-detail ">
- <a name="M001379"></a>
+ <a name="method-i-query_targets"></a>
<div class="method-heading">
<span class="method-name">query_targets</span><span
class="method-args">(query)</span>
@@ -2990,27 +3065,27 @@
<div class="method-source-code"
id="query-targets-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1254</span>
-1254: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_targets</span>(<span class="ruby-identifier">query</span>)
-1255: <span class="ruby-identifier">targetList</span> = <span class="ruby-constant">PropertyList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">tasks</span>, <span class="ruby-keyword kw">false</span>)
-1256: <span class="ruby-identifier">targets</span>(<span class="ruby-identifier">targetList</span>)
-1257: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-ivar">@property</span>)
-1258: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">setSorting</span>([[<span class="ruby-value str">'start'</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@scenarioIdx</span>],
-1259: [<span class="ruby-value str">'seqno'</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-value">1</span> ]])
-1260: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">sort!</span>
-1261:
-1262: <span class="ruby-identifier">res</span> = <span class="ruby-value str">''</span>
-1263: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
-1264: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-ivar">@property</span>.<span class="ruby-identifier">project</span>[<span class="ruby-value str">'timeFormat'</span>])
-1265: <span class="ruby-identifier">res</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"# #{task.name} (#{task.fullId}) #{date}\n"</span>
-1266: <span class="ruby-keyword kw">end</span>
-1267: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">res</span>)
-1268: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
-1269: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1260</span>
+1260: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_targets</span>(<span class="ruby-identifier">query</span>)
+1261: <span class="ruby-identifier">targetList</span> = <span class="ruby-constant">PropertyList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">tasks</span>, <span class="ruby-keyword kw">false</span>)
+1262: <span class="ruby-identifier">targets</span>(<span class="ruby-identifier">targetList</span>)
+1263: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-ivar">@property</span>)
+1264: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">setSorting</span>([[<span class="ruby-value str">'start'</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@scenarioIdx</span>],
+1265: [<span class="ruby-value str">'seqno'</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-value">1</span> ]])
+1266: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">sort!</span>
+1267:
+1268: <span class="ruby-identifier">res</span> = <span class="ruby-value str">''</span>
+1269: <span class="ruby-identifier">targetList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
+1270: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">to_s</span>(<span class="ruby-ivar">@property</span>.<span class="ruby-identifier">project</span>[<span class="ruby-value str">'timeFormat'</span>])
+1271: <span class="ruby-identifier">res</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"# #{task.name} (#{task.fullId}) #{date}\n"</span>
+1272: <span class="ruby-keyword kw">end</span>
+1273: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">res</span>)
+1274: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
+1275: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3018,11 +3093,11 @@
</div>
<div id="ready-or-cheduling--method" class="method-detail ">
- <a name="M001360"></a>
+ <a name="method-i-readyForScheduling%3F"></a>
<div class="method-heading">
<span class="method-name">readyForScheduling?</span><span
class="method-args">()</span>
@@ -3063,11 +3138,11 @@
</div>
<div id="reset-oop-lags-method" class="method-detail ">
- <a name="M001354"></a>
+ <a name="method-i-resetLoopFlags"></a>
<div class="method-heading">
<span class="method-name">resetLoopFlags</span><span
class="method-args">()</span>
@@ -3097,11 +3172,11 @@
</div>
<div id="schedule-method" class="method-detail ">
- <a name="M001361"></a>
+ <a name="method-i-schedule"></a>
<div class="method-heading">
<span class="method-name">schedule</span><span
class="method-args">()</span>
@@ -3164,11 +3239,11 @@
</div>
<div id="schedule-ontainer-method" class="method-detail ">
- <a name="M001364"></a>
+ <a name="method-i-scheduleContainer"></a>
<div class="method-heading">
<span class="method-name">scheduleContainer</span><span
class="method-args">()</span>
@@ -3186,48 +3261,50 @@
<div class="method-source-code"
id="schedule-ontainer-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 927</span>
-927: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scheduleContainer</span>
-928: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>) <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
-929:
-930: <span class="ruby-identifier">nStart</span> = <span class="ruby-keyword kw">nil</span>
-931: <span class="ruby-identifier">nEnd</span> = <span class="ruby-keyword kw">nil</span>
-932:
-933: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
-934: <span class="ruby-comment cmt"># Abort if a child has not yet been scheduled.</span>
-935: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 931</span>
+931: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scheduleContainer</span>
+932: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>) <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
+933:
+934: <span class="ruby-identifier">nStart</span> = <span class="ruby-keyword kw">nil</span>
+935: <span class="ruby-identifier">nEnd</span> = <span class="ruby-keyword kw">nil</span>
936:
-937: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nStart</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><</span> <span class="ruby-identifier">nStart</span>
-938: <span class="ruby-identifier">nStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
-939: <span class="ruby-keyword kw">end</span>
-940: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nEnd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">></span> <span class="ruby-identifier">nEnd</span>
-941: <span class="ruby-identifier">nEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
-942: <span class="ruby-keyword kw">end</span>
-943: <span class="ruby-keyword kw">end</span>
-944:
-945: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
-946:
-947: <span class="ruby-identifier">startSet</span> = <span class="ruby-identifier">endSet</span> = <span class="ruby-keyword kw">false</span>
-948: <span class="ruby-comment cmt"># Propagate the dates to other dependent tasks.</span>
-949: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">></span> <span class="ruby-identifier">nStart</span>
-950: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">nStart</span>
-951: <span class="ruby-identifier">startSet</span> = <span class="ruby-keyword kw">true</span>
-952: <span class="ruby-keyword kw">end</span>
-953: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator"><</span> <span class="ruby-identifier">nEnd</span>
-954: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">nEnd</span>
-955: <span class="ruby-identifier">endSet</span> = <span class="ruby-keyword kw">true</span>
-956: <span class="ruby-keyword kw">end</span>
-957: <span class="ruby-constant">Log</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"Container task #{@property.fullId}: #{a('start')} -> #{a('end')}"</span>
-958:
-959: <span class="ruby-comment cmt"># If we have modified the start or end date, we need to communicate this</span>
-960: <span class="ruby-comment cmt"># new date to surrounding tasks.</span>
-961: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">nStart</span>, <span class="ruby-keyword kw">false</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startSet</span>
-962: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">nEnd</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endSet</span>
-963: <span class="ruby-keyword kw">end</span></pre>
+937: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
+938: <span class="ruby-comment cmt"># Abort if a child has not yet been scheduled.</span>
+939: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+940:
+941: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nStart</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><</span> <span class="ruby-identifier">nStart</span>
+942: <span class="ruby-identifier">nStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+943: <span class="ruby-keyword kw">end</span>
+944: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nEnd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">></span> <span class="ruby-identifier">nEnd</span>
+945: <span class="ruby-identifier">nEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+946: <span class="ruby-keyword kw">end</span>
+947: <span class="ruby-keyword kw">end</span>
+948:
+949: <span class="ruby-identifier">startSet</span> = <span class="ruby-identifier">endSet</span> = <span class="ruby-keyword kw">false</span>
+950: <span class="ruby-comment cmt"># Propagate the dates to other dependent tasks.</span>
+951: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">></span> <span class="ruby-identifier">nStart</span>
+952: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">nStart</span>
+953: <span class="ruby-identifier">startSet</span> = <span class="ruby-keyword kw">true</span>
+954: <span class="ruby-keyword kw">end</span>
+955: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator"><</span> <span class="ruby-identifier">nEnd</span>
+956: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">nEnd</span>
+957: <span class="ruby-identifier">endSet</span> = <span class="ruby-keyword kw">true</span>
+958: <span class="ruby-keyword kw">end</span>
+959: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
+960: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Start (#{a('start')}) and end (#{a('end')}) must be set"</span>
+961: <span class="ruby-keyword kw">end</span>
+962: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
+963: <span class="ruby-constant">Log</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"Container task #{@property.fullId}: #{a('start')} -> #{a('end')}"</span>
+964:
+965: <span class="ruby-comment cmt"># If we have modified the start or end date, we need to communicate this</span>
+966: <span class="ruby-comment cmt"># new date to surrounding tasks.</span>
+967: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">nStart</span>, <span class="ruby-keyword kw">false</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startSet</span>
+968: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">nEnd</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endSet</span>
+969: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3241,11 +3318,11 @@
<div id="private-instance-method-details" class="method-section section">
<h3 class="section-header">Private Instance Methods</h3>
<div id="book-ookings-method" class="method-detail ">
- <a name="M001389"></a>
+ <a name="method-i-bookBookings"></a>
<div class="method-heading">
<span class="method-name">bookBookings</span><span
class="method-args">()</span>
@@ -3266,71 +3343,71 @@
<div class="method-source-code"
id="book-ookings-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1612</span>
-1612: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bookBookings</span>
-1613: <span class="ruby-identifier">scheduled</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>)
-1614: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">booking</span><span class="ruby-operator">|</span>
-1615: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>.<span class="ruby-identifier">leaf?</span>
-1616: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_resource_not_leaf'</span>,
-1617: <span class="ruby-value str">"Booked resources may not be group resources"</span>, <span class="ruby-keyword kw">true</span>,
-1618: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
-1619: <span class="ruby-keyword kw">end</span>
-1620: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>)
-1621: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_forward_only'</span>,
-1622: <span class="ruby-value str">"Only forward scheduled tasks may have booking statements."</span>)
-1623: <span class="ruby-keyword kw">end</span>
-1624: <span class="ruby-identifier">slotDuration</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
-1625: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">intervals</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">interval</span><span class="ruby-operator">|</span>
-1626: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">interval</span>.<span class="ruby-identifier">start</span>)
-1627: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">start</span>
-1628: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">interval</span>.<span class="ruby-identifier">end</span>)
-1629: <span class="ruby-identifier">tEnd</span> = <span class="ruby-keyword kw">nil</span>
-1630: <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">endIdx</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
-1631: <span class="ruby-identifier">tEnd</span> = <span class="ruby-identifier">date</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
-1632: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>.<span class="ruby-identifier">bookBooking</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">idx</span>, <span class="ruby-identifier">booking</span>)
-1633: <span class="ruby-comment cmt"># Booking was successful for this time slot.</span>
-1634: <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>[<span class="ruby-value str">'efficiency'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
-1635:
-1636: <span class="ruby-comment cmt"># Set start and lastSlot if appropriate. The task start will be</span>
-1637: <span class="ruby-comment cmt"># set to the begining of the first booked slot. The lastSlot</span>
-1638: <span class="ruby-comment cmt"># will be set to the last booked slot</span>
-1639: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">date</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@lastSlot</span>
-1640: <span class="ruby-ivar">@tentativeEnd</span> = <span class="ruby-identifier">tEnd</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@tentativeEnd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span>
-1641: <span class="ruby-ivar">@tentativeEnd</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">tEnd</span>
-1642: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">date</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>))
-1643: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">date</span>
-1644: <span class="ruby-keyword kw">end</span>
-1645:
-1646: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>)
-1647: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'assignedresources'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>
-1648: <span class="ruby-keyword kw">end</span>
-1649: <span class="ruby-keyword kw">end</span>
-1650: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">tEnd</span>)
-1651: <span class="ruby-comment cmt"># For tasks with a 'length' we track the covered work time and</span>
-1652: <span class="ruby-comment cmt"># set the task to 'scheduled' when we have enough length.</span>
-1653: <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
-1654: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">scheduled</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>)
-1655: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">tEnd</span>
-1656: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
-1657: <span class="ruby-keyword kw">end</span>
-1658: <span class="ruby-keyword kw">end</span>
-1659: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">tEnd</span>
-1660: <span class="ruby-keyword kw">end</span>
-1661: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@tentativeEnd</span>
-1662: <span class="ruby-ivar">@doneDuration</span> = ((<span class="ruby-ivar">@tentativeEnd</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)) <span class="ruby-operator">/</span>
-1663: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]).<span class="ruby-identifier">to_i</span>
-1664: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">scheduled</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneDuration</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>)
-1665: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-ivar">@tentativeEnd</span>
-1666: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
-1667: <span class="ruby-keyword kw">end</span>
-1668: <span class="ruby-keyword kw">end</span>
-1669: <span class="ruby-keyword kw">end</span>
-1670: <span class="ruby-keyword kw">end</span>
-1671: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1647</span>
+1647: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bookBookings</span>
+1648: <span class="ruby-identifier">scheduled</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>)
+1649: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">booking</span><span class="ruby-operator">|</span>
+1650: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>.<span class="ruby-identifier">leaf?</span>
+1651: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_resource_not_leaf'</span>,
+1652: <span class="ruby-value str">"Booked resources may not be group resources"</span>, <span class="ruby-keyword kw">true</span>,
+1653: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
+1654: <span class="ruby-keyword kw">end</span>
+1655: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">scheduled</span>
+1656: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_forward_only'</span>,
+1657: <span class="ruby-value str">"Only forward scheduled tasks may have booking statements."</span>)
+1658: <span class="ruby-keyword kw">end</span>
+1659: <span class="ruby-identifier">slotDuration</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
+1660: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">intervals</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">interval</span><span class="ruby-operator">|</span>
+1661: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">interval</span>.<span class="ruby-identifier">start</span>)
+1662: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">start</span>
+1663: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">interval</span>.<span class="ruby-identifier">end</span>)
+1664: <span class="ruby-identifier">tEnd</span> = <span class="ruby-keyword kw">nil</span>
+1665: <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">endIdx</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
+1666: <span class="ruby-identifier">tEnd</span> = <span class="ruby-identifier">date</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
+1667: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>.<span class="ruby-identifier">bookBooking</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">idx</span>, <span class="ruby-identifier">booking</span>)
+1668: <span class="ruby-comment cmt"># Booking was successful for this time slot.</span>
+1669: <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>[<span class="ruby-value str">'efficiency'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+1670:
+1671: <span class="ruby-comment cmt"># Set start and lastSlot if appropriate. The task start will be</span>
+1672: <span class="ruby-comment cmt"># set to the begining of the first booked slot. The lastSlot</span>
+1673: <span class="ruby-comment cmt"># will be set to the last booked slot</span>
+1674: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">date</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@lastSlot</span>
+1675: <span class="ruby-ivar">@tentativeEnd</span> = <span class="ruby-identifier">tEnd</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@tentativeEnd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span>
+1676: <span class="ruby-ivar">@tentativeEnd</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">tEnd</span>
+1677: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">scheduled</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">date</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>))
+1678: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">date</span>
+1679: <span class="ruby-keyword kw">end</span>
+1680:
+1681: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>)
+1682: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'assignedresources'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">resource</span>
+1683: <span class="ruby-keyword kw">end</span>
+1684: <span class="ruby-keyword kw">end</span>
+1685: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">tEnd</span>)
+1686: <span class="ruby-comment cmt"># For tasks with a 'length' we track the covered work time and</span>
+1687: <span class="ruby-comment cmt"># set the task to 'scheduled' when we have enough length.</span>
+1688: <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
+1689: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">scheduled</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>)
+1690: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">tEnd</span>
+1691: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
+1692: <span class="ruby-keyword kw">end</span>
+1693: <span class="ruby-keyword kw">end</span>
+1694: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">tEnd</span>
+1695: <span class="ruby-keyword kw">end</span>
+1696: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@tentativeEnd</span>
+1697: <span class="ruby-ivar">@doneDuration</span> = ((<span class="ruby-ivar">@tentativeEnd</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)) <span class="ruby-operator">/</span>
+1698: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]).<span class="ruby-identifier">to_i</span>
+1699: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">scheduled</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneDuration</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>)
+1700: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-ivar">@tentativeEnd</span>
+1701: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
+1702: <span class="ruby-keyword kw">end</span>
+1703: <span class="ruby-keyword kw">end</span>
+1704: <span class="ruby-keyword kw">end</span>
+1705: <span class="ruby-keyword kw">end</span>
+1706: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3338,11 +3415,11 @@
</div>
<div id="book-esource-method" class="method-detail ">
- <a name="M001388"></a>
+ <a name="method-i-bookResource"></a>
<div class="method-heading">
<span class="method-name">bookResource</span><span
class="method-args">(resource, sbIdx, date)</span>
@@ -3357,47 +3434,49 @@
<div class="method-source-code"
id="book-esource-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1572</span>
-1572: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bookResource</span>(<span class="ruby-identifier">resource</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">date</span>)
-1573: <span class="ruby-identifier">booked</span> = <span class="ruby-keyword kw">false</span>
-1574: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">allLeaves</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
-1575: <span class="ruby-comment cmt"># Prevent overbooking when multiple resources are allocated and</span>
-1576: <span class="ruby-comment cmt"># available.</span>
-1577: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>)
-1578:
-1579: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">book</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-ivar">@property</span>)
-1580:
-1581: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">empty?</span>
-1582: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
-1583: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span>)
-1584: <span class="ruby-keyword kw">else</span>
-1585: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
-1586: <span class="ruby-keyword kw">end</span>
-1587: <span class="ruby-keyword kw">end</span>
-1588:
-1589: <span class="ruby-ivar">@tentativeStart</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span>)
-1590: <span class="ruby-ivar">@tentativeEnd</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
-1591:
-1592: <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>[<span class="ruby-value str">'efficiency'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
-1593: <span class="ruby-comment cmt"># Limits do not take efficiency into account. Limits are usage limits,</span>
-1594: <span class="ruby-comment cmt"># not effort limits.</span>
-1595: <span class="ruby-ivar">@limits</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">limit</span><span class="ruby-operator">|</span>
-1596: <span class="ruby-identifier">limit</span>.<span class="ruby-identifier">inc</span>(<span class="ruby-identifier">date</span>)
-1597: <span class="ruby-keyword kw">end</span>
-1598:
-1599: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">r</span>)
-1600: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'assignedresources'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span>
-1601: <span class="ruby-keyword kw">end</span>
-1602: <span class="ruby-identifier">booked</span> = <span class="ruby-keyword kw">true</span>
-1603: <span class="ruby-keyword kw">end</span>
-1604: <span class="ruby-keyword kw">end</span>
-1605:
-1606: <span class="ruby-identifier">booked</span>
-1607: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1593</span>
+1593: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bookResource</span>(<span class="ruby-identifier">resource</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">date</span>)
+1594: <span class="ruby-identifier">booked</span> = <span class="ruby-keyword kw">false</span>
+1595: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">allLeaves</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
+1596: <span class="ruby-comment cmt"># Prevent overbooking when multiple resources are allocated and</span>
+1597: <span class="ruby-comment cmt"># available. If the task has allocation limits we need to make sure</span>
+1598: <span class="ruby-comment cmt"># that none of them is already exceeded.</span>
+1599: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">||</span>
+1600: <span class="ruby-operator">!</span><span class="ruby-identifier">limitsOk?</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">resource</span>)
+1601:
+1602: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">book</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-ivar">@property</span>)
+1603:
+1604: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">empty?</span>
+1605: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
+1606: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span>)
+1607: <span class="ruby-keyword kw">else</span>
+1608: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
+1609: <span class="ruby-keyword kw">end</span>
+1610: <span class="ruby-keyword kw">end</span>
+1611:
+1612: <span class="ruby-ivar">@tentativeStart</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span>)
+1613: <span class="ruby-ivar">@tentativeEnd</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
+1614:
+1615: <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>[<span class="ruby-value str">'efficiency'</span>, <span class="ruby-ivar">@scenarioIdx</span>]
+1616: <span class="ruby-comment cmt"># Limits do not take efficiency into account. Limits are usage limits,</span>
+1617: <span class="ruby-comment cmt"># not effort limits.</span>
+1618: <span class="ruby-ivar">@limits</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">limit</span><span class="ruby-operator">|</span>
+1619: <span class="ruby-identifier">limit</span>.<span class="ruby-identifier">inc</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">resource</span>)
+1620: <span class="ruby-keyword kw">end</span>
+1621:
+1622: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">r</span>)
+1623: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'assignedresources'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span>
+1624: <span class="ruby-keyword kw">end</span>
+1625: <span class="ruby-identifier">booked</span> = <span class="ruby-keyword kw">true</span>
+1626: <span class="ruby-keyword kw">end</span>
+1627: <span class="ruby-keyword kw">end</span>
+1628:
+1629: <span class="ruby-identifier">booked</span>
+1630: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3405,11 +3484,11 @@
</div>
<div id="book-esources-method" class="method-detail ">
- <a name="M001387"></a>
+ <a name="method-i-bookResources"></a>
<div class="method-heading">
<span class="method-name">bookResources</span><span
class="method-args">(date, slotDuration)</span>
@@ -3424,91 +3503,92 @@
<div class="method-source-code"
id="book-esources-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1491</span>
-1491: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">slotDuration</span>)
-1492: <span class="ruby-comment cmt"># If there are no allocations defined, we can't do any bookings.</span>
-1493: <span class="ruby-comment cmt"># In projection mode we do not allow bookings prior to the current date</span>
-1494: <span class="ruby-comment cmt"># for any task (in strict mode) or tasks which have user specified</span>
-1495: <span class="ruby-comment cmt"># bookings (sloppy mode).</span>
-1496: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span>
-1497: (<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">scenario</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">get</span>(<span class="ruby-value str">'projection'</span>) <span class="ruby-operator">&&</span>
-1498: <span class="ruby-identifier">date</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">&&</span>
-1499: (<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">scenario</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">get</span>(<span class="ruby-value str">'strict'</span>) <span class="ruby-operator">||</span>
-1500: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">empty?</span>))
-1501: <span class="ruby-keyword kw">return</span>
-1502: <span class="ruby-keyword kw">end</span>
-1503:
-1504: <span class="ruby-comment cmt"># If the task has shifts to limit the allocations, we check that we are</span>
-1505: <span class="ruby-comment cmt"># within a defined shift interval. If yes, we need to be on shift to</span>
-1506: <span class="ruby-comment cmt"># continue.</span>
-1507: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">shifts</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">shifts</span>.<span class="ruby-identifier">assigned?</span>(<span class="ruby-identifier">date</span>)
-1508: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">shifts</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
-1509: <span class="ruby-keyword kw">end</span>
-1510:
-1511: <span class="ruby-comment cmt"># If the task has allocation limits we need to make sure that none of them</span>
-1512: <span class="ruby-comment cmt"># is already exceeded.</span>
-1513: <span class="ruby-ivar">@limits</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">limit</span><span class="ruby-operator">|</span>
-1514: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">limit</span>.<span class="ruby-identifier">ok?</span>(<span class="ruby-identifier">date</span>)
-1515: <span class="ruby-keyword kw">end</span>
-1516:
-1517: <span class="ruby-identifier">sbIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">date</span>)
-1518:
-1519: <span class="ruby-comment cmt"># We first have to make sure that if there are mandatory resources</span>
-1520: <span class="ruby-comment cmt"># that these are all available for the time slot.</span>
-1521: <span class="ruby-identifier">takenMandatories</span> = []
-1522: <span class="ruby-ivar">@mandatories</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">allocation</span><span class="ruby-operator">|</span>
-1523: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
-1524:
-1525: <span class="ruby-comment cmt"># For mandatory allocations with alternatives at least one of the</span>
-1526: <span class="ruby-comment cmt"># alternatives must be available.</span>
-1527: <span class="ruby-identifier">found</span> = <span class="ruby-keyword kw">false</span>
-1528: <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">candidates</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">candidate</span><span class="ruby-operator">|</span>
-1529: <span class="ruby-comment cmt"># When a resource group is marked mandatory, all members of the</span>
-1530: <span class="ruby-comment cmt"># group must be available.</span>
-1531: <span class="ruby-identifier">allAvailable</span> = <span class="ruby-keyword kw">true</span>
-1532: <span class="ruby-identifier">candidate</span>.<span class="ruby-identifier">allLeaves</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span>
-1533: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">resource</span>.<span class="ruby-identifier">available?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">sbIdx</span>) <span class="ruby-operator">||</span>
-1534: <span class="ruby-identifier">takenMandatories</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">resource</span>)
-1535: <span class="ruby-identifier">allAvailable</span> = <span class="ruby-keyword kw">false</span>
-1536: <span class="ruby-keyword kw">break</span>
-1537: <span class="ruby-keyword kw">else</span>
-1538: <span class="ruby-identifier">takenMandatories</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">resource</span>
-1539: <span class="ruby-keyword kw">end</span>
-1540: <span class="ruby-keyword kw">end</span>
-1541: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allAvailable</span>
-1542: <span class="ruby-identifier">found</span> = <span class="ruby-keyword kw">true</span>
-1543: <span class="ruby-keyword kw">break</span>
-1544: <span class="ruby-keyword kw">end</span>
-1545: <span class="ruby-keyword kw">end</span>
-1546:
-1547: <span class="ruby-comment cmt"># At least one mandatory resource is not available. We cannot continue.</span>
-1548: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">found</span>
-1549: <span class="ruby-keyword kw">end</span>
-1550:
-1551: <span class="ruby-identifier">iv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">date</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>)
-1552: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">allocation</span><span class="ruby-operator">|</span>
-1553: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
-1554:
-1555: <span class="ruby-comment cmt"># In case we have a persistent allocation we need to check if there is</span>
-1556: <span class="ruby-comment cmt"># already a locked resource and use it.</span>
-1557: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">persistent</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">lockedResource</span>.<span class="ruby-identifier">nil?</span>
-1558: <span class="ruby-identifier">bookResource</span>(<span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">lockedResource</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">date</span>)
-1559: <span class="ruby-keyword kw">else</span>
-1560: <span class="ruby-comment cmt"># If not, we create a list of candidates in the proper order and</span>
-1561: <span class="ruby-comment cmt"># assign the first one available.</span>
-1562: <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">candidates</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">candidate</span><span class="ruby-operator">|</span>
-1563: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bookResource</span>(<span class="ruby-identifier">candidate</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">date</span>)
-1564: <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">lockedResource</span> = <span class="ruby-identifier">candidate</span>
-1565: <span class="ruby-keyword kw">break</span>
-1566: <span class="ruby-keyword kw">end</span>
-1567: <span class="ruby-keyword kw">end</span>
-1568: <span class="ruby-keyword kw">end</span>
-1569: <span class="ruby-keyword kw">end</span>
-1570: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1511</span>
+1511: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">slotDuration</span>)
+1512: <span class="ruby-comment cmt"># If there are no allocations defined, we can't do any bookings.</span>
+1513: <span class="ruby-comment cmt"># In projection mode we do not allow bookings prior to the current date</span>
+1514: <span class="ruby-comment cmt"># for any task (in strict mode) or tasks which have user specified</span>
+1515: <span class="ruby-comment cmt"># bookings (sloppy mode).</span>
+1516: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span>
+1517: (<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">scenario</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">get</span>(<span class="ruby-value str">'projection'</span>) <span class="ruby-operator">&&</span>
+1518: <span class="ruby-identifier">date</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">&&</span>
+1519: (<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">scenario</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">get</span>(<span class="ruby-value str">'strict'</span>) <span class="ruby-operator">||</span>
+1520: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">empty?</span>))
+1521: <span class="ruby-keyword kw">return</span>
+1522: <span class="ruby-keyword kw">end</span>
+1523:
+1524: <span class="ruby-comment cmt"># If the task has shifts to limit the allocations, we check that we are</span>
+1525: <span class="ruby-comment cmt"># within a defined shift interval. If yes, we need to be on shift to</span>
+1526: <span class="ruby-comment cmt"># continue.</span>
+1527: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">shifts</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">shifts</span>.<span class="ruby-identifier">assigned?</span>(<span class="ruby-identifier">date</span>)
+1528: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">shifts</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
+1529: <span class="ruby-keyword kw">end</span>
+1530:
+1531: <span class="ruby-comment cmt"># If the task has resource independent allocation limits we need to make</span>
+1532: <span class="ruby-comment cmt"># sure that none of them is already exceeded.</span>
+1533: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">limitsOk?</span>(<span class="ruby-identifier">date</span>)
+1534:
+1535: <span class="ruby-identifier">sbIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">date</span>)
+1536:
+1537: <span class="ruby-comment cmt"># We first have to make sure that if there are mandatory resources</span>
+1538: <span class="ruby-comment cmt"># that these are all available for the time slot.</span>
+1539: <span class="ruby-identifier">takenMandatories</span> = []
+1540: <span class="ruby-ivar">@mandatories</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">allocation</span><span class="ruby-operator">|</span>
+1541: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
+1542:
+1543: <span class="ruby-comment cmt"># For mandatory allocations with alternatives at least one of the</span>
+1544: <span class="ruby-comment cmt"># alternatives must be available.</span>
+1545: <span class="ruby-identifier">found</span> = <span class="ruby-keyword kw">false</span>
+1546: <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">candidates</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">candidate</span><span class="ruby-operator">|</span>
+1547: <span class="ruby-comment cmt"># When a resource group is marked mandatory, all members of the</span>
+1548: <span class="ruby-comment cmt"># group must be available.</span>
+1549: <span class="ruby-identifier">allAvailable</span> = <span class="ruby-keyword kw">true</span>
+1550: <span class="ruby-identifier">candidate</span>.<span class="ruby-identifier">allLeaves</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span>
+1551: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">limitsOk?</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">resource</span>) <span class="ruby-operator">||</span>
+1552: <span class="ruby-operator">!</span><span class="ruby-identifier">resource</span>.<span class="ruby-identifier">available?</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">sbIdx</span>) <span class="ruby-operator">||</span>
+1553: <span class="ruby-identifier">takenMandatories</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">resource</span>)
+1554: <span class="ruby-comment cmt"># We've found a mandatory resource that is not available for</span>
+1555: <span class="ruby-comment cmt"># the slot.</span>
+1556: <span class="ruby-identifier">allAvailable</span> = <span class="ruby-keyword kw">false</span>
+1557: <span class="ruby-keyword kw">break</span>
+1558: <span class="ruby-keyword kw">else</span>
+1559: <span class="ruby-identifier">takenMandatories</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">resource</span>
+1560: <span class="ruby-keyword kw">end</span>
+1561: <span class="ruby-keyword kw">end</span>
+1562: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allAvailable</span>
+1563: <span class="ruby-identifier">found</span> = <span class="ruby-keyword kw">true</span>
+1564: <span class="ruby-keyword kw">break</span>
+1565: <span class="ruby-keyword kw">end</span>
+1566: <span class="ruby-keyword kw">end</span>
+1567:
+1568: <span class="ruby-comment cmt"># At least one mandatory resource is not available. We cannot continue.</span>
+1569: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">found</span>
+1570: <span class="ruby-keyword kw">end</span>
+1571:
+1572: <span class="ruby-identifier">iv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">date</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>)
+1573: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">allocation</span><span class="ruby-operator">|</span>
+1574: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
+1575:
+1576: <span class="ruby-comment cmt"># In case we have a persistent allocation we need to check if there is</span>
+1577: <span class="ruby-comment cmt"># already a locked resource and use it.</span>
+1578: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">persistent</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">lockedResource</span>.<span class="ruby-identifier">nil?</span>
+1579: <span class="ruby-identifier">bookResource</span>(<span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">lockedResource</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">date</span>)
+1580: <span class="ruby-keyword kw">else</span>
+1581: <span class="ruby-comment cmt"># If not, we create a list of candidates in the proper order and</span>
+1582: <span class="ruby-comment cmt"># assign the first one available.</span>
+1583: <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">candidates</span>(<span class="ruby-ivar">@scenarioIdx</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">candidate</span><span class="ruby-operator">|</span>
+1584: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bookResource</span>(<span class="ruby-identifier">candidate</span>, <span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">date</span>)
+1585: <span class="ruby-identifier">allocation</span>.<span class="ruby-identifier">lockedResource</span> = <span class="ruby-identifier">candidate</span>
+1586: <span class="ruby-keyword kw">break</span>
+1587: <span class="ruby-keyword kw">end</span>
+1588: <span class="ruby-keyword kw">end</span>
+1589: <span class="ruby-keyword kw">end</span>
+1590: <span class="ruby-keyword kw">end</span>
+1591: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3516,11 +3596,11 @@
</div>
<div id="calc-ompletion-method" class="method-detail ">
- <a name="M001398"></a>
+ <a name="method-i-calcCompletion"></a>
<div class="method-heading">
<span class="method-name">calcCompletion</span><span
class="method-args">()</span>
@@ -3538,61 +3618,61 @@
<div class="method-source-code"
id="calc-ompletion-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1830</span>
-1830: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcCompletion</span>
-1831: <span class="ruby-comment cmt"># If the user provided a completion degree we are not touching it.</span>
-1832: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">provided</span>(<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>)
-1833: <span class="ruby-identifier">calcStatus</span>
-1834: <span class="ruby-keyword kw">return</span>
-1835: <span class="ruby-keyword kw">end</span>
-1836:
-1837: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>).<span class="ruby-identifier">nil?</span>
-1838: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-value">0.0</span>
-1839: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'status'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-value str">'unknown'</span>
-1840: <span class="ruby-keyword kw">return</span>
-1841: <span class="ruby-keyword kw">end</span>
-1842:
-1843: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
-1844: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
-1845: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">?</span> <span class="ruby-value">100.0</span> <span class="ruby-operator">:</span> <span class="ruby-value">0.0</span>
-1846: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'status'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
-1847: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator"><=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">?</span> <span class="ruby-value str">'done'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'not reached'</span>
-1848: <span class="ruby-keyword kw">else</span>
-1849: <span class="ruby-identifier">completion</span> = <span class="ruby-value">0.0</span>
-1850: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator"><=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]
-1851: <span class="ruby-comment cmt"># The task has ended already. It's 100% complete.</span>
-1852: <span class="ruby-identifier">completion</span> = <span class="ruby-value">100.0</span>
-1853: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator"><=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)
-1854: <span class="ruby-comment cmt"># The task has not started yet. Its' 0% complete.</span>
-1855: <span class="ruby-identifier">completion</span> = <span class="ruby-value">0.0</span>
-1856: <span class="ruby-keyword kw">else</span>
-1857: <span class="ruby-comment cmt"># The task is in progress. Calculate the current completion</span>
-1858: <span class="ruby-comment cmt"># degree.</span>
-1859: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
-1860: <span class="ruby-comment cmt"># Effort based leaf tasks. The completion degree is the percantage</span>
-1861: <span class="ruby-comment cmt"># of effort that has been done already.</span>
-1862: <span class="ruby-identifier">done</span> = <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)),
-1863: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]))
-1864: <span class="ruby-identifier">total</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
-1865: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) * <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>])
-1866: <span class="ruby-identifier">completion</span> = <span class="ruby-identifier">done</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">total</span> * <span class="ruby-value">100.0</span>
-1867: <span class="ruby-keyword kw">else</span>
-1868: <span class="ruby-comment cmt"># Container tasks and length/duration leaf tasks. There is no way</span>
-1869: <span class="ruby-comment cmt"># we can compute the completion degree of a container task with a</span>
-1870: <span class="ruby-comment cmt"># mix of effort and duration task in a meaningful way. So, we</span>
-1871: <span class="ruby-comment cmt"># just go by duration.</span>
-1872: <span class="ruby-identifier">completion</span> = ((<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)) <span class="ruby-operator">/</span>
-1873: (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>))) * <span class="ruby-value">100.0</span>
-1874: <span class="ruby-keyword kw">end</span>
-1875: <span class="ruby-keyword kw">end</span>
-1876: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">completion</span>
-1877: <span class="ruby-identifier">calcStatus</span>
-1878: <span class="ruby-keyword kw">end</span>
-1879: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1865</span>
+1865: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcCompletion</span>
+1866: <span class="ruby-comment cmt"># If the user provided a completion degree we are not touching it.</span>
+1867: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">provided</span>(<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>)
+1868: <span class="ruby-identifier">calcStatus</span>
+1869: <span class="ruby-keyword kw">return</span>
+1870: <span class="ruby-keyword kw">end</span>
+1871:
+1872: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>).<span class="ruby-identifier">nil?</span>
+1873: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-value">0.0</span>
+1874: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'status'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-value str">'unknown'</span>
+1875: <span class="ruby-keyword kw">return</span>
+1876: <span class="ruby-keyword kw">end</span>
+1877:
+1878: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
+1879: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
+1880: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">?</span> <span class="ruby-value">100.0</span> <span class="ruby-operator">:</span> <span class="ruby-value">0.0</span>
+1881: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'status'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
+1882: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator"><=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">?</span> <span class="ruby-value str">'done'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'not reached'</span>
+1883: <span class="ruby-keyword kw">else</span>
+1884: <span class="ruby-identifier">completion</span> = <span class="ruby-value">0.0</span>
+1885: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator"><=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]
+1886: <span class="ruby-comment cmt"># The task has ended already. It's 100% complete.</span>
+1887: <span class="ruby-identifier">completion</span> = <span class="ruby-value">100.0</span>
+1888: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator"><=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)
+1889: <span class="ruby-comment cmt"># The task has not started yet. Its' 0% complete.</span>
+1890: <span class="ruby-identifier">completion</span> = <span class="ruby-value">0.0</span>
+1891: <span class="ruby-keyword kw">else</span>
+1892: <span class="ruby-comment cmt"># The task is in progress. Calculate the current completion</span>
+1893: <span class="ruby-comment cmt"># degree.</span>
+1894: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
+1895: <span class="ruby-comment cmt"># Effort based leaf tasks. The completion degree is the percantage</span>
+1896: <span class="ruby-comment cmt"># of effort that has been done already.</span>
+1897: <span class="ruby-identifier">done</span> = <span class="ruby-identifier">getEffectiveWork</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)),
+1898: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>]))
+1899: <span class="ruby-identifier">total</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
+1900: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) * <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>])
+1901: <span class="ruby-identifier">completion</span> = <span class="ruby-identifier">done</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">total</span> * <span class="ruby-value">100.0</span>
+1902: <span class="ruby-keyword kw">else</span>
+1903: <span class="ruby-comment cmt"># Container tasks and length/duration leaf tasks. There is no way</span>
+1904: <span class="ruby-comment cmt"># we can compute the completion degree of a container task with a</span>
+1905: <span class="ruby-comment cmt"># mix of effort and duration task in a meaningful way. So, we</span>
+1906: <span class="ruby-comment cmt"># just go by duration.</span>
+1907: <span class="ruby-identifier">completion</span> = ((<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'now'</span>] <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)) <span class="ruby-operator">/</span>
+1908: (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>))) * <span class="ruby-value">100.0</span>
+1909: <span class="ruby-keyword kw">end</span>
+1910: <span class="ruby-keyword kw">end</span>
+1911: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'complete'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">completion</span>
+1912: <span class="ruby-identifier">calcStatus</span>
+1913: <span class="ruby-keyword kw">end</span>
+1914: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3600,11 +3680,11 @@
</div>
<div id="calc-ath-riticalness-nd-uccs-method" class="method-detail ">
- <a name="M001397"></a>
+ <a name="method-i-calcPathCriticalnessEndSuccs"></a>
<div class="method-heading">
<span class="method-name">calcPathCriticalnessEndSuccs</span><span
class="method-args">()</span>
@@ -3623,32 +3703,32 @@
<div class="method-source-code"
id="calc-ath-riticalness-nd-uccs-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1806</span>
-1806: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcPathCriticalnessEndSuccs</span>
-1807: <span class="ruby-identifier">maxCriticalness</span> = <span class="ruby-value">0.0</span>
-1808: <span class="ruby-comment cmt"># Gather a list of all end-successors of this task and its parent task.</span>
-1809: <span class="ruby-identifier">tList</span> = []
-1810: <span class="ruby-identifier">p</span> = <span class="ruby-ivar">@property</span>
-1811: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">p</span>)
-1812: <span class="ruby-identifier">p</span>[<span class="ruby-value str">'endsuccs'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-1813: <span class="ruby-identifier">tList</span> <span class="ruby-operator"><<</span> [ <span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span> ] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">tList</span>.<span class="ruby-identifier">include?</span>([ <span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span> ])
-1814: <span class="ruby-keyword kw">end</span>
-1815: <span class="ruby-identifier">p</span> = <span class="ruby-identifier">p</span>.<span class="ruby-identifier">parent</span>
-1816: <span class="ruby-keyword kw">end</span>
-1817:
-1818: <span class="ruby-identifier">tList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-1819: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">criticalness</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">calcPathCriticalness</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">onEnd</span>)) <span class="ruby-operator">></span>
-1820: <span class="ruby-identifier">maxCriticalness</span>
-1821: <span class="ruby-identifier">maxCriticalness</span> = <span class="ruby-identifier">criticalness</span>
-1822: <span class="ruby-keyword kw">end</span>
-1823: <span class="ruby-keyword kw">end</span>
-1824:
-1825: <span class="ruby-identifier">maxCriticalness</span>
-1826: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1841</span>
+1841: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcPathCriticalnessEndSuccs</span>
+1842: <span class="ruby-identifier">maxCriticalness</span> = <span class="ruby-value">0.0</span>
+1843: <span class="ruby-comment cmt"># Gather a list of all end-successors of this task and its parent task.</span>
+1844: <span class="ruby-identifier">tList</span> = []
+1845: <span class="ruby-identifier">p</span> = <span class="ruby-ivar">@property</span>
+1846: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">p</span>)
+1847: <span class="ruby-identifier">p</span>[<span class="ruby-value str">'endsuccs'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+1848: <span class="ruby-identifier">tList</span> <span class="ruby-operator"><<</span> [ <span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span> ] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">tList</span>.<span class="ruby-identifier">include?</span>([ <span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span> ])
+1849: <span class="ruby-keyword kw">end</span>
+1850: <span class="ruby-identifier">p</span> = <span class="ruby-identifier">p</span>.<span class="ruby-identifier">parent</span>
+1851: <span class="ruby-keyword kw">end</span>
+1852:
+1853: <span class="ruby-identifier">tList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+1854: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">criticalness</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">calcPathCriticalness</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">onEnd</span>)) <span class="ruby-operator">></span>
+1855: <span class="ruby-identifier">maxCriticalness</span>
+1856: <span class="ruby-identifier">maxCriticalness</span> = <span class="ruby-identifier">criticalness</span>
+1857: <span class="ruby-keyword kw">end</span>
+1858: <span class="ruby-keyword kw">end</span>
+1859:
+1860: <span class="ruby-identifier">maxCriticalness</span>
+1861: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3656,11 +3736,11 @@
</div>
<div id="calc-tatus-method" class="method-detail ">
- <a name="M001399"></a>
+ <a name="method-i-calcStatus"></a>
<div class="method-heading">
<span class="method-name">calcStatus</span><span
class="method-args">()</span>
@@ -3678,21 +3758,21 @@
<div class="method-source-code"
id="calc-tatus-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1882</span>
-1882: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcStatus</span>
-1883: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'status'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
-1884: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'complete'</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span>
-1885: <span class="ruby-value str">'not started'</span>
-1886: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'complete'</span>) <span class="ruby-operator">>=</span> <span class="ruby-value">100.0</span>
-1887: <span class="ruby-value str">'done'</span>
-1888: <span class="ruby-keyword kw">else</span>
-1889: <span class="ruby-value str">'in progress'</span>
-1890: <span class="ruby-keyword kw">end</span>
-1891: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1917</span>
+1917: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcStatus</span>
+1918: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'status'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
+1919: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'complete'</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span>
+1920: <span class="ruby-value str">'not started'</span>
+1921: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'complete'</span>) <span class="ruby-operator">>=</span> <span class="ruby-value">100.0</span>
+1922: <span class="ruby-value str">'done'</span>
+1923: <span class="ruby-keyword kw">else</span>
+1924: <span class="ruby-value str">'in progress'</span>
+1925: <span class="ruby-keyword kw">end</span>
+1926: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3700,11 +3780,11 @@
</div>
<div id="check-ependency-method" class="method-detail ">
- <a name="M001394"></a>
+ <a name="method-i-checkDependency"></a>
<div class="method-heading">
<span class="method-name">checkDependency</span><span
class="method-args">(dependency, depType)</span>
@@ -3719,55 +3799,55 @@
<div class="method-source-code"
id="check-ependency-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1724</span>
-1724: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkDependency</span>(<span class="ruby-identifier">dependency</span>, <span class="ruby-identifier">depType</span>)
-1725: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">depTask</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">resolve</span>(<span class="ruby-ivar">@project</span>)).<span class="ruby-identifier">nil?</span>
-1726: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
-1727: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
-1728: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_unknown'</span>,
-1729: <span class="ruby-node">"Task #{@property.fullId} has unknown #{depType} "</span> <span class="ruby-operator">+</span>
-1730: <span class="ruby-node">"#{dependency.taskId}"</span>)
-1731: <span class="ruby-keyword kw">end</span>
-1732:
-1733: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">depTask</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@property</span>
-1734: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
-1735: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
-1736: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_self'</span>, <span class="ruby-node">"Task #{@property.fullId} cannot "</span> <span class="ruby-operator">+</span>
-1737: <span class="ruby-value str">"depend on self"</span>)
-1738: <span class="ruby-keyword kw">end</span>
-1739:
-1740: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">depTask</span>.<span class="ruby-identifier">isChildOf?</span>(<span class="ruby-ivar">@property</span>)
-1741: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
-1742: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
-1743: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_child'</span>,
-1744: <span class="ruby-node">"Task #{@property.fullId} cannot depend on child "</span> <span class="ruby-operator">+</span>
-1745: <span class="ruby-node">"#{depTask.fullId}"</span>)
-1746: <span class="ruby-keyword kw">end</span>
-1747:
-1748: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">isChildOf?</span>(<span class="ruby-identifier">depTask</span>)
-1749: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
-1750: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
-1751: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_parent'</span>,
-1752: <span class="ruby-node">"Task #{@property.fullId} cannot depend on parent "</span> <span class="ruby-operator">+</span>
-1753: <span class="ruby-node">"#{depTask.fullId}"</span>)
-1754: <span class="ruby-keyword kw">end</span>
-1755:
-1756: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
-1757: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">task</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">depTask</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">dependency</span>
-1758: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
-1759: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
-1760: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_multi'</span>,
-1761: <span class="ruby-node">"No need to specify dependency #{depTask.fullId} multiple "</span> <span class="ruby-operator">+</span>
-1762: <span class="ruby-node">"times for task #{@property.fullId}."</span>)
-1763: <span class="ruby-keyword kw">end</span>
-1764: <span class="ruby-keyword kw">end</span>
-1765:
-1766: <span class="ruby-identifier">depTask</span>
-1767: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1759</span>
+1759: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkDependency</span>(<span class="ruby-identifier">dependency</span>, <span class="ruby-identifier">depType</span>)
+1760: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">depTask</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">resolve</span>(<span class="ruby-ivar">@project</span>)).<span class="ruby-identifier">nil?</span>
+1761: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
+1762: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
+1763: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_unknown'</span>,
+1764: <span class="ruby-node">"Task #{@property.fullId} has unknown #{depType} "</span> <span class="ruby-operator">+</span>
+1765: <span class="ruby-node">"#{dependency.taskId}"</span>)
+1766: <span class="ruby-keyword kw">end</span>
+1767:
+1768: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">depTask</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@property</span>
+1769: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
+1770: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
+1771: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_self'</span>, <span class="ruby-node">"Task #{@property.fullId} cannot "</span> <span class="ruby-operator">+</span>
+1772: <span class="ruby-value str">"depend on self"</span>)
+1773: <span class="ruby-keyword kw">end</span>
+1774:
+1775: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">depTask</span>.<span class="ruby-identifier">isChildOf?</span>(<span class="ruby-ivar">@property</span>)
+1776: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
+1777: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
+1778: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_child'</span>,
+1779: <span class="ruby-node">"Task #{@property.fullId} cannot depend on child "</span> <span class="ruby-operator">+</span>
+1780: <span class="ruby-node">"#{depTask.fullId}"</span>)
+1781: <span class="ruby-keyword kw">end</span>
+1782:
+1783: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">isChildOf?</span>(<span class="ruby-identifier">depTask</span>)
+1784: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
+1785: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
+1786: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_parent'</span>,
+1787: <span class="ruby-node">"Task #{@property.fullId} cannot depend on parent "</span> <span class="ruby-operator">+</span>
+1788: <span class="ruby-node">"#{depTask.fullId}"</span>)
+1789: <span class="ruby-keyword kw">end</span>
+1790:
+1791: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
+1792: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">task</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">depTask</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">dependency</span>
+1793: <span class="ruby-comment cmt"># Remove the broken dependency. It could cause trouble later on.</span>
+1794: <span class="ruby-ivar">@property</span>[<span class="ruby-identifier">depType</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">dependency</span>)
+1795: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'task_depend_multi'</span>,
+1796: <span class="ruby-node">"No need to specify dependency #{depTask.fullId} multiple "</span> <span class="ruby-operator">+</span>
+1797: <span class="ruby-node">"times for task #{@property.fullId}."</span>)
+1798: <span class="ruby-keyword kw">end</span>
+1799: <span class="ruby-keyword kw">end</span>
+1800:
+1801: <span class="ruby-identifier">depTask</span>
+1802: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3775,11 +3855,11 @@
</div>
<div id="has-ependencies-method" class="method-detail ">
- <a name="M001390"></a>
+ <a name="method-i-hasDependencies"></a>
<div class="method-heading">
<span class="method-name">hasDependencies</span><span
class="method-args">(atEnd)</span>
@@ -3798,15 +3878,15 @@
<div class="method-source-code"
id="has-ependencies-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1676</span>
-1676: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasDependencies</span>(<span class="ruby-identifier">atEnd</span>)
-1677: <span class="ruby-identifier">thisEnd</span> = <span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>
-1678: <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">empty?</span>
-1679: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1711</span>
+1711: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasDependencies</span>(<span class="ruby-identifier">atEnd</span>)
+1712: <span class="ruby-identifier">thisEnd</span> = <span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>
+1713: <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'succs'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-identifier">thisEnd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'preds'</span>).<span class="ruby-identifier">empty?</span>
+1714: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3814,11 +3894,11 @@
</div>
<div id="has-uccessors-method" class="method-detail ">
- <a name="M001391"></a>
+ <a name="method-i-hasSuccessors"></a>
<div class="method-heading">
<span class="method-name">hasSuccessors</span><span
class="method-args">()</span>
@@ -3836,32 +3916,74 @@
<div class="method-source-code"
id="has-uccessors-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1683</span>
-1683: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasSuccessors</span>
-1684: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@property</span>
-1685: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span>
-1686: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">t</span>[<span class="ruby-value str">'endsuccs'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">empty?</span>
-1687: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">parent</span>
-1688: <span class="ruby-keyword kw">end</span>
-1689:
-1690: <span class="ruby-keyword kw">false</span>
-1691: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1718</span>
+1718: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hasSuccessors</span>
+1719: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@property</span>
+1720: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span>
+1721: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">t</span>[<span class="ruby-value str">'endsuccs'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">empty?</span>
+1722: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">parent</span>
+1723: <span class="ruby-keyword kw">end</span>
+1724:
+1725: <span class="ruby-keyword kw">false</span>
+1726: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
+ <div id="limits-k--method" class="method-detail ">
+ <a name="method-i-limitsOk%3F"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">limitsOk?</span><span
+ class="method-args">(date, resource = nil)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check if all of the task limits are not exceded at the given <em>date</em>.
+If a <em>resource</em> is provided, the limit for that particular resource
+is checked. If no resource is provided, only non-resource-specific limits
+are checked.
+</p>
+
+
+
+ <div class="method-source-code"
+ id="limits-k--source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1636</span>
+1636: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">limitsOk?</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>)
+1637: <span class="ruby-ivar">@limits</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">limit</span><span class="ruby-operator">|</span>
+1638: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">limit</span>.<span class="ruby-identifier">ok?</span>(<span class="ruby-identifier">date</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">resource</span>)
+1639: <span class="ruby-keyword kw">end</span>
+1640: <span class="ruby-keyword kw">true</span>
+1641: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
<div id="mark-s-unaway-method" class="method-detail ">
- <a name="M001392"></a>
+ <a name="method-i-markAsRunaway"></a>
<div class="method-heading">
<span class="method-name">markAsRunaway</span><span
class="method-args">()</span>
@@ -3876,17 +3998,17 @@
<div class="method-source-code"
id="mark-s-unaway-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1693</span>
-1693: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">markAsRunaway</span>
-1694: <span class="ruby-identifier">warning</span>(<span class="ruby-value str">'runaway'</span>, <span class="ruby-node">"Task #{@property.fullId} does not fit into "</span> <span class="ruby-operator">+</span>
-1695: <span class="ruby-value str">"project time frame"</span>)
-1696:
-1697: <span class="ruby-ivar">@isRunAway</span> = <span class="ruby-keyword kw">true</span>
-1698: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1728</span>
+1728: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">markAsRunaway</span>
+1729: <span class="ruby-identifier">warning</span>(<span class="ruby-value str">'runaway'</span>, <span class="ruby-node">"Task #{@property.fullId} does not fit into "</span> <span class="ruby-operator">+</span>
+1730: <span class="ruby-value str">"project time frame"</span>)
+1731:
+1732: <span class="ruby-ivar">@isRunAway</span> = <span class="ruby-keyword kw">true</span>
+1733: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3894,11 +4016,11 @@
</div>
<div id="mark-ilestone-method" class="method-detail ">
- <a name="M001393"></a>
+ <a name="method-i-markMilestone"></a>
<div class="method-heading">
<span class="method-name">markMilestone</span><span
class="method-args">()</span>
@@ -3916,32 +4038,32 @@
<div class="method-source-code"
id="mark-ilestone-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1702</span>
-1702: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">markMilestone</span>
-1703: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">||</span>
-1704: <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span>
-1705:
-1706: <span class="ruby-comment cmt"># The following cases qualify for an automatic milestone promotion.</span>
-1707: <span class="ruby-comment cmt"># - --> -</span>
-1708: <span class="ruby-comment cmt"># | --> -</span>
-1709: <span class="ruby-comment cmt"># |D --> -</span>
-1710: <span class="ruby-comment cmt"># -D --> -</span>
-1711: <span class="ruby-comment cmt"># - <-- -</span>
-1712: <span class="ruby-comment cmt"># - <-- |</span>
-1713: <span class="ruby-comment cmt"># - <-- -D</span>
-1714: <span class="ruby-comment cmt"># - <-- |D</span>
-1715: <span class="ruby-identifier">hasStartSpec</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'depends'</span>).<span class="ruby-identifier">empty?</span>
-1716: <span class="ruby-identifier">hasEndSpec</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'precedes'</span>).<span class="ruby-identifier">empty?</span>
-1717:
-1718: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'milestone'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
-1719: (<span class="ruby-identifier">hasStartSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasEndSpec</span>) <span class="ruby-operator">||</span>
-1720: (<span class="ruby-operator">!</span><span class="ruby-identifier">hasStartSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">hasEndSpec</span>) <span class="ruby-operator">||</span>
-1721: (<span class="ruby-operator">!</span><span class="ruby-identifier">hasStartSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasEndSpec</span>)
-1722: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1737</span>
+1737: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">markMilestone</span>
+1738: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">hasDurationSpec?</span> <span class="ruby-operator">||</span>
+1739: <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'booking'</span>).<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span>
+1740:
+1741: <span class="ruby-comment cmt"># The following cases qualify for an automatic milestone promotion.</span>
+1742: <span class="ruby-comment cmt"># - --> -</span>
+1743: <span class="ruby-comment cmt"># | --> -</span>
+1744: <span class="ruby-comment cmt"># |D --> -</span>
+1745: <span class="ruby-comment cmt"># -D --> -</span>
+1746: <span class="ruby-comment cmt"># - <-- -</span>
+1747: <span class="ruby-comment cmt"># - <-- |</span>
+1748: <span class="ruby-comment cmt"># - <-- -D</span>
+1749: <span class="ruby-comment cmt"># - <-- |D</span>
+1750: <span class="ruby-identifier">hasStartSpec</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'depends'</span>).<span class="ruby-identifier">empty?</span>
+1751: <span class="ruby-identifier">hasEndSpec</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'precedes'</span>).<span class="ruby-identifier">empty?</span>
+1752:
+1753: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'milestone'</span>, <span class="ruby-ivar">@scenarioIdx</span>] =
+1754: (<span class="ruby-identifier">hasStartSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasEndSpec</span>) <span class="ruby-operator">||</span>
+1755: (<span class="ruby-operator">!</span><span class="ruby-identifier">hasStartSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">hasEndSpec</span>) <span class="ruby-operator">||</span>
+1756: (<span class="ruby-operator">!</span><span class="ruby-identifier">hasStartSpec</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasEndSpec</span>)
+1757: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3949,11 +4071,11 @@
</div>
<div id="next-lot-method" class="method-detail ">
- <a name="M001386"></a>
+ <a name="method-i-nextSlot"></a>
<div class="method-heading">
<span class="method-name">nextSlot</span><span
class="method-args">(slotDuration)</span>
@@ -3973,20 +4095,20 @@
<div class="method-source-code"
id="next-lot-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1481</span>
-1481: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextSlot</span>(<span class="ruby-identifier">slotDuration</span>)
-1482: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>) <span class="ruby-operator">||</span> <span class="ruby-ivar">@isRunAway</span>
-1483:
-1484: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
-1485: <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">:</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
-1486: <span class="ruby-keyword kw">else</span>
-1487: <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span>
-1488: <span class="ruby-keyword kw">end</span>
-1489: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1501</span>
+1501: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextSlot</span>(<span class="ruby-identifier">slotDuration</span>)
+1502: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scheduled'</span>) <span class="ruby-operator">||</span> <span class="ruby-ivar">@isRunAway</span>
+1503:
+1504: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
+1505: <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">:</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
+1506: <span class="ruby-keyword kw">else</span>
+1507: <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span>
+1508: <span class="ruby-keyword kw">end</span>
+1509: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -3994,11 +4116,11 @@
</div>
<div id="propagate-ate-o-ep-method" class="method-detail ">
- <a name="M001396"></a>
+ <a name="method-i-propagateDateToDep"></a>
<div class="method-heading">
<span class="method-name">propagateDateToDep</span><span
class="method-args">(task, atEnd)</span>
@@ -4018,35 +4140,35 @@
<div class="method-source-code"
id="propagate-ate-o-ep-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1778</span>
-1778: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">propagateDateToDep</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">atEnd</span>)
-1779: <span class="ruby-comment cmt">#puts "Propagate #{atEnd ? 'end' : 'start'} to dep. #{task.fullId}"</span>
-1780: <span class="ruby-comment cmt"># Don't propagate if the task is already completely scheduled or is a</span>
-1781: <span class="ruby-comment cmt"># container.</span>
-1782: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">container?</span>
-1783:
-1784: <span class="ruby-comment cmt"># Don't propagate if the task already has a date for that end.</span>
-1785: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">task</span>[<span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">nil?</span>
-1786:
-1787: <span class="ruby-comment cmt"># Don't propagate if the task has a duration or is a milestone and the</span>
-1788: <span class="ruby-comment cmt"># task end to set is in the scheduling direction.</span>
-1789: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">hasDurationSpec?</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-operator">&&</span>
-1790: <span class="ruby-operator">!</span>(<span class="ruby-identifier">atEnd</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'forward'</span>, <span class="ruby-ivar">@scenarioIdx</span>])
-1791:
-1792: <span class="ruby-comment cmt"># Check if all other dependencies for that task end have been determined</span>
-1793: <span class="ruby-comment cmt"># already and use the latest or earliest possible date. Don't propagate</span>
-1794: <span class="ruby-comment cmt"># if we don't have all dates yet.</span>
-1795: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">nDate</span> = (<span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">latestEnd</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-operator">:</span>
-1796: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">earliestStart</span>(<span class="ruby-ivar">@scenarioIdx</span>))).<span class="ruby-identifier">nil?</span>
-1797:
-1798: <span class="ruby-comment cmt"># Looks like it is ok to propagate the date.</span>
-1799: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">nDate</span>, <span class="ruby-identifier">atEnd</span>)
-1800: <span class="ruby-comment cmt"># puts "Propagate #{atEnd ? 'end' : 'start'} to dep. #{task.fullId} done"</span>
-1801: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1813</span>
+1813: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">propagateDateToDep</span>(<span class="ruby-identifier">task</span>, <span class="ruby-identifier">atEnd</span>)
+1814: <span class="ruby-comment cmt">#puts "Propagate #{atEnd ? 'end' : 'start'} to dep. #{task.fullId}"</span>
+1815: <span class="ruby-comment cmt"># Don't propagate if the task is already completely scheduled or is a</span>
+1816: <span class="ruby-comment cmt"># container.</span>
+1817: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">container?</span>
+1818:
+1819: <span class="ruby-comment cmt"># Don't propagate if the task already has a date for that end.</span>
+1820: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">task</span>[<span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'end'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'start'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">nil?</span>
+1821:
+1822: <span class="ruby-comment cmt"># Don't propagate if the task has a duration or is a milestone and the</span>
+1823: <span class="ruby-comment cmt"># task end to set is in the scheduling direction.</span>
+1824: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">hasDurationSpec?</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-operator">&&</span>
+1825: <span class="ruby-operator">!</span>(<span class="ruby-identifier">atEnd</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'forward'</span>, <span class="ruby-ivar">@scenarioIdx</span>])
+1826:
+1827: <span class="ruby-comment cmt"># Check if all other dependencies for that task end have been determined</span>
+1828: <span class="ruby-comment cmt"># already and use the latest or earliest possible date. Don't propagate</span>
+1829: <span class="ruby-comment cmt"># if we don't have all dates yet.</span>
+1830: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">nDate</span> = (<span class="ruby-identifier">atEnd</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">latestEnd</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-operator">:</span>
+1831: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">earliestStart</span>(<span class="ruby-ivar">@scenarioIdx</span>))).<span class="ruby-identifier">nil?</span>
+1832:
+1833: <span class="ruby-comment cmt"># Looks like it is ok to propagate the date.</span>
+1834: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">nDate</span>, <span class="ruby-identifier">atEnd</span>)
+1835: <span class="ruby-comment cmt"># puts "Propagate #{atEnd ? 'end' : 'start'} to dep. #{task.fullId} done"</span>
+1836: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -4054,11 +4176,11 @@
</div>
<div id="schedule-lot-method" class="method-detail ">
- <a name="M001385"></a>
+ <a name="method-i-scheduleSlot"></a>
<div class="method-heading">
<span class="method-name">scheduleSlot</span><span
class="method-args">(slot, slotDuration)</span>
@@ -4073,105 +4195,103 @@
<div class="method-source-code"
id="schedule-lot-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1382</span>
-1382: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scheduleSlot</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>)
-1383: <span class="ruby-comment cmt"># Tasks must always be scheduled in a single contigous fashion. @lastSlot</span>
-1384: <span class="ruby-comment cmt"># indicates the slot that was used for the previous call. Depending on the</span>
-1385: <span class="ruby-comment cmt"># scheduling direction the next slot must be scheduled either right before</span>
-1386: <span class="ruby-comment cmt"># or after this slot. If the current slot is not directly aligned, we'll</span>
-1387: <span class="ruby-comment cmt"># wait for another call with a proper slot. The function returns true</span>
-1388: <span class="ruby-comment cmt"># only if a slot could be scheduled.</span>
-1389: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
-1390: <span class="ruby-comment cmt"># On first call, the @lastSlot is not set yet. We set it to the slot</span>
-1391: <span class="ruby-comment cmt"># before the start slot.</span>
-1392: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span>
-1393: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span>
-1394: <span class="ruby-ivar">@tentativeEnd</span> = <span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
-1395: <span class="ruby-keyword kw">end</span>
-1396:
-1397: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
-1398: <span class="ruby-keyword kw">else</span>
-1399: <span class="ruby-comment cmt"># On first call, the @lastSlot is not set yet. We set it to the slot</span>
-1400: <span class="ruby-comment cmt"># to the end slot.</span>
-1401: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span>
-1402: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
-1403: <span class="ruby-ivar">@tentativeStart</span> = <span class="ruby-identifier">slot</span>
-1404: <span class="ruby-keyword kw">end</span>
-1405:
-1406: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span>
-1407: <span class="ruby-keyword kw">end</span>
-1408: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">slot</span>
-1409:
-1410: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
-1411: <span class="ruby-comment cmt"># The doneDuration counts the number of scheduled slots. It is increased</span>
-1412: <span class="ruby-comment cmt"># by one with every scheduled slot. The doneLength is only increased for</span>
-1413: <span class="ruby-comment cmt"># global working time slots.</span>
-1414: <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>)
-1415: <span class="ruby-ivar">@doneDuration</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
-1416: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>)
-1417: <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
-1418: <span class="ruby-keyword kw">end</span>
-1419:
-1420: <span class="ruby-comment cmt"># If we have reached the specified duration or lengths, we set the end</span>
-1421: <span class="ruby-comment cmt"># or start date and propagate the value to neighbouring tasks.</span>
-1422: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>)) <span class="ruby-operator">||</span>
-1423: (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneDuration</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>))
-1424: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
-1425: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
-1426: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>, <span class="ruby-keyword kw">true</span>)
-1427: <span class="ruby-keyword kw">else</span>
-1428: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-keyword kw">false</span>)
-1429: <span class="ruby-keyword kw">end</span>
-1430: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
-1431: <span class="ruby-keyword kw">end</span>
-1432: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
-1433: <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>)
-1434: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>)
-1435: <span class="ruby-comment cmt"># The specified effort has been reached. The has been fully scheduled</span>
-1436: <span class="ruby-comment cmt"># now.</span>
-1437: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
-1438: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
-1439: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@tentativeEnd</span>, <span class="ruby-keyword kw">true</span>)
-1440: <span class="ruby-keyword kw">else</span>
-1441: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@tentativeStart</span>, <span class="ruby-keyword kw">false</span>)
-1442: <span class="ruby-keyword kw">end</span>
-1443: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
-1444: <span class="ruby-keyword kw">end</span>
-1445: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
-1446: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
-1447: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>), <span class="ruby-keyword kw">true</span>)
-1448: <span class="ruby-keyword kw">else</span>
-1449: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>), <span class="ruby-keyword kw">false</span>)
-1450: <span class="ruby-keyword kw">end</span>
-1451: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
-1452: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
-1453: <span class="ruby-comment cmt"># Task with start and end date but no duration criteria</span>
-1454: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span>
-1455: <span class="ruby-comment cmt"># For start-end-tasks without allocation, we don't have to do</span>
-1456: <span class="ruby-comment cmt"># anything but to set the 'scheduled' flag.</span>
-1457: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
-1458: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">scheduleContainer</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
-1459: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
-1460: <span class="ruby-keyword kw">end</span>
-1461:
-1462: <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>)
-1463:
-1464: <span class="ruby-comment cmt"># Depending on the scheduling direction we can mark the task as</span>
-1465: <span class="ruby-comment cmt"># scheduled once we have reached the other end.</span>
-1466: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)) <span class="ruby-operator">||</span>
-1467: (<span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator"><=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>))
-1468: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
-1469: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">scheduleContainer</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
-1470: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
-1471: <span class="ruby-keyword kw">end</span>
-1472: <span class="ruby-keyword kw">end</span>
-1473:
-1474: <span class="ruby-keyword kw">false</span>
-1475: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1404</span>
+1404: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scheduleSlot</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>)
+1405: <span class="ruby-comment cmt"># Tasks must always be scheduled in a single contigous fashion. @lastSlot</span>
+1406: <span class="ruby-comment cmt"># indicates the slot that was used for the previous call. Depending on the</span>
+1407: <span class="ruby-comment cmt"># scheduling direction the next slot must be scheduled either right before</span>
+1408: <span class="ruby-comment cmt"># or after this slot. If the current slot is not directly aligned, we'll</span>
+1409: <span class="ruby-comment cmt"># wait for another call with a proper slot. The function returns true</span>
+1410: <span class="ruby-comment cmt"># only if a slot could be scheduled.</span>
+1411: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
+1412: <span class="ruby-comment cmt"># On first call, the @lastSlot is not set yet. We set it to the slot</span>
+1413: <span class="ruby-comment cmt"># before the start slot.</span>
+1414: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span>
+1415: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span>
+1416: <span class="ruby-ivar">@tentativeEnd</span> = <span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
+1417: <span class="ruby-keyword kw">end</span>
+1418:
+1419: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>
+1420: <span class="ruby-keyword kw">else</span>
+1421: <span class="ruby-comment cmt"># On first call, the @lastSlot is not set yet. We set it to the slot</span>
+1422: <span class="ruby-comment cmt"># to the end slot.</span>
+1423: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastSlot</span>.<span class="ruby-identifier">nil?</span>
+1424: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
+1425: <span class="ruby-ivar">@tentativeStart</span> = <span class="ruby-identifier">slot</span>
+1426: <span class="ruby-keyword kw">end</span>
+1427:
+1428: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@lastSlot</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">slotDuration</span>
+1429: <span class="ruby-keyword kw">end</span>
+1430: <span class="ruby-ivar">@lastSlot</span> = <span class="ruby-identifier">slot</span>
+1431:
+1432: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
+1433: <span class="ruby-comment cmt"># The doneDuration counts the number of scheduled slots. It is increased</span>
+1434: <span class="ruby-comment cmt"># by one with every scheduled slot. The doneLength is only increased for</span>
+1435: <span class="ruby-comment cmt"># global working time slots.</span>
+1436: <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>)
+1437: <span class="ruby-ivar">@doneDuration</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
+1438: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>)
+1439: <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
+1440: <span class="ruby-keyword kw">end</span>
+1441:
+1442: <span class="ruby-comment cmt"># If we have reached the specified duration or lengths, we set the end</span>
+1443: <span class="ruby-comment cmt"># or start date and propagate the value to neighbouring tasks.</span>
+1444: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneLength</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'length'</span>)) <span class="ruby-operator">||</span>
+1445: (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@doneDuration</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duration'</span>))
+1446: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
+1447: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span>, <span class="ruby-keyword kw">true</span>)
+1448: <span class="ruby-keyword kw">else</span>
+1449: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-keyword kw">false</span>)
+1450: <span class="ruby-keyword kw">end</span>
+1451: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+1452: <span class="ruby-keyword kw">end</span>
+1453: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
+1454: <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>)
+1455: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@doneEffort</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'effort'</span>)
+1456: <span class="ruby-comment cmt"># The specified effort has been reached. The has been fully scheduled</span>
+1457: <span class="ruby-comment cmt"># now.</span>
+1458: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
+1459: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@tentativeEnd</span>, <span class="ruby-keyword kw">true</span>)
+1460: <span class="ruby-keyword kw">else</span>
+1461: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-ivar">@tentativeStart</span>, <span class="ruby-keyword kw">false</span>)
+1462: <span class="ruby-keyword kw">end</span>
+1463: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+1464: <span class="ruby-keyword kw">end</span>
+1465: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'milestone'</span>)
+1466: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>)
+1467: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>), <span class="ruby-keyword kw">true</span>)
+1468: <span class="ruby-keyword kw">else</span>
+1469: <span class="ruby-identifier">propagateDate</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>), <span class="ruby-keyword kw">false</span>)
+1470: <span class="ruby-keyword kw">end</span>
+1471: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+1472: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
+1473: <span class="ruby-comment cmt"># Task with start and end date but no duration criteria</span>
+1474: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'allocate'</span>).<span class="ruby-identifier">empty?</span>
+1475: <span class="ruby-comment cmt"># For start-end-tasks without allocation, we don't have to do</span>
+1476: <span class="ruby-comment cmt"># anything but to set the 'scheduled' flag.</span>
+1477: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
+1478: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">scheduleContainer</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
+1479: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+1480: <span class="ruby-keyword kw">end</span>
+1481:
+1482: <span class="ruby-identifier">bookResources</span>(<span class="ruby-identifier">slot</span>, <span class="ruby-identifier">slotDuration</span>)
+1483:
+1484: <span class="ruby-comment cmt"># Depending on the scheduling direction we can mark the task as</span>
+1485: <span class="ruby-comment cmt"># scheduled once we have reached the other end.</span>
+1486: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">slotDuration</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)) <span class="ruby-operator">||</span>
+1487: (<span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'forward'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator"><=</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>))
+1488: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-keyword kw">true</span>
+1489: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">scheduleContainer</span>(<span class="ruby-ivar">@scenarioIdx</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
+1490: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+1491: <span class="ruby-keyword kw">end</span>
+1492: <span class="ruby-keyword kw">end</span>
+1493:
+1494: <span class="ruby-keyword kw">false</span>
+1495: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -4179,11 +4299,11 @@
</div>
<div id="set-etermination-method" class="method-detail ">
- <a name="M001395"></a>
+ <a name="method-i-setDetermination"></a>
<div class="method-heading">
<span class="method-name">setDetermination</span><span
class="method-args">(setStart, value)</span>
@@ -4201,14 +4321,14 @@
<div class="method-source-code"
id="set-etermination-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1771</span>
-1771: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setDetermination</span>(<span class="ruby-identifier">setStart</span>, <span class="ruby-identifier">value</span>)
-1772: <span class="ruby-identifier">setStart</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@startIsDetermed</span> = <span class="ruby-identifier">value</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@endIsDetermed</span> = <span class="ruby-identifier">value</span>
-1773: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1806</span>
+1806: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setDetermination</span>(<span class="ruby-identifier">setStart</span>, <span class="ruby-identifier">value</span>)
+1807: <span class="ruby-identifier">setStart</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@startIsDetermed</span> = <span class="ruby-identifier">value</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@endIsDetermed</span> = <span class="ruby-identifier">value</span>
+1808: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -4216,11 +4336,11 @@
</div>
<div id="targets-method" class="method-detail ">
- <a name="M001400"></a>
+ <a name="method-i-targets"></a>
<div class="method-heading">
<span class="method-name">targets</span><span
class="method-args">(list)</span>
@@ -4238,26 +4358,26 @@
<div class="method-source-code"
id="targets-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1895</span>
-1895: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">targets</span>(<span class="ruby-identifier">list</span>)
-1896: <span class="ruby-comment cmt"># A target must be a leaf function that has no direct or indirect</span>
-1897: <span class="ruby-comment cmt"># (through parent) following tasks.</span>
-1898: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasSuccessors</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">list</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@property</span>)
-1899: <span class="ruby-identifier">list</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@property</span>
-1900: <span class="ruby-keyword kw">return</span>
-1901: <span class="ruby-keyword kw">end</span>
-1902:
-1903: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
-1904: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">targets</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">list</span>)
-1905: <span class="ruby-keyword kw">end</span>
-1906:
-1907: <span class="ruby-comment cmt"># Check of indirect followers.</span>
-1908: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">targets</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">list</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
-1909: <span class="ruby-keyword kw">end</span></pre>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1930</span>
+1930: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">targets</span>(<span class="ruby-identifier">list</span>)
+1931: <span class="ruby-comment cmt"># A target must be a leaf function that has no direct or indirect</span>
+1932: <span class="ruby-comment cmt"># (through parent) following tasks.</span>
+1933: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hasSuccessors</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">list</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@property</span>)
+1934: <span class="ruby-identifier">list</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@property</span>
+1935: <span class="ruby-keyword kw">return</span>
+1936: <span class="ruby-keyword kw">end</span>
+1937:
+1938: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'endsuccs'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span>, <span class="ruby-identifier">onEnd</span><span class="ruby-operator">|</span>
+1939: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">targets</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">list</span>)
+1940: <span class="ruby-keyword kw">end</span>
+1941:
+1942: <span class="ruby-comment cmt"># Check of indirect followers.</span>
+1943: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">targets</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">list</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>
+1944: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -4265,11 +4385,11 @@
</div>
<div id="turnover-method" class="method-detail ">
- <a name="M001401"></a>
+ <a name="method-i-turnover"></a>
<div class="method-heading">
<span class="method-name">turnover</span><span
class="method-args">(startIdx, endIdx, account, resource = nil)</span>
@@ -4292,62 +4412,62 @@
<div class="method-source-code"
id="turnover-source">
<pre>
- <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1916</span>
-1916: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">account</span>, <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>)
-1917: <span class="ruby-identifier">amount</span> = <span class="ruby-value">0.0</span>
-1918: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
-1919: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span>
-1920: <span class="ruby-identifier">amount</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">child</span>.<span class="ruby-identifier">turnover</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">account</span>,
-1921: <span class="ruby-identifier">resource</span>)
-1922: <span class="ruby-keyword kw">end</span>
-1923: <span class="ruby-keyword kw">end</span>
-1924:
-1925: <span class="ruby-comment cmt"># If there are no chargeset defined for this task, we don't need to</span>
-1926: <span class="ruby-comment cmt"># compute the resource related or other cost.</span>
-1927: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'chargeset'</span>).<span class="ruby-identifier">empty?</span>
-1928: <span class="ruby-identifier">resourceCost</span> = <span class="ruby-value">0.0</span>
-1929: <span class="ruby-identifier">otherCost</span> = <span class="ruby-value">0.0</span>
-1930:
-1931: <span class="ruby-comment cmt"># Container tasks don't have resource cost.</span>
-1932: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
-1933: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>
-1934: <span class="ruby-identifier">resourceCost</span> = <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">cost</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
-1935: <span class="ruby-ivar">@property</span>)
-1936: <span class="ruby-keyword kw">else</span>
-1937: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
-1938: <span class="ruby-identifier">resourceCost</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">cost</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-ivar">@property</span>)
-1939: <span class="ruby-keyword kw">end</span>
-1940: <span class="ruby-keyword kw">end</span>
-1941: <span class="ruby-keyword kw">end</span>
-1942:
-1943: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'charge'</span>).<span class="ruby-identifier">empty?</span>
-1944: <span class="ruby-comment cmt"># Add one-time and periodic charges to the amount.</span>
-1945: <span class="ruby-identifier">startDate</span> = <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">startIdx</span> <span class="ruby-operator">:</span>
-1946: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">startIdx</span>)
-1947: <span class="ruby-identifier">endDate</span> = <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">endIdx</span> <span class="ruby-operator">:</span>
-1948: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">endIdx</span>)
-1949: <span class="ruby-identifier">iv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">startDate</span>, <span class="ruby-identifier">endDate</span>)
-1950: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'charge'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">charge</span><span class="ruby-operator">|</span>
-1951: <span class="ruby-identifier">otherCost</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">charge</span>.<span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">iv</span>)
-1952: <span class="ruby-keyword kw">end</span>
-1953: <span class="ruby-keyword kw">end</span>
-1954:
-1955: <span class="ruby-identifier">totalCost</span> = <span class="ruby-identifier">resourceCost</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">otherCost</span>
-1956: <span class="ruby-comment cmt"># Now weight the total cost by the share of the account</span>
-1957: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'chargeset'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">set</span><span class="ruby-operator">|</span>
-1958: <span class="ruby-identifier">set</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">accnt</span>, <span class="ruby-identifier">share</span><span class="ruby-operator">|</span>
-1959: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">share</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">accnt</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">account</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">accnt</span>.<span class="ruby-identifier">isChildOf?</span>(<span class="ruby-identifier">account</span>))
-1960: <span class="ruby-identifier">amount</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">totalCost</span> * <span class="ruby-identifier">share</span>
-1961: <span class="ruby-keyword kw">end</span>
-1962: <span class="ruby-keyword kw">end</span>
-1963: <span class="ruby-keyword kw">end</span>
-1964: <span class="ruby-keyword kw">end</span>
+ <span class="ruby-comment cmt"># File lib/TaskScenario.rb, line 1951</span>
+1951: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">account</span>, <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>)
+1952: <span class="ruby-identifier">amount</span> = <span class="ruby-value">0.0</span>
+1953: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
+1954: <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span>
+1955: <span class="ruby-identifier">amount</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">child</span>.<span class="ruby-identifier">turnover</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">account</span>,
+1956: <span class="ruby-identifier">resource</span>)
+1957: <span class="ruby-keyword kw">end</span>
+1958: <span class="ruby-keyword kw">end</span>
+1959:
+1960: <span class="ruby-comment cmt"># If there are no chargeset defined for this task, we don't need to</span>
+1961: <span class="ruby-comment cmt"># compute the resource related or other cost.</span>
+1962: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'chargeset'</span>).<span class="ruby-identifier">empty?</span>
+1963: <span class="ruby-identifier">resourceCost</span> = <span class="ruby-value">0.0</span>
+1964: <span class="ruby-identifier">otherCost</span> = <span class="ruby-value">0.0</span>
1965:
-1966: <span class="ruby-identifier">amount</span>
-1967: <span class="ruby-keyword kw">end</span></pre>
+1966: <span class="ruby-comment cmt"># Container tasks don't have resource cost.</span>
+1967: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
+1968: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>
+1969: <span class="ruby-identifier">resourceCost</span> = <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">cost</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
+1970: <span class="ruby-ivar">@property</span>)
+1971: <span class="ruby-keyword kw">else</span>
+1972: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'assignedresources'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
+1973: <span class="ruby-identifier">resourceCost</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">cost</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-ivar">@property</span>)
+1974: <span class="ruby-keyword kw">end</span>
+1975: <span class="ruby-keyword kw">end</span>
+1976: <span class="ruby-keyword kw">end</span>
+1977:
+1978: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'charge'</span>).<span class="ruby-identifier">empty?</span>
+1979: <span class="ruby-comment cmt"># Add one-time and periodic charges to the amount.</span>
+1980: <span class="ruby-identifier">startDate</span> = <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">startIdx</span> <span class="ruby-operator">:</span>
+1981: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">startIdx</span>)
+1982: <span class="ruby-identifier">endDate</span> = <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">endIdx</span> <span class="ruby-operator">:</span>
+1983: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">endIdx</span>)
+1984: <span class="ruby-identifier">iv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">startDate</span>, <span class="ruby-identifier">endDate</span>)
+1985: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'charge'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">charge</span><span class="ruby-operator">|</span>
+1986: <span class="ruby-identifier">otherCost</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">charge</span>.<span class="ruby-identifier">turnover</span>(<span class="ruby-identifier">iv</span>)
+1987: <span class="ruby-keyword kw">end</span>
+1988: <span class="ruby-keyword kw">end</span>
+1989:
+1990: <span class="ruby-identifier">totalCost</span> = <span class="ruby-identifier">resourceCost</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">otherCost</span>
+1991: <span class="ruby-comment cmt"># Now weight the total cost by the share of the account</span>
+1992: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'chargeset'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">set</span><span class="ruby-operator">|</span>
+1993: <span class="ruby-identifier">set</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">accnt</span>, <span class="ruby-identifier">share</span><span class="ruby-operator">|</span>
+1994: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">share</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">accnt</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">account</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">accnt</span>.<span class="ruby-identifier">isChildOf?</span>(<span class="ruby-identifier">account</span>))
+1995: <span class="ruby-identifier">amount</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">totalCost</span> * <span class="ruby-identifier">share</span>
+1996: <span class="ruby-keyword kw">end</span>
+1997: <span class="ruby-keyword kw">end</span>
+1998: <span class="ruby-keyword kw">end</span>
+1999: <span class="ruby-keyword kw">end</span>
+2000:
+2001: <span class="ruby-identifier">amount</span>
+2002: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>