taskjuggler 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +1144 -2047
- data/README +1 -1
- data/Rakefile +6 -6
- data/data/css/tjmanual.css +20 -0
- data/data/css/tjreport.css +7 -6
- data/doc/AppConfig.html +136 -130
- data/doc/Arguments.html +46 -40
- data/doc/CHANGELOG.html +1162 -2057
- data/doc/COPYING.html +8 -2
- data/doc/Object.html +205 -199
- data/doc/README.html +9 -3
- data/doc/RuntimeConfig.html +75 -69
- data/doc/String.html +69 -63
- data/doc/TaskJuggler.html +350 -291
- data/doc/TaskJuggler/Account.html +26 -20
- data/doc/TaskJuggler/AccountAttribute.html +24 -18
- data/doc/TaskJuggler/AccountScenario.html +24 -18
- data/doc/TaskJuggler/Allocation.html +74 -68
- data/doc/TaskJuggler/AllocationAttribute.html +54 -48
- data/doc/TaskJuggler/AttributeBase.html +172 -93
- data/doc/TaskJuggler/AttributeDefinition.html +22 -16
- data/doc/TaskJuggler/AttributeOverwrite.html +586 -0
- data/doc/TaskJuggler/BatchProcessor.html +263 -257
- data/doc/TaskJuggler/Booking.html +44 -38
- data/doc/TaskJuggler/BookingListAttribute.html +25 -21
- data/doc/TaskJuggler/BooleanAttribute.html +24 -18
- data/doc/TaskJuggler/CSVFile.html +193 -187
- data/doc/TaskJuggler/CellSettingPattern.html +13 -7
- data/doc/TaskJuggler/CellSettingPatternList.html +25 -19
- data/doc/TaskJuggler/Charge.html +49 -43
- data/doc/TaskJuggler/ChargeListAttribute.html +21 -15
- data/doc/TaskJuggler/ChargeSet.html +94 -88
- data/doc/TaskJuggler/ChargeSetListAttribute.html +29 -25
- data/doc/TaskJuggler/CollisionDetector.html +142 -136
- data/doc/TaskJuggler/ColumnListAttribute.html +21 -17
- data/doc/TaskJuggler/ColumnTable.html +50 -44
- data/doc/TaskJuggler/Daemon.html +71 -50
- data/doc/TaskJuggler/DataCache.html +110 -58
- data/doc/TaskJuggler/DataCacheEntry.html +22 -16
- data/doc/TaskJuggler/DateAttribute.html +24 -18
- data/doc/TaskJuggler/DefinitionListAttribute.html +12 -6
- data/doc/TaskJuggler/DependencyListAttribute.html +29 -25
- data/doc/TaskJuggler/DurationAttribute.html +25 -19
- data/doc/TaskJuggler/FileList.html +25 -19
- data/doc/TaskJuggler/FileRecord.html +17 -11
- data/doc/TaskJuggler/FixnumAttribute.html +16 -10
- data/doc/TaskJuggler/FlagListAttribute.html +25 -21
- data/doc/TaskJuggler/FloatAttribute.html +20 -14
- data/doc/TaskJuggler/FormatListAttribute.html +17 -11
- data/doc/TaskJuggler/GanttChart.html +242 -236
- data/doc/TaskJuggler/GanttContainer.html +71 -67
- data/doc/TaskJuggler/GanttHeader.html +113 -107
- data/doc/TaskJuggler/GanttHeaderScaleItem.html +26 -20
- data/doc/TaskJuggler/GanttLine.html +217 -210
- data/doc/TaskJuggler/GanttLoadStack.html +89 -83
- data/doc/TaskJuggler/GanttMilestone.html +11 -6
- data/doc/TaskJuggler/GanttRouter.html +194 -186
- data/doc/TaskJuggler/GanttTaskBar.html +41 -34
- data/doc/TaskJuggler/HTMLDocument.html +52 -46
- data/doc/TaskJuggler/HTMLGraphics.html +58 -52
- data/doc/TaskJuggler/Interval.html +90 -84
- data/doc/TaskJuggler/IntervalList.html +777 -0
- data/doc/TaskJuggler/IntervalListAttribute.html +29 -25
- data/doc/TaskJuggler/JobInfo.html +36 -30
- data/doc/TaskJuggler/Journal.html +188 -177
- data/doc/TaskJuggler/JournalEntry.html +36 -30
- data/doc/TaskJuggler/JournalEntryList.html +88 -82
- data/doc/TaskJuggler/KeywordArray.html +12 -6
- data/doc/TaskJuggler/KeywordDocumentation.html +512 -503
- data/doc/TaskJuggler/Limits.html +111 -105
- data/doc/TaskJuggler/Limits/Limit.html +71 -65
- data/doc/TaskJuggler/LimitsAttribute.html +21 -15
- data/doc/TaskJuggler/ListAttributeBase.html +16 -10
- data/doc/TaskJuggler/Log.html +111 -105
- data/doc/TaskJuggler/LogFile.html +54 -48
- data/doc/TaskJuggler/LogicalAttribute.html +35 -29
- data/doc/TaskJuggler/LogicalExpression.html +32 -26
- data/doc/TaskJuggler/LogicalExpressionAttribute.html +16 -10
- data/doc/TaskJuggler/LogicalExpressionListAttribute.html +671 -0
- data/doc/TaskJuggler/LogicalFlag.html +24 -18
- data/doc/TaskJuggler/LogicalFunction.html +164 -158
- data/doc/TaskJuggler/LogicalOperation.html +138 -132
- data/doc/TaskJuggler/Macro.html +14 -8
- data/doc/TaskJuggler/MacroTable.html +42 -36
- data/doc/TaskJuggler/ManagerResponsibilities.html +19 -13
- data/doc/TaskJuggler/ManagerStatusRecord.html +23 -17
- data/doc/TaskJuggler/Message.html +56 -50
- data/doc/TaskJuggler/MessageHandler.html +73 -67
- data/doc/TaskJuggler/Navigator.html +92 -86
- data/doc/TaskJuggler/NavigatorElement.html +88 -82
- data/doc/TaskJuggler/NikuProject.html +15 -9
- data/doc/TaskJuggler/NikuReport.html +405 -370
- data/doc/TaskJuggler/NikuResource.html +13 -7
- data/doc/TaskJuggler/NodeListAttribute.html +13 -9
- data/doc/TaskJuggler/PlaceHolderCell.html +22 -16
- data/doc/TaskJuggler/ProcessIntercom.html +116 -110
- data/doc/TaskJuggler/ProcessIntercomIface.html +39 -33
- data/doc/TaskJuggler/Project.html +1064 -895
- data/doc/TaskJuggler/ProjectBroker.html +439 -366
- data/doc/TaskJuggler/ProjectBrokerIface.html +63 -53
- data/doc/TaskJuggler/ProjectFileParser.html +329 -319
- data/doc/TaskJuggler/ProjectFileScanner.html +351 -345
- data/doc/TaskJuggler/ProjectRecord.html +66 -60
- data/doc/TaskJuggler/ProjectServer.html +287 -280
- data/doc/TaskJuggler/ProjectServerIface.html +43 -37
- data/doc/TaskJuggler/PropertyAttribute.html +16 -10
- data/doc/TaskJuggler/PropertyList.html +205 -199
- data/doc/TaskJuggler/PropertySet.html +264 -296
- data/doc/TaskJuggler/PropertyTreeNode.html +455 -505
- data/doc/TaskJuggler/Query.html +309 -524
- data/doc/TaskJuggler/RTFHandlers.html +17 -11
- data/doc/TaskJuggler/RTFNavigator.html +33 -27
- data/doc/TaskJuggler/RTFQuery.html +135 -129
- data/doc/TaskJuggler/RTFReport.html +63 -57
- data/doc/TaskJuggler/RTFReportLink.html +55 -49
- data/doc/TaskJuggler/RTFWithQuerySupport.html +17 -11
- data/doc/TaskJuggler/RealFormat.html +64 -58
- data/doc/TaskJuggler/RealFormatAttribute.html +12 -6
- data/doc/TaskJuggler/ReferenceAttribute.html +35 -29
- data/doc/TaskJuggler/Report.html +294 -249
- data/doc/TaskJuggler/ReportBase.html +229 -223
- data/doc/TaskJuggler/ReportContext.html +52 -46
- data/doc/TaskJuggler/ReportServer.html +143 -137
- data/doc/TaskJuggler/ReportServerIface.html +51 -43
- data/doc/TaskJuggler/ReportServerRecord.html +36 -30
- data/doc/TaskJuggler/ReportServlet.html +167 -140
- data/doc/TaskJuggler/ReportTable.html +137 -131
- data/doc/TaskJuggler/ReportTableCell.html +332 -292
- data/doc/TaskJuggler/ReportTableColumn.html +46 -40
- data/doc/TaskJuggler/ReportTableLegend.html +43 -38
- data/doc/TaskJuggler/ReportTableLine.html +66 -60
- data/doc/TaskJuggler/Resource.html +166 -160
- data/doc/TaskJuggler/ResourceListAttribute.html +54 -32
- data/doc/TaskJuggler/ResourceListRE.html +47 -41
- data/doc/TaskJuggler/ResourceScenario.html +671 -644
- data/doc/TaskJuggler/RichText.html +51 -45
- data/doc/TaskJuggler/RichTextAttribute.html +28 -22
- data/doc/TaskJuggler/RichTextDocument.html +96 -90
- data/doc/TaskJuggler/RichTextElement.html +503 -497
- data/doc/TaskJuggler/RichTextFunctionExample.html +41 -35
- data/doc/TaskJuggler/RichTextFunctionHandler.html +19 -13
- data/doc/TaskJuggler/RichTextImage.html +14 -8
- data/doc/TaskJuggler/RichTextIntermediate.html +86 -80
- data/doc/TaskJuggler/RichTextParser.html +59 -53
- data/doc/TaskJuggler/RichTextScanner.html +184 -178
- data/doc/TaskJuggler/RichTextSnip.html +69 -63
- data/doc/TaskJuggler/RichTextSyntaxRules.html +416 -410
- data/doc/TaskJuggler/Scenario.html +13 -7
- data/doc/TaskJuggler/ScenarioData.html +40 -34
- data/doc/TaskJuggler/ScenarioListAttribute.html +21 -15
- data/doc/TaskJuggler/Scoreboard.html +129 -107
- data/doc/TaskJuggler/SheetHandlerBase.html +245 -239
- data/doc/TaskJuggler/SheetReceiver.html +333 -327
- data/doc/TaskJuggler/SheetSender.html +227 -221
- data/doc/TaskJuggler/Shift.html +26 -20
- data/doc/TaskJuggler/ShiftAssignment.html +45 -39
- data/doc/TaskJuggler/ShiftAssignments.html +178 -172
- data/doc/TaskJuggler/ShiftAssignmentsAttribute.html +21 -15
- data/doc/TaskJuggler/ShiftScenario.html +29 -23
- data/doc/TaskJuggler/SimpleQueryExpander.html +36 -30
- data/doc/TaskJuggler/SortListAttribute.html +17 -13
- data/doc/TaskJuggler/SourceFileInfo.html +19 -13
- data/doc/TaskJuggler/StatusSheetReceiver.html +31 -25
- data/doc/TaskJuggler/StatusSheetReport.html +166 -159
- data/doc/TaskJuggler/StatusSheetSender.html +80 -74
- data/doc/TaskJuggler/StringAttribute.html +20 -14
- data/doc/TaskJuggler/SymbolAttribute.html +16 -10
- data/doc/TaskJuggler/SyntaxReference.html +231 -225
- data/doc/TaskJuggler/TOCEntry.html +46 -40
- data/doc/TaskJuggler/TSResourceRecord.html +15 -9
- data/doc/TaskJuggler/TSTaskRecord.html +16 -10
- data/doc/TaskJuggler/TableColumnDefinition.html +84 -39
- data/doc/TaskJuggler/TableOfContents.html +28 -22
- data/doc/TaskJuggler/TableReport.html +906 -866
- data/doc/TaskJuggler/Task.html +99 -93
- data/doc/TaskJuggler/TaskDependency.html +24 -18
- data/doc/TaskJuggler/TaskListAttribute.html +29 -25
- data/doc/TaskJuggler/TaskListRE.html +46 -39
- data/doc/TaskJuggler/TaskScenario.html +2218 -1965
- data/doc/TaskJuggler/TextFormatter.html +154 -148
- data/doc/TaskJuggler/TextParser.html +362 -348
- data/doc/TaskJuggler/TextParser/Pattern.html +313 -307
- data/doc/TaskJuggler/TextParser/Rule.html +147 -141
- data/doc/TaskJuggler/TextParser/StackElement.html +58 -52
- data/doc/TaskJuggler/TextParser/State.html +88 -82
- data/doc/TaskJuggler/TextParser/StateTransition.html +42 -36
- data/doc/TaskJuggler/TextParser/TextParserResultArray.html +20 -14
- data/doc/TaskJuggler/TextParser/TokenDoc.html +19 -13
- data/doc/TaskJuggler/TextReport.html +80 -74
- data/doc/TaskJuggler/TextScanner.html +284 -272
- data/doc/TaskJuggler/TextScanner/BufferStreamHandle.html +14 -8
- data/doc/TaskJuggler/TextScanner/FileStreamHandle.html +21 -15
- data/doc/TaskJuggler/TextScanner/MacroStackEntry.html +15 -9
- data/doc/TaskJuggler/TextScanner/StreamHandle.html +102 -96
- data/doc/TaskJuggler/TimeSheet.html +123 -117
- data/doc/TaskJuggler/TimeSheetReceiver.html +28 -22
- data/doc/TaskJuggler/TimeSheetRecord.html +212 -206
- data/doc/TaskJuggler/TimeSheetReport.html +206 -199
- data/doc/TaskJuggler/TimeSheetSender.html +27 -21
- data/doc/TaskJuggler/TimeSheetSummary.html +140 -134
- data/doc/TaskJuggler/TimeSheets.html +20 -14
- data/doc/TaskJuggler/Tj3AppBase.html +100 -94
- data/doc/TaskJuggler/Tj3Client.html +407 -483
- data/doc/TaskJuggler/Tj3Daemon.html +116 -107
- data/doc/TaskJuggler/Tj3SheetAppBase.html +45 -39
- data/doc/TaskJuggler/Tj3SsReceiver.html +31 -25
- data/doc/TaskJuggler/Tj3SsSender.html +64 -58
- data/doc/TaskJuggler/Tj3TsReceiver.html +31 -25
- data/doc/TaskJuggler/Tj3TsSender.html +51 -45
- data/doc/TaskJuggler/Tj3TsSummary.html +59 -53
- data/doc/TaskJuggler/TjException.html +13 -7
- data/doc/TaskJuggler/TjTime.html +444 -438
- data/doc/TaskJuggler/TjpExample.html +84 -78
- data/doc/TaskJuggler/TjpExportRE.html +356 -349
- data/doc/TaskJuggler/TjpSyntaxRules.html +4279 -4151
- data/doc/TaskJuggler/URLParameter.html +16 -10
- data/doc/TaskJuggler/UserManual.html +185 -179
- data/doc/TaskJuggler/VimSyntax.html +144 -138
- data/doc/TaskJuggler/WebServer.html +46 -39
- data/doc/TaskJuggler/WelcomePage.html +769 -0
- data/doc/TaskJuggler/WorkingHours.html +185 -179
- data/doc/TaskJuggler/WorkingHoursAttribute.html +42 -36
- data/doc/TaskJuggler/XMLBlob.html +21 -15
- data/doc/TaskJuggler/XMLComment.html +17 -11
- data/doc/TaskJuggler/XMLDocument.html +33 -27
- data/doc/TaskJuggler/XMLElement.html +97 -91
- data/doc/TaskJuggler/XMLNamedText.html +13 -7
- data/doc/TaskJuggler/XMLText.html +32 -26
- data/doc/index.html +601 -563
- data/doc/lib/AccountScenario_rb.html +5 -3
- data/doc/lib/Account_rb.html +5 -3
- data/doc/lib/Allocation_rb.html +5 -3
- data/doc/lib/AppConfig_rb.html +5 -3
- data/doc/lib/AttributeBase_rb.html +5 -3
- data/doc/lib/AttributeDefinition_rb.html +5 -3
- data/doc/lib/Attributes_rb.html +5 -3
- data/doc/lib/BatchProcessor_rb.html +5 -3
- data/doc/lib/Booking_rb.html +5 -3
- data/doc/lib/ChargeSet_rb.html +5 -3
- data/doc/lib/Charge_rb.html +5 -3
- data/doc/lib/DataCache_rb.html +5 -3
- data/doc/lib/FileList_rb.html +5 -3
- data/doc/lib/HTMLDocument_rb.html +5 -3
- data/doc/lib/IntervalList_rb.html +69 -0
- data/doc/lib/Interval_rb.html +5 -3
- data/doc/lib/Journal_rb.html +5 -3
- data/doc/lib/KeywordArray_rb.html +5 -3
- data/doc/lib/KeywordDocumentation_rb.html +5 -3
- data/doc/lib/Limits_rb.html +5 -3
- data/doc/lib/LogFile_rb.html +5 -3
- data/doc/lib/Log_rb.html +5 -3
- data/doc/lib/LogicalExpression_rb.html +5 -3
- data/doc/lib/LogicalFunction_rb.html +5 -3
- data/doc/lib/LogicalOperation_rb.html +5 -3
- data/doc/lib/MacroTable_rb.html +5 -3
- data/doc/lib/MessageHandler_rb.html +5 -3
- data/doc/lib/ProjectFileParser_rb.html +5 -3
- data/doc/lib/ProjectFileScanner_rb.html +5 -3
- data/doc/lib/Project_rb.html +5 -3
- data/doc/lib/PropertyList_rb.html +5 -3
- data/doc/lib/PropertySet_rb.html +5 -3
- data/doc/lib/PropertyTreeNode_rb.html +5 -3
- data/doc/lib/Query_rb.html +5 -3
- data/doc/lib/RTFHandlers_rb.html +5 -3
- data/doc/lib/RTFNavigator_rb.html +5 -3
- data/doc/lib/RTFQuery_rb.html +5 -3
- data/doc/lib/RTFReportLink_rb.html +5 -3
- data/doc/lib/RTFReport_rb.html +5 -3
- data/doc/lib/RTFWithQuerySupport_rb.html +5 -3
- data/doc/lib/RealFormat_rb.html +5 -3
- data/doc/lib/ResourceScenario_rb.html +5 -3
- data/doc/lib/Resource_rb.html +5 -3
- data/doc/lib/RichTextDocument_rb.html +5 -3
- data/doc/lib/RichTextElement_rb.html +5 -3
- data/doc/lib/RichTextFunctionExample_rb.html +5 -3
- data/doc/lib/RichTextFunctionHandler_rb.html +5 -3
- data/doc/lib/RichTextParser_rb.html +5 -3
- data/doc/lib/RichTextScanner_rb.html +5 -3
- data/doc/lib/RichTextSnip_rb.html +5 -3
- data/doc/lib/RichTextSyntaxRules_rb.html +5 -3
- data/doc/lib/RichText_rb.html +5 -3
- data/doc/lib/RuntimeConfig_rb.html +5 -3
- data/doc/lib/ScenarioData_rb.html +5 -3
- data/doc/lib/Scenario_rb.html +5 -3
- data/doc/lib/Scoreboard_rb.html +7 -3
- data/doc/lib/SheetHandlerBase_rb.html +5 -3
- data/doc/lib/SheetReceiver_rb.html +5 -3
- data/doc/lib/SheetSender_rb.html +5 -3
- data/doc/lib/ShiftAssignments_rb.html +5 -3
- data/doc/lib/ShiftScenario_rb.html +5 -3
- data/doc/lib/Shift_rb.html +5 -3
- data/doc/lib/SimpleQueryExpander_rb.html +5 -3
- data/doc/lib/SourceFileInfo_rb.html +5 -3
- data/doc/lib/StatusSheetReceiver_rb.html +5 -3
- data/doc/lib/StatusSheetSender_rb.html +5 -3
- data/doc/lib/SyntaxReference_rb.html +5 -3
- data/doc/lib/TOCEntry_rb.html +5 -3
- data/doc/lib/TableColumnDefinition_rb.html +5 -3
- data/doc/lib/TableOfContents_rb.html +5 -3
- data/doc/lib/TaskDependency_rb.html +5 -3
- data/doc/lib/TaskJuggler_rb.html +5 -3
- data/doc/lib/TaskScenario_rb.html +5 -3
- data/doc/lib/Task_rb.html +5 -3
- data/doc/lib/TextFormatter_rb.html +6 -4
- data/doc/lib/TextParser/Pattern_rb.html +5 -3
- data/doc/lib/TextParser/Rule_rb.html +5 -3
- data/doc/lib/TextParser/StackElement_rb.html +5 -3
- data/doc/lib/TextParser/State_rb.html +6 -4
- data/doc/lib/TextParser/TokenDoc_rb.html +5 -3
- data/doc/lib/TextParser_rb.html +5 -3
- data/doc/lib/TextScanner_rb.html +5 -3
- data/doc/lib/TimeSheetReceiver_rb.html +5 -3
- data/doc/lib/TimeSheetSender_rb.html +5 -3
- data/doc/lib/TimeSheetSummary_rb.html +6 -4
- data/doc/lib/TimeSheets_rb.html +5 -3
- data/doc/lib/Tj3AppBase_rb.html +5 -3
- data/doc/lib/Tj3Config_rb.html +5 -3
- data/doc/lib/Tj3SheetAppBase_rb.html +5 -3
- data/doc/lib/TjException_rb.html +5 -3
- data/doc/lib/TjTime_rb.html +5 -3
- data/doc/lib/TjpExample_rb.html +5 -3
- data/doc/lib/TjpSyntaxRules_rb.html +5 -3
- data/doc/lib/URLParameter_rb.html +5 -3
- data/doc/lib/UTF8String_rb.html +5 -3
- data/doc/lib/UserManual_rb.html +5 -3
- data/doc/lib/VimSyntax_rb.html +6 -4
- data/doc/lib/WorkingHours_rb.html +5 -3
- data/doc/lib/XMLDocument_rb.html +5 -3
- data/doc/lib/XMLElement_rb.html +5 -3
- data/doc/lib/daemon/Daemon_rb.html +5 -3
- data/doc/lib/daemon/ProcessIntercom_rb.html +7 -3
- data/doc/lib/daemon/ProjectBroker_rb.html +5 -3
- data/doc/lib/daemon/ProjectServer_rb.html +5 -3
- data/doc/lib/daemon/ReportServer_rb.html +5 -3
- data/doc/lib/daemon/ReportServlet_rb.html +69 -0
- data/doc/lib/daemon/WebServer_rb.html +9 -3
- data/doc/lib/daemon/WelcomePage_rb.html +71 -0
- data/doc/lib/deep_copy_rb.html +5 -3
- data/doc/lib/reports/CSVFile_rb.html +5 -3
- data/doc/lib/reports/CollisionDetector_rb.html +5 -3
- data/doc/lib/reports/ColumnTable_rb.html +5 -3
- data/doc/lib/reports/GanttChart_rb.html +5 -3
- data/doc/lib/reports/GanttContainer_rb.html +5 -3
- data/doc/lib/reports/GanttHeaderScaleItem_rb.html +5 -3
- data/doc/lib/reports/GanttHeader_rb.html +5 -3
- data/doc/lib/reports/GanttLine_rb.html +5 -3
- data/doc/lib/reports/GanttLoadStack_rb.html +5 -3
- data/doc/lib/reports/GanttMilestone_rb.html +5 -3
- data/doc/lib/reports/GanttRouter_rb.html +5 -3
- data/doc/lib/reports/GanttTaskBar_rb.html +5 -3
- data/doc/lib/reports/HTMLGraphics_rb.html +5 -3
- data/doc/lib/reports/Navigator_rb.html +5 -3
- data/doc/lib/reports/NikuReport_rb.html +5 -3
- data/doc/lib/reports/ReportBase_rb.html +5 -3
- data/doc/lib/reports/ReportContext_rb.html +5 -3
- data/doc/lib/reports/ReportTableCell_rb.html +5 -3
- data/doc/lib/reports/ReportTableColumn_rb.html +5 -3
- data/doc/lib/reports/ReportTableLegend_rb.html +5 -3
- data/doc/lib/reports/ReportTableLine_rb.html +5 -3
- data/doc/lib/reports/ReportTable_rb.html +5 -3
- data/doc/lib/reports/Report_rb.html +5 -3
- data/doc/lib/reports/ResourceListRE_rb.html +5 -3
- data/doc/lib/reports/StatusSheetReport_rb.html +5 -3
- data/doc/lib/reports/TableReport_rb.html +5 -3
- data/doc/lib/reports/TaskListRE_rb.html +5 -3
- data/doc/lib/reports/TextReport_rb.html +5 -3
- data/doc/lib/reports/TimeSheetReport_rb.html +5 -3
- data/doc/lib/reports/TjpExportRE_rb.html +5 -3
- data/doc/lib/{taskjuggler3_rb.html → tj3_rb.html} +7 -5
- data/doc/lib/tj3client_rb.html +5 -3
- data/doc/lib/tj3d_rb.html +6 -4
- data/doc/lib/tj3man_rb.html +5 -3
- data/doc/lib/tj3ss_receiver_rb.html +5 -3
- data/doc/lib/tj3ss_sender_rb.html +5 -3
- data/doc/lib/tj3ts_receiver_rb.html +5 -3
- data/doc/lib/tj3ts_sender_rb.html +5 -3
- data/doc/lib/tj3ts_summary_rb.html +5 -3
- data/examples/tutorial.tjp +13 -5
- data/gem_spec.rb +3 -0
- data/lib/Account.rb +2 -1
- data/lib/AccountScenario.rb +2 -1
- data/lib/Allocation.rb +2 -1
- data/lib/AppConfig.rb +2 -1
- data/lib/AttributeBase.rb +19 -5
- data/lib/AttributeDefinition.rb +2 -1
- data/lib/Attributes.rb +49 -38
- data/lib/BatchProcessor.rb +2 -1
- data/lib/Booking.rb +2 -1
- data/lib/Charge.rb +2 -1
- data/lib/ChargeSet.rb +2 -1
- data/lib/DataCache.rb +15 -1
- data/lib/FileList.rb +2 -1
- data/lib/HTMLDocument.rb +2 -1
- data/lib/Interval.rb +2 -1
- data/lib/IntervalList.rb +100 -0
- data/lib/Journal.rb +8 -2
- data/lib/KeywordArray.rb +2 -1
- data/lib/KeywordDocumentation.rb +10 -6
- data/lib/Limits.rb +2 -1
- data/lib/Log.rb +3 -2
- data/lib/LogFile.rb +2 -1
- data/lib/LogicalExpression.rb +2 -1
- data/lib/LogicalFunction.rb +2 -1
- data/lib/LogicalOperation.rb +2 -1
- data/lib/MacroTable.rb +2 -1
- data/lib/MessageHandler.rb +2 -1
- data/lib/Project.rb +92 -25
- data/lib/ProjectFileParser.rb +7 -2
- data/lib/ProjectFileScanner.rb +2 -1
- data/lib/PropertyList.rb +2 -1
- data/lib/PropertySet.rb +2 -6
- data/lib/PropertyTreeNode.rb +22 -44
- data/lib/Query.rb +32 -13
- data/lib/RTFHandlers.rb +2 -1
- data/lib/RTFNavigator.rb +2 -1
- data/lib/RTFQuery.rb +3 -2
- data/lib/RTFReport.rb +2 -1
- data/lib/RTFReportLink.rb +2 -1
- data/lib/RTFWithQuerySupport.rb +2 -1
- data/lib/RealFormat.rb +2 -1
- data/lib/Resource.rb +2 -1
- data/lib/ResourceScenario.rb +35 -14
- data/lib/RichText.rb +2 -1
- data/lib/RichTextDocument.rb +2 -1
- data/lib/RichTextElement.rb +2 -1
- data/lib/RichTextFunctionExample.rb +2 -1
- data/lib/RichTextFunctionHandler.rb +2 -1
- data/lib/RichTextParser.rb +2 -1
- data/lib/RichTextScanner.rb +2 -1
- data/lib/RichTextSnip.rb +2 -1
- data/lib/RichTextSyntaxRules.rb +2 -1
- data/lib/RuntimeConfig.rb +2 -1
- data/lib/Scenario.rb +2 -1
- data/lib/ScenarioData.rb +2 -1
- data/lib/Scoreboard.rb +27 -8
- data/lib/SheetHandlerBase.rb +2 -1
- data/lib/SheetReceiver.rb +2 -1
- data/lib/SheetSender.rb +2 -1
- data/lib/Shift.rb +2 -1
- data/lib/ShiftAssignments.rb +2 -1
- data/lib/ShiftScenario.rb +2 -1
- data/lib/SimpleQueryExpander.rb +2 -1
- data/lib/SourceFileInfo.rb +2 -1
- data/lib/StatusSheetReceiver.rb +2 -1
- data/lib/StatusSheetSender.rb +2 -1
- data/lib/SyntaxReference.rb +2 -1
- data/lib/TOCEntry.rb +2 -1
- data/lib/TableColumnDefinition.rb +9 -2
- data/lib/TableOfContents.rb +2 -1
- data/lib/Task.rb +2 -1
- data/lib/TaskDependency.rb +2 -1
- data/lib/TaskJuggler.rb +8 -6
- data/lib/TaskScenario.rb +337 -153
- data/lib/TextFormatter.rb +3 -2
- data/lib/TextParser.rb +7 -2
- data/lib/TextParser/Pattern.rb +2 -1
- data/lib/TextParser/Rule.rb +2 -1
- data/lib/TextParser/StackElement.rb +2 -1
- data/lib/TextParser/State.rb +3 -2
- data/lib/TextParser/TokenDoc.rb +2 -1
- data/lib/TextScanner.rb +12 -5
- data/lib/TimeSheetReceiver.rb +2 -1
- data/lib/TimeSheetSender.rb +2 -1
- data/lib/TimeSheetSummary.rb +3 -2
- data/lib/TimeSheets.rb +2 -1
- data/lib/Tj3AppBase.rb +6 -5
- data/lib/Tj3Config.rb +5 -4
- data/lib/Tj3SheetAppBase.rb +2 -1
- data/lib/TjException.rb +2 -1
- data/lib/TjTime.rb +2 -1
- data/lib/TjpExample.rb +2 -1
- data/lib/TjpSyntaxRules.rb +264 -65
- data/lib/URLParameter.rb +2 -1
- data/lib/UTF8String.rb +2 -1
- data/lib/UserManual.rb +2 -1
- data/lib/VimSyntax.rb +3 -2
- data/lib/WorkingHours.rb +2 -1
- data/lib/XMLDocument.rb +2 -1
- data/lib/XMLElement.rb +2 -1
- data/lib/daemon/Daemon.rb +3 -1
- data/lib/daemon/ProcessIntercom.rb +3 -1
- data/lib/daemon/ProjectBroker.rb +84 -32
- data/lib/daemon/ProjectServer.rb +5 -3
- data/lib/daemon/ReportServer.rb +8 -5
- data/lib/daemon/ReportServlet.rb +166 -0
- data/lib/daemon/WebServer.rb +6 -150
- data/lib/daemon/WelcomePage.rb +80 -0
- data/lib/deep_copy.rb +2 -1
- data/lib/reports/CSVFile.rb +2 -1
- data/lib/reports/CollisionDetector.rb +2 -1
- data/lib/reports/ColumnTable.rb +2 -1
- data/lib/reports/GanttChart.rb +2 -1
- data/lib/reports/GanttContainer.rb +3 -4
- data/lib/reports/GanttHeader.rb +2 -1
- data/lib/reports/GanttHeaderScaleItem.rb +2 -1
- data/lib/reports/GanttLine.rb +12 -10
- data/lib/reports/GanttLoadStack.rb +2 -1
- data/lib/reports/GanttMilestone.rb +3 -3
- data/lib/reports/GanttRouter.rb +4 -1
- data/lib/reports/GanttTaskBar.rb +9 -7
- data/lib/reports/HTMLGraphics.rb +2 -1
- data/lib/reports/Navigator.rb +2 -1
- data/lib/reports/NikuReport.rb +79 -49
- data/lib/reports/Report.rb +42 -10
- data/lib/reports/ReportBase.rb +2 -1
- data/lib/reports/ReportContext.rb +2 -1
- data/lib/reports/ReportTable.rb +2 -1
- data/lib/reports/ReportTableCell.rb +63 -28
- data/lib/reports/ReportTableColumn.rb +2 -1
- data/lib/reports/ReportTableLegend.rb +5 -5
- data/lib/reports/ReportTableLine.rb +2 -1
- data/lib/reports/ResourceListRE.rb +2 -1
- data/lib/reports/StatusSheetReport.rb +4 -2
- data/lib/reports/TableReport.rb +42 -38
- data/lib/reports/TaskListRE.rb +4 -2
- data/lib/reports/TextReport.rb +2 -1
- data/lib/reports/TimeSheetReport.rb +4 -2
- data/lib/reports/TjpExportRE.rb +4 -2
- data/lib/{taskjuggler3.rb → tj3.rb} +6 -5
- data/lib/tj3client.rb +19 -36
- data/lib/tj3d.rb +6 -2
- data/lib/tj3man.rb +4 -3
- data/lib/tj3ss_receiver.rb +2 -1
- data/lib/tj3ss_sender.rb +2 -1
- data/lib/tj3ts_receiver.rb +2 -1
- data/lib/tj3ts_sender.rb +2 -1
- data/lib/tj3ts_summary.rb +2 -1
- data/manual/Day_To_Day_Juggling +36 -0
- data/manual/How_To_Contribute +9 -4
- data/manual/Installation +10 -3
- data/manual/TaskJuggler_Internals +0 -2
- data/manual/Tutorial +25 -3
- data/prj_cfg.rb +4 -2
- data/spec/IntervalList_spec.rb +138 -0
- data/spec/ProjectBroker_spec.rb +133 -0
- data/tasks/changelog.rake +41 -24
- data/tasks/csts.rake +1 -0
- data/tasks/gem.rake +1 -0
- data/tasks/rcov.rake +1 -1
- data/tasks/spec.rake +7 -0
- data/tasks/test.rake +1 -0
- data/test/MessageChecker.rb +2 -1
- data/test/TestSuite/CSV-Reports/niku.tjp +70 -0
- data/test/TestSuite/CSV-Reports/{celltext-Reference.csv → refs/celltext.csv} +0 -0
- data/test/TestSuite/CSV-Reports/refs/niku.csv +5 -0
- data/test/TestSuite/CSV-Reports/{resourcereport-Reference.csv → refs/resourcereport.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{resourcereport_with_tasks-Reference.csv → refs/resourcereport_with_tasks.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortByTree-Reference.csv → refs/sortByTree.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortBy_duration.down-Reference.csv → refs/sortBy_duration.down.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortBy_effort.up-Reference.csv → refs/sortBy_effort.up.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortBy_plan.start.down-Reference.csv → refs/sortBy_plan.start.down.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{taskreport-Reference.csv → refs/taskreport.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{taskreport_with_resources-Reference.csv → refs/taskreport_with_resources.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{weekly-Reference.csv → refs/weekly.csv} +0 -0
- data/test/TestSuite/HTML-Reports/Alerts.tjp +12 -0
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -2
- data/test/TestSuite/Scheduler/Correct/Container-2.tjp +1 -2
- data/test/TestSuite/Scheduler/Correct/InheritedAttributes.tjp +77 -0
- data/test/TestSuite/Scheduler/Correct/WeakDeps.tjp +40 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_12.tjp +2 -2
- data/test/TestSuite/Scheduler/Errors/loop_detected_13.tjp +3 -4
- data/test/TestSuite/Scheduler/Errors/loop_detected_3.tjp +2 -2
- data/test/TestSuite/Scheduler/Errors/loop_detected_6.tjp +8 -7
- data/test/TestSuite/Scheduler/Errors/onend_wrong_direction.tjp +19 -0
- data/test/TestSuite/Scheduler/Errors/onstart_wrong_direction.tjp +18 -0
- data/test/TestSuite/Scheduler/Errors/task_depend_multi.tjp +1 -2
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/2002-03-02/boss_2002-03-02.tji +46 -0
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/2002-03-02/dev2_2002-03-02.tji +22 -0
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/2002-03-02/resources.yml +11 -0
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/acceptable_intervals +1 -0
- data/test/TestSuite/StatusSheets/sender.log +256 -0
- data/test/TestSuite/StatusSheets/statussheets.log +9 -0
- data/test/TestSuite/StatusSheets/tj3d.log +395 -0
- data/test/TestSuite/Syntax/Correct/Limits-1.tjp +2 -0
- data/test/TestSuite/Syntax/Correct/Niku.tjp +6 -1
- data/test/TestSuite/Syntax/Correct/Scenario.tjp +4 -1
- data/test/TestSuite/Syntax/Correct/Supplement.tjp +12 -5
- data/test/TestSuite/Syntax/Correct/TaskPrefix.tji +3 -0
- data/test/TestSuite/Syntax/Correct/TaskPrefix.tjp +24 -0
- data/test/TestSuite/Syntax/Correct/css/tjreport.css +7 -2
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +15 -5
- data/test/all.rb +2 -4
- data/test/test_BatchProcessor.rb +2 -1
- data/test/test_CSV-Reports.rb +34 -23
- data/test/test_CSVFile.rb +2 -1
- data/test/test_CollisionDetector.rb +3 -2
- data/test/test_Journal.rb +2 -1
- data/test/test_Limits.rb +2 -1
- data/test/test_LogicalExpression.rb +2 -1
- data/test/test_MacroTable.rb +2 -1
- data/test/test_Project.rb +3 -2
- data/test/test_ProjectFileScanner.rb +2 -1
- data/test/test_PropertySet.rb +2 -1
- data/test/test_Query.rb +2 -1
- data/test/test_RealFormat.rb +2 -1
- data/test/test_ReportGenerator.rb +2 -1
- data/test/test_RichText.rb +2 -1
- data/test/test_Scheduler.rb +2 -1
- data/test/test_ShiftAssignments.rb +2 -1
- data/test/test_SimpleQueryExpander.rb +2 -1
- data/test/test_Syntax.rb +2 -1
- data/test/test_TextFormatter.rb +3 -2
- data/test/test_TjTime.rb +2 -1
- data/test/test_TjpExample.rb +2 -1
- data/test/test_URLParameter.rb +2 -1
- data/test/test_UTF8String.rb +2 -1
- data/test/test_WorkingHours.rb +2 -1
- data/test/test_deep_copy.rb +2 -1
- metadata +74 -20
- data/doc/StringIO.html +0 -595
- data/test/TestSuite/Scheduler/Errors/loop_detected_7.tjp +0 -46
- data/test/TestSuite/Scheduler/Errors/loop_detected_8.tjp +0 -51
- data/test/TestSuite/Scheduler/Errors/multiple_durations.tjp +0 -11
|
@@ -129,6 +129,8 @@
|
|
|
129
129
|
|
|
130
130
|
<li><a href="../TaskJuggler/AttributeDefinition.html">TaskJuggler::AttributeDefinition</a></li>
|
|
131
131
|
|
|
132
|
+
<li><a href="../TaskJuggler/AttributeOverwrite.html">TaskJuggler::AttributeOverwrite</a></li>
|
|
133
|
+
|
|
132
134
|
<li><a href="../TaskJuggler/BatchProcessor.html">TaskJuggler::BatchProcessor</a></li>
|
|
133
135
|
|
|
134
136
|
<li><a href="../TaskJuggler/Booking.html">TaskJuggler::Booking</a></li>
|
|
@@ -207,6 +209,8 @@
|
|
|
207
209
|
|
|
208
210
|
<li><a href="../TaskJuggler/Interval.html">TaskJuggler::Interval</a></li>
|
|
209
211
|
|
|
212
|
+
<li><a href="../TaskJuggler/IntervalList.html">TaskJuggler::IntervalList</a></li>
|
|
213
|
+
|
|
210
214
|
<li><a href="../TaskJuggler/IntervalListAttribute.html">TaskJuggler::IntervalListAttribute</a></li>
|
|
211
215
|
|
|
212
216
|
<li><a href="../TaskJuggler/JobInfo.html">TaskJuggler::JobInfo</a></li>
|
|
@@ -239,6 +243,8 @@
|
|
|
239
243
|
|
|
240
244
|
<li><a href="../TaskJuggler/LogicalExpressionAttribute.html">TaskJuggler::LogicalExpressionAttribute</a></li>
|
|
241
245
|
|
|
246
|
+
<li><a href="../TaskJuggler/LogicalExpressionListAttribute.html">TaskJuggler::LogicalExpressionListAttribute</a></li>
|
|
247
|
+
|
|
242
248
|
<li><a href="../TaskJuggler/LogicalFlag.html">TaskJuggler::LogicalFlag</a></li>
|
|
243
249
|
|
|
244
250
|
<li><a href="../TaskJuggler/LogicalFunction.html">TaskJuggler::LogicalFunction</a></li>
|
|
@@ -519,6 +525,8 @@
|
|
|
519
525
|
|
|
520
526
|
<li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li>
|
|
521
527
|
|
|
528
|
+
<li><a href="../TaskJuggler/WelcomePage.html">TaskJuggler::WelcomePage</a></li>
|
|
529
|
+
|
|
522
530
|
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
|
|
523
531
|
|
|
524
532
|
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
|
|
@@ -545,8 +553,6 @@
|
|
|
545
553
|
|
|
546
554
|
<li><a href="../String.html">String</a></li>
|
|
547
555
|
|
|
548
|
-
<li><a href="../StringIO.html">StringIO</a></li>
|
|
549
|
-
|
|
550
556
|
</ul>
|
|
551
557
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
552
558
|
</div>
|
|
@@ -601,11 +607,11 @@ Create a new object and set some default values.
|
|
|
601
607
|
<div class="method-source-code"
|
|
602
608
|
id="new-source">
|
|
603
609
|
<pre>
|
|
604
|
-
<span class="ruby-comment cmt"># File lib/reports/ResourceListRE.rb, line
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
610
|
+
<span class="ruby-comment cmt"># File lib/reports/ResourceListRE.rb, line 27</span>
|
|
611
|
+
27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">report</span>)
|
|
612
|
+
28: <span class="ruby-keyword kw">super</span>
|
|
613
|
+
29: <span class="ruby-ivar">@table</span> = <span class="ruby-constant">ReportTable</span>.<span class="ruby-identifier">new</span>
|
|
614
|
+
30: <span class="ruby-keyword kw">end</span></pre>
|
|
609
615
|
</div>
|
|
610
616
|
|
|
611
617
|
</div>
|
|
@@ -644,40 +650,40 @@ Generate the table in the intermediate format.
|
|
|
644
650
|
<div class="method-source-code"
|
|
645
651
|
id="generate-ntermediate-ormat-source">
|
|
646
652
|
<pre>
|
|
647
|
-
<span class="ruby-comment cmt"># File lib/reports/ResourceListRE.rb, line
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
653
|
+
<span class="ruby-comment cmt"># File lib/reports/ResourceListRE.rb, line 33</span>
|
|
654
|
+
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateIntermediateFormat</span>
|
|
655
|
+
34: <span class="ruby-keyword kw">super</span>
|
|
656
|
+
35:
|
|
657
|
+
36: <span class="ruby-identifier">setReportPeriod</span>
|
|
658
|
+
37:
|
|
659
|
+
38: <span class="ruby-comment cmt"># Prepare the resource list.</span>
|
|
660
|
+
39: <span class="ruby-identifier">resourceList</span> = <span class="ruby-constant">PropertyList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">resources</span>)
|
|
661
|
+
40: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">setSorting</span>(<span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'sortResources'</span>))
|
|
662
|
+
41: <span class="ruby-identifier">resourceList</span> = <span class="ruby-identifier">filterResourceList</span>(<span class="ruby-identifier">resourceList</span>, <span class="ruby-keyword kw">nil</span>,
|
|
663
|
+
42: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'hideResource'</span>),
|
|
664
|
+
43: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'rollupResource'</span>),
|
|
665
|
+
44: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'openNodes'</span>))
|
|
666
|
+
45: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">query</span> = <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">reportContexts</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">query</span>
|
|
667
|
+
46: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">sort!</span>
|
|
668
|
+
47:
|
|
669
|
+
48: <span class="ruby-comment cmt"># Prepare the task list. Don't filter it yet! It would break the</span>
|
|
670
|
+
49: <span class="ruby-comment cmt"># *_() LogicalFunctions.</span>
|
|
671
|
+
50: <span class="ruby-identifier">taskList</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>)
|
|
672
|
+
51: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">setSorting</span>(<span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'sortTasks'</span>))
|
|
673
|
+
52: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">query</span> = <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">reportContexts</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">query</span>
|
|
674
|
+
53: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">sort!</span>
|
|
675
|
+
54:
|
|
676
|
+
55: <span class="ruby-identifier">adjustReportPeriod</span>(<span class="ruby-identifier">taskList</span>, <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'scenarios'</span>),
|
|
677
|
+
56: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'columns'</span>))
|
|
678
|
+
57:
|
|
679
|
+
58: <span class="ruby-comment cmt"># Generate the table header.</span>
|
|
680
|
+
59: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'columns'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">columnDescr</span><span class="ruby-operator">|</span>
|
|
681
|
+
60: <span class="ruby-identifier">generateHeaderCell</span>(<span class="ruby-identifier">columnDescr</span>)
|
|
682
|
+
61: <span class="ruby-keyword kw">end</span>
|
|
683
|
+
62:
|
|
684
|
+
63: <span class="ruby-comment cmt"># Generate the list.</span>
|
|
685
|
+
64: <span class="ruby-identifier">generateResourceList</span>(<span class="ruby-identifier">resourceList</span>, <span class="ruby-identifier">taskList</span>, <span class="ruby-keyword kw">nil</span>)
|
|
686
|
+
65: <span class="ruby-keyword kw">end</span></pre>
|
|
681
687
|
</div>
|
|
682
688
|
|
|
683
689
|
</div>
|
|
@@ -201,6 +201,8 @@
|
|
|
201
201
|
|
|
202
202
|
<li><a href="../TaskJuggler/AttributeDefinition.html">TaskJuggler::AttributeDefinition</a></li>
|
|
203
203
|
|
|
204
|
+
<li><a href="../TaskJuggler/AttributeOverwrite.html">TaskJuggler::AttributeOverwrite</a></li>
|
|
205
|
+
|
|
204
206
|
<li><a href="../TaskJuggler/BatchProcessor.html">TaskJuggler::BatchProcessor</a></li>
|
|
205
207
|
|
|
206
208
|
<li><a href="../TaskJuggler/Booking.html">TaskJuggler::Booking</a></li>
|
|
@@ -279,6 +281,8 @@
|
|
|
279
281
|
|
|
280
282
|
<li><a href="../TaskJuggler/Interval.html">TaskJuggler::Interval</a></li>
|
|
281
283
|
|
|
284
|
+
<li><a href="../TaskJuggler/IntervalList.html">TaskJuggler::IntervalList</a></li>
|
|
285
|
+
|
|
282
286
|
<li><a href="../TaskJuggler/IntervalListAttribute.html">TaskJuggler::IntervalListAttribute</a></li>
|
|
283
287
|
|
|
284
288
|
<li><a href="../TaskJuggler/JobInfo.html">TaskJuggler::JobInfo</a></li>
|
|
@@ -311,6 +315,8 @@
|
|
|
311
315
|
|
|
312
316
|
<li><a href="../TaskJuggler/LogicalExpressionAttribute.html">TaskJuggler::LogicalExpressionAttribute</a></li>
|
|
313
317
|
|
|
318
|
+
<li><a href="../TaskJuggler/LogicalExpressionListAttribute.html">TaskJuggler::LogicalExpressionListAttribute</a></li>
|
|
319
|
+
|
|
314
320
|
<li><a href="../TaskJuggler/LogicalFlag.html">TaskJuggler::LogicalFlag</a></li>
|
|
315
321
|
|
|
316
322
|
<li><a href="../TaskJuggler/LogicalFunction.html">TaskJuggler::LogicalFunction</a></li>
|
|
@@ -591,6 +597,8 @@
|
|
|
591
597
|
|
|
592
598
|
<li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li>
|
|
593
599
|
|
|
600
|
+
<li><a href="../TaskJuggler/WelcomePage.html">TaskJuggler::WelcomePage</a></li>
|
|
601
|
+
|
|
594
602
|
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
|
|
595
603
|
|
|
596
604
|
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
|
|
@@ -617,8 +625,6 @@
|
|
|
617
625
|
|
|
618
626
|
<li><a href="../String.html">String</a></li>
|
|
619
627
|
|
|
620
|
-
<li><a href="../StringIO.html">StringIO</a></li>
|
|
621
|
-
|
|
622
628
|
</ul>
|
|
623
629
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
624
630
|
</div>
|
|
@@ -666,38 +672,38 @@
|
|
|
666
672
|
<div class="method-source-code"
|
|
667
673
|
id="new-source">
|
|
668
674
|
<pre>
|
|
669
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
675
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 21</span>
|
|
676
|
+
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">resource</span>, <span class="ruby-identifier">scenarioIdx</span>, <span class="ruby-identifier">attributes</span>)
|
|
677
|
+
22: <span class="ruby-keyword kw">super</span>
|
|
678
|
+
23:
|
|
679
|
+
24: <span class="ruby-comment cmt"># Scoreboard may be nil, a Task, or a bit vector encoded as a Fixnum</span>
|
|
680
|
+
25: <span class="ruby-comment cmt"># nil: Value has not been determined yet.</span>
|
|
681
|
+
26: <span class="ruby-comment cmt"># Task: A reference to a Task object</span>
|
|
682
|
+
27: <span class="ruby-comment cmt"># Bit 0: Reserved</span>
|
|
683
|
+
28: <span class="ruby-comment cmt"># Bit 1: 0: Work time</span>
|
|
684
|
+
29: <span class="ruby-comment cmt"># 1: Off time</span>
|
|
685
|
+
30: <span class="ruby-comment cmt"># Bit 2 - 5: 0: No vacation or leave time</span>
|
|
686
|
+
31: <span class="ruby-comment cmt"># 1: Regular vacation</span>
|
|
687
|
+
32: <span class="ruby-comment cmt"># 2 - 15: Reserved</span>
|
|
688
|
+
33: <span class="ruby-comment cmt"># Bit 6: Reserved</span>
|
|
689
|
+
34: <span class="ruby-comment cmt"># Bit 7: 0: No global override</span>
|
|
690
|
+
35: <span class="ruby-comment cmt"># 1: Override global setting</span>
|
|
691
|
+
36: <span class="ruby-comment cmt"># The scoreboard is only created when needed to save memory for projects</span>
|
|
692
|
+
37: <span class="ruby-comment cmt"># which read-in the coporate employee database but only need a small</span>
|
|
693
|
+
38: <span class="ruby-comment cmt"># subset.</span>
|
|
694
|
+
39: <span class="ruby-ivar">@scoreboard</span> = <span class="ruby-keyword kw">nil</span>
|
|
695
|
+
40:
|
|
696
|
+
41: <span class="ruby-comment cmt"># The index of the earliest booked time slot.</span>
|
|
697
|
+
42: <span class="ruby-ivar">@firstBookedSlot</span> = <span class="ruby-keyword kw">nil</span>
|
|
698
|
+
43: <span class="ruby-comment cmt"># Same but for each assigned resource.</span>
|
|
699
|
+
44: <span class="ruby-ivar">@firstBookedSlots</span> = {}
|
|
700
|
+
45: <span class="ruby-comment cmt"># The index of the last booked time Slot.</span>
|
|
701
|
+
46: <span class="ruby-ivar">@lastBookedSlot</span> = <span class="ruby-keyword kw">nil</span>
|
|
702
|
+
47: <span class="ruby-comment cmt"># Same but for each assigned resource.</span>
|
|
703
|
+
48: <span class="ruby-ivar">@lastBookedSlots</span> = {}
|
|
704
|
+
49:
|
|
705
|
+
50: <span class="ruby-ivar">@dCache</span> = <span class="ruby-constant">DataCache</span>.<span class="ruby-identifier">instance</span>
|
|
706
|
+
51: <span class="ruby-keyword kw">end</span></pre>
|
|
701
707
|
</div>
|
|
702
708
|
|
|
703
709
|
</div>
|
|
@@ -738,18 +744,18 @@ If task is not nil only allocations to this tasks are respected.
|
|
|
738
744
|
<div class="method-source-code"
|
|
739
745
|
id="allocated--source">
|
|
740
746
|
<pre>
|
|
741
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
471:
|
|
745
|
-
472: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">iv</span>.<span class="ruby-identifier">start</span>, <span class="ruby-keyword kw">true</span>)
|
|
746
|
-
473: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">iv</span>.<span class="ruby-identifier">end</span>, <span class="ruby-keyword kw">true</span>)
|
|
747
|
-
474:
|
|
748
|
-
475: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span> = <span class="ruby-identifier">fitIndicies</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>)
|
|
749
|
-
476: <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">startIdx</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">endIdx</span>
|
|
747
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 475</span>
|
|
748
|
+
475: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">allocated?</span>(<span class="ruby-identifier">iv</span>, <span class="ruby-identifier">task</span> = <span class="ruby-keyword kw">nil</span>)
|
|
749
|
+
476: <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">task</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'duties'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">task</span>)
|
|
750
750
|
477:
|
|
751
|
-
478: <span class="ruby-
|
|
752
|
-
479:
|
|
751
|
+
478: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">iv</span>.<span class="ruby-identifier">start</span>, <span class="ruby-keyword kw">true</span>)
|
|
752
|
+
479: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">iv</span>.<span class="ruby-identifier">end</span>, <span class="ruby-keyword kw">true</span>)
|
|
753
|
+
480:
|
|
754
|
+
481: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span> = <span class="ruby-identifier">fitIndicies</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>)
|
|
755
|
+
482: <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">startIdx</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">endIdx</span>
|
|
756
|
+
483:
|
|
757
|
+
484: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">allocatedSub</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>)
|
|
758
|
+
485: <span class="ruby-keyword kw">end</span></pre>
|
|
753
759
|
</div>
|
|
754
760
|
|
|
755
761
|
</div>
|
|
@@ -783,15 +789,15 @@ Returns true if the resource is available at the time specified by
|
|
|
783
789
|
<div class="method-source-code"
|
|
784
790
|
id="available--source">
|
|
785
791
|
<pre>
|
|
786
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
792
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 172</span>
|
|
793
|
+
172: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">available?</span>(<span class="ruby-identifier">sbIdx</span>)
|
|
794
|
+
173: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">sbIdx</span>].<span class="ruby-identifier">nil?</span>
|
|
795
|
+
174:
|
|
796
|
+
175: <span class="ruby-identifier">limits</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'limits'</span>)
|
|
797
|
+
176: <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">limits</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">limits</span>.<span class="ruby-identifier">ok?</span>(<span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span>))
|
|
798
|
+
177:
|
|
799
|
+
178: <span class="ruby-keyword kw">true</span>
|
|
800
|
+
179: <span class="ruby-keyword kw">end</span></pre>
|
|
795
801
|
</div>
|
|
796
802
|
|
|
797
803
|
</div>
|
|
@@ -827,47 +833,47 @@ the slot was available.
|
|
|
827
833
|
<div class="method-source-code"
|
|
828
834
|
id="book-source">
|
|
829
835
|
<pre>
|
|
830
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
836
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 190</span>
|
|
837
|
+
190: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">book</span>(<span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">force</span> = <span class="ruby-keyword kw">false</span>)
|
|
838
|
+
191: <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">force</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">available?</span>(<span class="ruby-identifier">sbIdx</span>)
|
|
839
|
+
192:
|
|
840
|
+
193: <span class="ruby-comment cmt"># Make sure the task is in the list of duties.</span>
|
|
841
|
+
194: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duties'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">task</span>)
|
|
842
|
+
195: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'duties'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">task</span>
|
|
843
|
+
196: <span class="ruby-keyword kw">end</span>
|
|
844
|
+
197:
|
|
845
|
+
198: <span class="ruby-comment cmt">#puts "Booking resource #{@property.fullId} at " +</span>
|
|
846
|
+
199: <span class="ruby-comment cmt"># "#{@scoreboard.idxToDate(sbIdx)}/#{sbIdx} for task #{task.fullId}\n"</span>
|
|
847
|
+
200: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">sbIdx</span>] = <span class="ruby-identifier">task</span>
|
|
848
|
+
201: <span class="ruby-comment cmt"># Track the total allocated slots for this resource and all parent</span>
|
|
849
|
+
202: <span class="ruby-comment cmt"># resources.</span>
|
|
850
|
+
203: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@property</span>
|
|
851
|
+
204: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span>
|
|
852
|
+
205: <span class="ruby-identifier">t</span>[<span class="ruby-value str">'effort'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
853
|
+
206: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">parent</span>
|
|
854
|
+
207: <span class="ruby-keyword kw">end</span>
|
|
855
|
+
208: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'limits'</span>).<span class="ruby-identifier">inc</span>(<span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">sbIdx</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'limits'</span>)
|
|
856
|
+
209:
|
|
857
|
+
210: <span class="ruby-comment cmt"># Scoreboard iterations are fairly expensive but they are very frequent</span>
|
|
858
|
+
211: <span class="ruby-comment cmt"># operations in later processing. To limit the interations to the</span>
|
|
859
|
+
212: <span class="ruby-comment cmt"># relevant intervals, we store the interval for all bookings and for</span>
|
|
860
|
+
213: <span class="ruby-comment cmt"># each individual task.</span>
|
|
861
|
+
214: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@firstBookedSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@firstBookedSlot</span> <span class="ruby-operator">></span> <span class="ruby-identifier">sbIdx</span>
|
|
862
|
+
215: <span class="ruby-ivar">@firstBookedSlot</span> = <span class="ruby-identifier">sbIdx</span>
|
|
863
|
+
216: <span class="ruby-keyword kw">end</span>
|
|
864
|
+
217: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastBookedSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@lastBookedSlot</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">sbIdx</span>
|
|
865
|
+
218: <span class="ruby-ivar">@lastBookedSlot</span> = <span class="ruby-identifier">sbIdx</span>
|
|
866
|
+
219: <span class="ruby-keyword kw">end</span>
|
|
867
|
+
220: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>
|
|
868
|
+
221: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-operator">></span> <span class="ruby-identifier">sbIdx</span>
|
|
869
|
+
222: <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>] = <span class="ruby-identifier">sbIdx</span>
|
|
870
|
+
223: <span class="ruby-keyword kw">end</span>
|
|
871
|
+
224: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-operator"><</span> <span class="ruby-identifier">sbIdx</span>
|
|
872
|
+
225: <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>] = <span class="ruby-identifier">sbIdx</span>
|
|
873
|
+
226: <span class="ruby-keyword kw">end</span>
|
|
874
|
+
227: <span class="ruby-keyword kw">end</span>
|
|
875
|
+
228: <span class="ruby-keyword kw">true</span>
|
|
876
|
+
229: <span class="ruby-keyword kw">end</span></pre>
|
|
871
877
|
</div>
|
|
872
878
|
|
|
873
879
|
</div>
|
|
@@ -898,45 +904,45 @@ the slot was available.
|
|
|
898
904
|
<div class="method-source-code"
|
|
899
905
|
id="book-ooking-source">
|
|
900
906
|
<pre>
|
|
901
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
907
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 231</span>
|
|
908
|
+
231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bookBooking</span>(<span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">booking</span>)
|
|
909
|
+
232: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span>
|
|
910
|
+
233:
|
|
911
|
+
234: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">sbIdx</span>].<span class="ruby-identifier">nil?</span>
|
|
912
|
+
235: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">booked?</span>(<span class="ruby-identifier">sbIdx</span>)
|
|
913
|
+
236: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_conflict'</span>,
|
|
914
|
+
237: <span class="ruby-node">"Resource #{@property.fullId} has multiple conflicting "</span> <span class="ruby-operator">+</span>
|
|
915
|
+
238: <span class="ruby-node">"bookings for #{@scoreboard.idxToDate(sbIdx)}. The "</span> <span class="ruby-operator">+</span>
|
|
916
|
+
239: <span class="ruby-node">"conflicting tasks are #{@scoreboard[sbIdx].fullId} and "</span> <span class="ruby-operator">+</span>
|
|
917
|
+
240: <span class="ruby-node">"#{booking.task.fullId}."</span>, <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
|
|
918
|
+
241: <span class="ruby-keyword kw">end</span>
|
|
919
|
+
242: <span class="ruby-identifier">val</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">sbIdx</span>]
|
|
920
|
+
243: <span class="ruby-keyword kw">if</span> ((<span class="ruby-identifier">val</span> & <span class="ruby-value">2</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">overtime</span> <span class="ruby-operator"><</span> <span class="ruby-value">1</span>)
|
|
921
|
+
244: <span class="ruby-comment cmt"># The booking is blocked due to the overtime attribute. Now let's</span>
|
|
922
|
+
245: <span class="ruby-comment cmt"># see if the user wants to be warned about it.</span>
|
|
923
|
+
246: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sloppy</span> <span class="ruby-operator"><</span> <span class="ruby-value">1</span>
|
|
924
|
+
247: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_no_duty'</span>,
|
|
925
|
+
248: <span class="ruby-node">"Resource #{@property.fullId} has no duty at "</span> <span class="ruby-operator">+</span>
|
|
926
|
+
249: <span class="ruby-node">"#{@scoreboard.idxToDate(sbIdx)}."</span>,
|
|
927
|
+
250: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
|
|
928
|
+
251: <span class="ruby-keyword kw">end</span>
|
|
929
|
+
252: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
930
|
+
253: <span class="ruby-keyword kw">end</span>
|
|
931
|
+
254: <span class="ruby-keyword kw">if</span> ((<span class="ruby-identifier">val</span> & <span class="ruby-value">0x3C</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">overtime</span> <span class="ruby-operator"><</span> <span class="ruby-value">2</span>)
|
|
932
|
+
255: <span class="ruby-comment cmt"># The booking is blocked due to the overtime attribute. Now let's</span>
|
|
933
|
+
256: <span class="ruby-comment cmt"># see if the user wants to be warned about it.</span>
|
|
934
|
+
257: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sloppy</span> <span class="ruby-operator"><</span> <span class="ruby-value">2</span>
|
|
935
|
+
258: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_on_vacation'</span>,
|
|
936
|
+
259: <span class="ruby-node">"Resource #{@property.fullId} is on vacation at "</span> <span class="ruby-operator">+</span>
|
|
937
|
+
260: <span class="ruby-node">"#{@scoreboard.idxToDate(sbIdx)}."</span>,
|
|
938
|
+
261: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
|
|
939
|
+
262: <span class="ruby-keyword kw">end</span>
|
|
940
|
+
263: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
941
|
+
264: <span class="ruby-keyword kw">end</span>
|
|
942
|
+
265: <span class="ruby-keyword kw">end</span>
|
|
943
|
+
266:
|
|
944
|
+
267: <span class="ruby-identifier">book</span>(<span class="ruby-identifier">sbIdx</span>, <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">task</span>, <span class="ruby-keyword kw">true</span>)
|
|
945
|
+
268: <span class="ruby-keyword kw">end</span></pre>
|
|
940
946
|
</div>
|
|
941
947
|
|
|
942
948
|
</div>
|
|
@@ -970,10 +976,10 @@ Return true if the resource is booked for a tasks at the time specified by
|
|
|
970
976
|
<div class="method-source-code"
|
|
971
977
|
id="booked--source">
|
|
972
978
|
<pre>
|
|
973
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
979
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 183</span>
|
|
980
|
+
183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">booked?</span>(<span class="ruby-identifier">sbIdx</span>)
|
|
981
|
+
184: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">sbIdx</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)
|
|
982
|
+
185: <span class="ruby-keyword kw">end</span></pre>
|
|
977
983
|
</div>
|
|
978
984
|
|
|
979
985
|
</div>
|
|
@@ -1010,20 +1016,20 @@ guarantee, though.
|
|
|
1010
1016
|
<div class="method-source-code"
|
|
1011
1017
|
id="calc-riticalness-source">
|
|
1012
1018
|
<pre>
|
|
1013
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1019
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 67</span>
|
|
1020
|
+
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcCriticalness</span>
|
|
1021
|
+
68: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span>
|
|
1022
|
+
69: <span class="ruby-comment cmt"># Resources that are not allocated are not critical at all.</span>
|
|
1023
|
+
70: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'criticalness'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-value">0.0</span>
|
|
1024
|
+
71: <span class="ruby-keyword kw">else</span>
|
|
1025
|
+
72: <span class="ruby-identifier">freeSlots</span> = <span class="ruby-value">0</span>
|
|
1026
|
+
73: <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">slot</span><span class="ruby-operator">|</span>
|
|
1027
|
+
74: <span class="ruby-identifier">freeSlots</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">slot</span>.<span class="ruby-identifier">nil?</span>
|
|
1028
|
+
75: <span class="ruby-keyword kw">end</span>
|
|
1029
|
+
76: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'criticalness'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-identifier">freeSlots</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-value">1.0</span> <span class="ruby-operator">:</span>
|
|
1030
|
+
77: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'alloctdeffort'</span>) <span class="ruby-operator">/</span> <span class="ruby-identifier">freeSlots</span>
|
|
1031
|
+
78: <span class="ruby-keyword kw">end</span>
|
|
1032
|
+
79: <span class="ruby-keyword kw">end</span></pre>
|
|
1027
1033
|
</div>
|
|
1028
1034
|
|
|
1029
1035
|
</div>
|
|
@@ -1064,14 +1070,18 @@ result is an Array of
|
|
|
1064
1070
|
<div class="method-source-code"
|
|
1065
1071
|
id="collect-ime-ff-ntervals-source">
|
|
1066
1072
|
<pre>
|
|
1067
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1073
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 546</span>
|
|
1074
|
+
546: <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>)
|
|
1075
|
+
547: <span class="ruby-comment cmt"># Time-off intervals are only useful for leaf resources. Group resources</span>
|
|
1076
|
+
548: <span class="ruby-comment cmt"># would just default to the global working hours.</span>
|
|
1077
|
+
549: <span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span>
|
|
1078
|
+
550:
|
|
1079
|
+
551: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span>
|
|
1080
|
+
552:
|
|
1081
|
+
553: <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">collectIntervals</span>(<span class="ruby-identifier">iv</span>, <span class="ruby-identifier">minDuration</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
|
1082
|
+
554: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">val</span> & <span class="ruby-value">0x3E</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
1083
|
+
555: <span class="ruby-keyword kw">end</span>
|
|
1084
|
+
556: <span class="ruby-keyword kw">end</span></pre>
|
|
1075
1085
|
</div>
|
|
1076
1086
|
|
|
1077
1087
|
</div>
|
|
@@ -1107,10 +1117,10 @@ particular task is considered.
|
|
|
1107
1117
|
<div class="method-source-code"
|
|
1108
1118
|
id="cost-source">
|
|
1109
1119
|
<pre>
|
|
1110
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1120
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 468</span>
|
|
1121
|
+
468: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cost</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span> = <span class="ruby-keyword kw">nil</span>)
|
|
1122
|
+
469: <span class="ruby-identifier">getAllocatedTime</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>) * <span class="ruby-identifier">a</span>(<span class="ruby-value str">'rate'</span>)
|
|
1123
|
+
470: <span class="ruby-keyword kw">end</span></pre>
|
|
1114
1124
|
</div>
|
|
1115
1125
|
|
|
1116
1126
|
</div>
|
|
@@ -1145,22 +1155,22 @@ descends into all child resources.
|
|
|
1145
1155
|
<div class="method-source-code"
|
|
1146
1156
|
id="finish-cheduling-source">
|
|
1147
1157
|
<pre>
|
|
1148
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1158
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 120</span>
|
|
1159
|
+
120: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">finishScheduling</span>
|
|
1160
|
+
121: <span class="ruby-comment cmt"># Recursively descend into all child resources.</span>
|
|
1161
|
+
122: <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">resource</span><span class="ruby-operator">|</span>
|
|
1162
|
+
123: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">finishScheduling</span>(<span class="ruby-ivar">@scenarioIdx</span>)
|
|
1163
|
+
124: <span class="ruby-keyword kw">end</span>
|
|
1164
|
+
125:
|
|
1165
|
+
126: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">parent</span> = <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">parent</span>)
|
|
1166
|
+
127: <span class="ruby-comment cmt"># Add the assigned task to the parent duties list.</span>
|
|
1167
|
+
128: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duties'</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>
|
|
1168
|
+
129: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">parent</span>[<span class="ruby-value str">'duties'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">task</span>)
|
|
1169
|
+
130: <span class="ruby-identifier">parent</span>[<span class="ruby-value str">'duties'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">task</span>
|
|
1170
|
+
131: <span class="ruby-keyword kw">end</span>
|
|
1171
|
+
132: <span class="ruby-keyword kw">end</span>
|
|
1172
|
+
133: <span class="ruby-keyword kw">end</span>
|
|
1173
|
+
134: <span class="ruby-keyword kw">end</span></pre>
|
|
1164
1174
|
</div>
|
|
1165
1175
|
|
|
1166
1176
|
</div>
|
|
@@ -1194,23 +1204,23 @@ not nil count only those slots that are assigned to this particular task.
|
|
|
1194
1204
|
<div class="method-source-code"
|
|
1195
1205
|
id="get-llocated-lots-source">
|
|
1196
1206
|
<pre>
|
|
1197
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1207
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 560</span>
|
|
1208
|
+
560: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getAllocatedSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>)
|
|
1209
|
+
561: <span class="ruby-comment cmt"># If there is no scoreboard, we don't have any allocations.</span>
|
|
1210
|
+
562: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span>
|
|
1211
|
+
563:
|
|
1212
|
+
564: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span> = <span class="ruby-identifier">fitIndicies</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>)
|
|
1213
|
+
565: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">endIdx</span>
|
|
1214
|
+
566:
|
|
1215
|
+
567: <span class="ruby-identifier">bookedSlots</span> = <span class="ruby-value">0</span>
|
|
1216
|
+
568: <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">each</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">slot</span><span class="ruby-operator">|</span>
|
|
1217
|
+
569: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">task</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">slot</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)) <span class="ruby-operator">||</span> (<span class="ruby-identifier">task</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">slot</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">task</span>)
|
|
1218
|
+
570: <span class="ruby-identifier">bookedSlots</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1219
|
+
571: <span class="ruby-keyword kw">end</span>
|
|
1220
|
+
572: <span class="ruby-keyword kw">end</span>
|
|
1221
|
+
573:
|
|
1222
|
+
574: <span class="ruby-identifier">bookedSlots</span>
|
|
1223
|
+
575: <span class="ruby-keyword kw">end</span></pre>
|
|
1214
1224
|
</div>
|
|
1215
1225
|
|
|
1216
1226
|
</div>
|
|
@@ -1243,25 +1253,25 @@ Returns the allocated accumulated time of this resource and its children.
|
|
|
1243
1253
|
<div class="method-source-code"
|
|
1244
1254
|
id="get-llocated-ime-source">
|
|
1245
1255
|
<pre>
|
|
1246
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1256
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 368</span>
|
|
1257
|
+
368: <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">task</span> = <span class="ruby-keyword kw">nil</span>)
|
|
1258
|
+
369: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1259
|
+
370: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1260
|
+
371: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">endIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1261
|
+
372:
|
|
1262
|
+
373: <span class="ruby-identifier">time</span> = <span class="ruby-value">0</span>
|
|
1263
|
+
374: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1264
|
+
375: <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">resource</span><span class="ruby-operator">|</span>
|
|
1265
|
+
376: <span class="ruby-identifier">time</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</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>, <span class="ruby-identifier">task</span>)
|
|
1266
|
+
377: <span class="ruby-keyword kw">end</span>
|
|
1267
|
+
378: <span class="ruby-keyword kw">else</span>
|
|
1268
|
+
379: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span>
|
|
1269
|
+
380:
|
|
1270
|
+
381: <span class="ruby-identifier">time</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>] *
|
|
1271
|
+
382: <span class="ruby-identifier">getAllocatedSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>))
|
|
1272
|
+
383: <span class="ruby-keyword kw">end</span>
|
|
1273
|
+
384: <span class="ruby-identifier">time</span>
|
|
1274
|
+
385: <span class="ruby-keyword kw">end</span></pre>
|
|
1265
1275
|
</div>
|
|
1266
1276
|
|
|
1267
1277
|
</div>
|
|
@@ -1278,7 +1288,7 @@ Returns the allocated accumulated time of this resource and its children.
|
|
|
1278
1288
|
<div class="method-heading">
|
|
1279
1289
|
|
|
1280
1290
|
<span class="method-name">getBookings</span><span
|
|
1281
|
-
class="method-args">()</span>
|
|
1291
|
+
class="method-args">(iv = nil)</span>
|
|
1282
1292
|
<span class="method-click-advice">click to toggle source</span>
|
|
1283
1293
|
|
|
1284
1294
|
</div>
|
|
@@ -1288,56 +1298,68 @@ Returns the allocated accumulated time of this resource and its children.
|
|
|
1288
1298
|
<p>
|
|
1289
1299
|
Iterate over the scoreboard and turn its content into a set of Bookings.
|
|
1290
1300
|
</p>
|
|
1301
|
+
<pre>
|
|
1302
|
+
_iv_ can be an Interval to limit the bookings within the provided
|
|
1303
|
+
period.</pre>
|
|
1291
1304
|
|
|
1292
1305
|
|
|
1293
1306
|
|
|
1294
1307
|
<div class="method-source-code"
|
|
1295
1308
|
id="get-ookings-source">
|
|
1296
1309
|
<pre>
|
|
1297
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
489:
|
|
1306
|
-
490: <span class="ruby-comment cmt"># To speedup the collection we start with the first booked slot and end</span>
|
|
1307
|
-
491: <span class="ruby-comment cmt"># with the last booked slot.</span>
|
|
1308
|
-
492: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@firstBookedSlot</span>
|
|
1309
|
-
493: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@lastBookedSlot</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
1310
|
-
494:
|
|
1311
|
-
495: <span class="ruby-comment cmt"># In case the index markers are still uninitialized, we have no bookings.</span>
|
|
1312
|
-
496: <span class="ruby-keyword kw">return</span> {} <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">nil?</span>
|
|
1310
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 490</span>
|
|
1311
|
+
490: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getBookings</span>(<span class="ruby-identifier">iv</span> = <span class="ruby-keyword kw">nil</span>)
|
|
1312
|
+
491: <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-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span>
|
|
1313
|
+
492: <span class="ruby-ivar">@firstBookedSlot</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@lastBookedSlot</span>.<span class="ruby-identifier">nil?</span>
|
|
1314
|
+
493:
|
|
1315
|
+
494: <span class="ruby-identifier">bookings</span> = {}
|
|
1316
|
+
495: <span class="ruby-identifier">lastTask</span> = <span class="ruby-keyword kw">nil</span>
|
|
1317
|
+
496: <span class="ruby-identifier">bookingStart</span> = <span class="ruby-keyword kw">nil</span>
|
|
1313
1318
|
497:
|
|
1314
|
-
498: <span class="ruby-
|
|
1315
|
-
499:
|
|
1316
|
-
500:
|
|
1317
|
-
501:
|
|
1318
|
-
502:
|
|
1319
|
-
503:
|
|
1320
|
-
504:
|
|
1321
|
-
505:
|
|
1322
|
-
506:
|
|
1323
|
-
507:
|
|
1324
|
-
508:
|
|
1325
|
-
509:
|
|
1326
|
-
510:
|
|
1327
|
-
511:
|
|
1328
|
-
512:
|
|
1329
|
-
513:
|
|
1330
|
-
514:
|
|
1331
|
-
515:
|
|
1332
|
-
516:
|
|
1333
|
-
517:
|
|
1334
|
-
518:
|
|
1335
|
-
519:
|
|
1336
|
-
520: <span class="ruby-keyword kw">
|
|
1337
|
-
521:
|
|
1338
|
-
522:
|
|
1339
|
-
523:
|
|
1340
|
-
524:
|
|
1319
|
+
498: <span class="ruby-comment cmt"># To speedup the collection we start with the first booked slot and end</span>
|
|
1320
|
+
499: <span class="ruby-comment cmt"># with the last booked slot.</span>
|
|
1321
|
+
500: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@firstBookedSlot</span>
|
|
1322
|
+
501: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@lastBookedSlot</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
1323
|
+
502:
|
|
1324
|
+
503: <span class="ruby-comment cmt"># In case the index markers are still uninitialized, we have no bookings.</span>
|
|
1325
|
+
504: <span class="ruby-keyword kw">return</span> {} <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">nil?</span>
|
|
1326
|
+
505:
|
|
1327
|
+
506: <span class="ruby-comment cmt"># If the user provided an Interval, we only return bookings within this</span>
|
|
1328
|
+
507: <span class="ruby-comment cmt"># Interval.</span>
|
|
1329
|
+
508: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">iv</span>
|
|
1330
|
+
509: <span class="ruby-identifier">ivStartIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">iv</span>.<span class="ruby-identifier">start</span>)
|
|
1331
|
+
510: <span class="ruby-identifier">ivEndIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">iv</span>.<span class="ruby-identifier">end</span>)
|
|
1332
|
+
511: <span class="ruby-identifier">startIdx</span> = <span class="ruby-identifier">ivStartIdx</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ivStartIdx</span> <span class="ruby-operator">></span> <span class="ruby-identifier">startIdx</span>
|
|
1333
|
+
512: <span class="ruby-identifier">endIdx</span> = <span class="ruby-identifier">ivEndIdx</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ivEndIdx</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">endIdx</span>
|
|
1334
|
+
513: <span class="ruby-keyword kw">end</span>
|
|
1335
|
+
514:
|
|
1336
|
+
515: <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">endIdx</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
|
|
1337
|
+
516: <span class="ruby-identifier">task</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">idx</span>]
|
|
1338
|
+
517: <span class="ruby-comment cmt"># Now we watch for task changes.</span>
|
|
1339
|
+
518: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">lastTask</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">lastTask</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)) <span class="ruby-operator">||</span>
|
|
1340
|
+
519: (<span class="ruby-identifier">task</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">idx</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">endIdx</span>)
|
|
1341
|
+
520: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">lastTask</span>.<span class="ruby-identifier">nil?</span>
|
|
1342
|
+
521: <span class="ruby-comment cmt"># If we don't have a Booking for the task yet, we create one.</span>
|
|
1343
|
+
522: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bookings</span>[<span class="ruby-identifier">lastTask</span>].<span class="ruby-identifier">nil?</span>
|
|
1344
|
+
523: <span class="ruby-identifier">bookings</span>[<span class="ruby-identifier">lastTask</span>] = <span class="ruby-constant">Booking</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@property</span>, <span class="ruby-identifier">lastTask</span>, [])
|
|
1345
|
+
524: <span class="ruby-keyword kw">end</span>
|
|
1346
|
+
525:
|
|
1347
|
+
526: <span class="ruby-comment cmt"># Append the new interval to the Booking.</span>
|
|
1348
|
+
527: <span class="ruby-identifier">bookings</span>[<span class="ruby-identifier">lastTask</span>].<span class="ruby-identifier">intervals</span> <span class="ruby-operator"><<</span>
|
|
1349
|
+
528: <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">bookingStart</span>),
|
|
1350
|
+
529: <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">idx</span>))
|
|
1351
|
+
530: <span class="ruby-keyword kw">end</span>
|
|
1352
|
+
531: <span class="ruby-comment cmt"># Get ready for the next task booking interval</span>
|
|
1353
|
+
532: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)
|
|
1354
|
+
533: <span class="ruby-identifier">lastTask</span> = <span class="ruby-identifier">task</span>
|
|
1355
|
+
534: <span class="ruby-identifier">bookingStart</span> = <span class="ruby-identifier">idx</span>
|
|
1356
|
+
535: <span class="ruby-keyword kw">else</span>
|
|
1357
|
+
536: <span class="ruby-identifier">lastTask</span> = <span class="ruby-identifier">bookingStart</span> = <span class="ruby-keyword kw">nil</span>
|
|
1358
|
+
537: <span class="ruby-keyword kw">end</span>
|
|
1359
|
+
538: <span class="ruby-keyword kw">end</span>
|
|
1360
|
+
539: <span class="ruby-keyword kw">end</span>
|
|
1361
|
+
540: <span class="ruby-identifier">bookings</span>
|
|
1362
|
+
541: <span class="ruby-keyword kw">end</span></pre>
|
|
1341
1363
|
</div>
|
|
1342
1364
|
|
|
1343
1365
|
</div>
|
|
@@ -1371,24 +1393,24 @@ children.
|
|
|
1371
1393
|
<div class="method-source-code"
|
|
1372
1394
|
id="get-ffective-ree-ime-source">
|
|
1373
1395
|
<pre>
|
|
1374
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1396
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 389</span>
|
|
1397
|
+
389: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getEffectiveFreeTime</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1398
|
+
390: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1399
|
+
391: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1400
|
+
392: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">endIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1401
|
+
393:
|
|
1402
|
+
394: <span class="ruby-identifier">freeTime</span> = <span class="ruby-value">0</span>
|
|
1403
|
+
395: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1404
|
+
396: <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">resource</span><span class="ruby-operator">|</span>
|
|
1405
|
+
397: <span class="ruby-identifier">freeTime</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">getEffectiveFreeTime</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>,
|
|
1406
|
+
398: <span class="ruby-identifier">endIdx</span>)
|
|
1407
|
+
399: <span class="ruby-keyword kw">end</span>
|
|
1408
|
+
400: <span class="ruby-keyword kw">else</span>
|
|
1409
|
+
401: <span class="ruby-identifier">freeTime</span> = <span class="ruby-identifier">getFreeSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>) *
|
|
1410
|
+
402: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
|
|
1411
|
+
403: <span class="ruby-keyword kw">end</span>
|
|
1412
|
+
404: <span class="ruby-identifier">freeTime</span>
|
|
1413
|
+
405: <span class="ruby-keyword kw">end</span></pre>
|
|
1392
1414
|
</div>
|
|
1393
1415
|
|
|
1394
1416
|
</div>
|
|
@@ -1422,24 +1444,24 @@ their efficiency.
|
|
|
1422
1444
|
<div class="method-source-code"
|
|
1423
1445
|
id="get-ffective-ree-ork-source">
|
|
1424
1446
|
<pre>
|
|
1425
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1447
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 409</span>
|
|
1448
|
+
409: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getEffectiveFreeWork</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1449
|
+
410: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1450
|
+
411: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1451
|
+
412: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">endIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1452
|
+
413:
|
|
1453
|
+
414: <span class="ruby-identifier">work</span> = <span class="ruby-value">0.0</span>
|
|
1454
|
+
415: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1455
|
+
416: <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">resource</span><span class="ruby-operator">|</span>
|
|
1456
|
+
417: <span class="ruby-identifier">work</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">getEffectiveFreeWork</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1457
|
+
418: <span class="ruby-keyword kw">end</span>
|
|
1458
|
+
419: <span class="ruby-keyword kw">else</span>
|
|
1459
|
+
420: <span class="ruby-identifier">work</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
|
|
1460
|
+
421: <span class="ruby-identifier">getFreeSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>) *
|
|
1461
|
+
422: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]) * <span class="ruby-identifier">a</span>(<span class="ruby-value str">'efficiency'</span>)
|
|
1462
|
+
423: <span class="ruby-keyword kw">end</span>
|
|
1463
|
+
424: <span class="ruby-identifier">work</span>
|
|
1464
|
+
425: <span class="ruby-keyword kw">end</span></pre>
|
|
1443
1465
|
</div>
|
|
1444
1466
|
|
|
1445
1467
|
</div>
|
|
@@ -1473,36 +1495,36 @@ efficiency.
|
|
|
1473
1495
|
<div class="method-source-code"
|
|
1474
1496
|
id="get-ffective-ork-source">
|
|
1475
1497
|
<pre>
|
|
1476
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
335:
|
|
1482
|
-
336: <span class="ruby-comment cmt"># The unique key we use to address the result in the cache.</span>
|
|
1483
|
-
337: <span class="ruby-identifier">key</span> = [ <span class="ruby-keyword kw">self</span>, <span class="ruby-value">:ResourceScenarioEffectiveWork</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
|
|
1484
|
-
338: <span class="ruby-identifier">task</span> ].<span class="ruby-identifier">hash</span>
|
|
1485
|
-
339: <span class="ruby-identifier">work</span> = <span class="ruby-ivar">@dCache</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">key</span>)
|
|
1486
|
-
340: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">work</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">work</span>
|
|
1498
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 337</span>
|
|
1499
|
+
337: <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">task</span> = <span class="ruby-keyword kw">nil</span>)
|
|
1500
|
+
338: <span class="ruby-comment cmt"># There can't be any effective work if the start is after the end or the</span>
|
|
1501
|
+
339: <span class="ruby-comment cmt"># todo list doesn't contain the specified task.</span>
|
|
1502
|
+
340: <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">startIdx</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">endIdx</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">task</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'duties'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">task</span>))
|
|
1487
1503
|
341:
|
|
1488
|
-
342: <span class="ruby-comment cmt">#
|
|
1489
|
-
343: <span class="ruby-identifier">
|
|
1490
|
-
344:
|
|
1491
|
-
345:
|
|
1492
|
-
346: <span class="ruby-identifier">work</span> = <span class="ruby-
|
|
1493
|
-
347:
|
|
1494
|
-
348:
|
|
1495
|
-
349:
|
|
1496
|
-
350:
|
|
1497
|
-
351:
|
|
1498
|
-
352:
|
|
1499
|
-
353:
|
|
1500
|
-
354: <span class="ruby-identifier">
|
|
1501
|
-
355:
|
|
1502
|
-
356:
|
|
1503
|
-
357: <span class="ruby-keyword kw">
|
|
1504
|
-
358:
|
|
1505
|
-
359:
|
|
1504
|
+
342: <span class="ruby-comment cmt"># The unique key we use to address the result in the cache.</span>
|
|
1505
|
+
343: <span class="ruby-identifier">key</span> = [ <span class="ruby-keyword kw">self</span>, <span class="ruby-value">:ResourceScenarioEffectiveWork</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
|
|
1506
|
+
344: <span class="ruby-identifier">task</span> ].<span class="ruby-identifier">hash</span>
|
|
1507
|
+
345: <span class="ruby-identifier">work</span> = <span class="ruby-ivar">@dCache</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">key</span>)
|
|
1508
|
+
346: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">work</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">work</span>
|
|
1509
|
+
347:
|
|
1510
|
+
348: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1511
|
+
349: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1512
|
+
350: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">endIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1513
|
+
351:
|
|
1514
|
+
352: <span class="ruby-identifier">work</span> = <span class="ruby-value">0.0</span>
|
|
1515
|
+
353: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1516
|
+
354: <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">resource</span><span class="ruby-operator">|</span>
|
|
1517
|
+
355: <span class="ruby-identifier">work</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>, <span class="ruby-identifier">task</span>)
|
|
1518
|
+
356: <span class="ruby-keyword kw">end</span>
|
|
1519
|
+
357: <span class="ruby-keyword kw">else</span>
|
|
1520
|
+
358: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0.0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span>
|
|
1521
|
+
359:
|
|
1522
|
+
360: <span class="ruby-identifier">work</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
|
|
1523
|
+
361: <span class="ruby-identifier">getAllocatedSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>) *
|
|
1524
|
+
362: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]) * <span class="ruby-identifier">a</span>(<span class="ruby-value str">'efficiency'</span>)
|
|
1525
|
+
363: <span class="ruby-keyword kw">end</span>
|
|
1526
|
+
364: <span class="ruby-ivar">@dCache</span>.<span class="ruby-identifier">store</span>(<span class="ruby-identifier">work</span>, <span class="ruby-identifier">key</span>)
|
|
1527
|
+
365: <span class="ruby-keyword kw">end</span></pre>
|
|
1506
1528
|
</div>
|
|
1507
1529
|
|
|
1508
1530
|
</div>
|
|
@@ -1535,19 +1557,19 @@ Count the free slots between the start and end index.
|
|
|
1535
1557
|
<div class="method-source-code"
|
|
1536
1558
|
id="get-ree-lots-source">
|
|
1537
1559
|
<pre>
|
|
1538
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1560
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 578</span>
|
|
1561
|
+
578: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getFreeSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1562
|
+
579: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">endIdx</span>
|
|
1563
|
+
580:
|
|
1564
|
+
581: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span>
|
|
1565
|
+
582:
|
|
1566
|
+
583: <span class="ruby-identifier">freeSlots</span> = <span class="ruby-value">0</span>
|
|
1567
|
+
584: <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>
|
|
1568
|
+
585: <span class="ruby-identifier">freeSlots</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">idx</span>].<span class="ruby-identifier">nil?</span>
|
|
1569
|
+
586: <span class="ruby-keyword kw">end</span>
|
|
1570
|
+
587:
|
|
1571
|
+
588: <span class="ruby-identifier">freeSlots</span>
|
|
1572
|
+
589: <span class="ruby-keyword kw">end</span></pre>
|
|
1551
1573
|
</div>
|
|
1552
1574
|
|
|
1553
1575
|
</div>
|
|
@@ -1580,27 +1602,27 @@ Return the number of working days that are blocked by vacations.
|
|
|
1580
1602
|
<div class="method-source-code"
|
|
1581
1603
|
id="get-acation-ays-source">
|
|
1582
1604
|
<pre>
|
|
1583
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1605
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 428</span>
|
|
1606
|
+
428: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getVacationDays</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1607
|
+
429: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1608
|
+
430: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1609
|
+
431: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">endIdx</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">endIdx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
|
1610
|
+
432:
|
|
1611
|
+
433: <span class="ruby-identifier">vacationDays</span> = <span class="ruby-value">0.0</span>
|
|
1612
|
+
434: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1613
|
+
435: <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">resource</span><span class="ruby-operator">|</span>
|
|
1614
|
+
436: <span class="ruby-identifier">vacationDays</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">getVacationDays</span>(<span class="ruby-ivar">@scenarioIdx</span>,
|
|
1615
|
+
437: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1616
|
+
438: <span class="ruby-keyword kw">end</span>
|
|
1617
|
+
439: <span class="ruby-keyword kw">else</span>
|
|
1618
|
+
440: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span>
|
|
1619
|
+
441:
|
|
1620
|
+
442: <span class="ruby-identifier">vacationDays</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
|
|
1621
|
+
443: <span class="ruby-identifier">getVacationSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>) *
|
|
1622
|
+
444: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]) * <span class="ruby-identifier">a</span>(<span class="ruby-value str">'efficiency'</span>)
|
|
1623
|
+
445: <span class="ruby-keyword kw">end</span>
|
|
1624
|
+
446: <span class="ruby-identifier">vacationDays</span>
|
|
1625
|
+
447: <span class="ruby-keyword kw">end</span></pre>
|
|
1604
1626
|
</div>
|
|
1605
1627
|
|
|
1606
1628
|
</div>
|
|
@@ -1634,21 +1656,21 @@ been blocked by a vacation.
|
|
|
1634
1656
|
<div class="method-source-code"
|
|
1635
1657
|
id="get-acation-lots-source">
|
|
1636
1658
|
<pre>
|
|
1637
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1659
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 593</span>
|
|
1660
|
+
593: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getVacationSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1661
|
+
594: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">startIdx</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">endIdx</span>
|
|
1662
|
+
595:
|
|
1663
|
+
596: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span>
|
|
1664
|
+
597:
|
|
1665
|
+
598: <span class="ruby-identifier">vacationSlots</span> = <span class="ruby-value">0</span>
|
|
1666
|
+
599: <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>
|
|
1667
|
+
600: <span class="ruby-identifier">val</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">idx</span>]
|
|
1668
|
+
601: <span class="ruby-comment cmt"># Bit 1 needs to be unset and the vacation bits must not be 0.</span>
|
|
1669
|
+
602: <span class="ruby-identifier">vacationSlots</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">val</span> & <span class="ruby-value">0x2</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span>
|
|
1670
|
+
603: (<span class="ruby-identifier">val</span> & <span class="ruby-value">0x3C</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
1671
|
+
604: <span class="ruby-keyword kw">end</span>
|
|
1672
|
+
605: <span class="ruby-identifier">vacationSlots</span>
|
|
1673
|
+
606: <span class="ruby-keyword kw">end</span></pre>
|
|
1652
1674
|
</div>
|
|
1653
1675
|
|
|
1654
1676
|
</div>
|
|
@@ -1679,35 +1701,40 @@ been blocked by a vacation.
|
|
|
1679
1701
|
<div class="method-source-code"
|
|
1680
1702
|
id="post-chedule-heck-source">
|
|
1681
1703
|
<pre>
|
|
1682
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1704
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 136</span>
|
|
1705
|
+
136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">postScheduleCheck</span>
|
|
1706
|
+
137: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">a</span>(<span class="ruby-value str">'fail'</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">'warn'</span>).<span class="ruby-identifier">empty?</span>
|
|
1707
|
+
138: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
1708
|
+
139: <span class="ruby-value str">'scenarioIdx'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@scenarioIdx</span>,
|
|
1709
|
+
140: <span class="ruby-value str">'property'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@property</span>,
|
|
1710
|
+
141: <span class="ruby-value str">'scopeProperty'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">nil</span>,
|
|
1711
|
+
142: <span class="ruby-value str">'start'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>],
|
|
1712
|
+
143: <span class="ruby-value str">'end'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>],
|
|
1713
|
+
144: <span class="ruby-value str">'loadUnit'</span> =<span class="ruby-operator">></span> <span class="ruby-value">:days</span>,
|
|
1714
|
+
145: <span class="ruby-value str">'numberFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'numberFormat'</span>],
|
|
1715
|
+
146: <span class="ruby-value str">'timeFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'timeFormat'</span>],
|
|
1716
|
+
147: <span class="ruby-value str">'currencyFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'currencyFormat'</span>] }
|
|
1717
|
+
148: <span class="ruby-identifier">query</span> = <span class="ruby-constant">Query</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">queryAttrs</span>)
|
|
1718
|
+
149: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'fail'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">expr</span><span class="ruby-operator">|</span>
|
|
1719
|
+
150: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">expr</span>.<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">query</span>)
|
|
1720
|
+
151: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'resource_fail_check'</span>,
|
|
1721
|
+
152: <span class="ruby-value str">"User defined check failed for resource "</span> <span class="ruby-operator">+</span>
|
|
1722
|
+
153: <span class="ruby-node">"#{@property.fullId} \n"</span> <span class="ruby-operator">+</span>
|
|
1723
|
+
154: <span class="ruby-node">"Condition: #{expr.to_s}\n"</span> <span class="ruby-operator">+</span>
|
|
1724
|
+
155: <span class="ruby-node">"Result: #{expr.to_s(query)}"</span>)
|
|
1725
|
+
156: <span class="ruby-keyword kw">end</span>
|
|
1726
|
+
157: <span class="ruby-keyword kw">end</span>
|
|
1727
|
+
158: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'warn'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">expr</span><span class="ruby-operator">|</span>
|
|
1728
|
+
159: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">expr</span>.<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">query</span>)
|
|
1729
|
+
160: <span class="ruby-identifier">warning</span>(<span class="ruby-value str">'resource_warn_check'</span>,
|
|
1730
|
+
161: <span class="ruby-value str">"User defined warning triggered for resource "</span> <span class="ruby-operator">+</span>
|
|
1731
|
+
162: <span class="ruby-node">"#{@property.fullId} \n"</span> <span class="ruby-operator">+</span>
|
|
1732
|
+
163: <span class="ruby-node">"Condition: #{expr.to_s}\n"</span> <span class="ruby-operator">+</span>
|
|
1733
|
+
164: <span class="ruby-node">"Result: #{expr.to_s(query)}"</span>)
|
|
1734
|
+
165: <span class="ruby-keyword kw">end</span>
|
|
1735
|
+
166: <span class="ruby-keyword kw">end</span>
|
|
1736
|
+
167: <span class="ruby-keyword kw">end</span>
|
|
1737
|
+
168: <span class="ruby-keyword kw">end</span></pre>
|
|
1711
1738
|
</div>
|
|
1712
1739
|
|
|
1713
1740
|
</div>
|
|
@@ -1738,20 +1765,20 @@ been blocked by a vacation.
|
|
|
1738
1765
|
<div class="method-source-code"
|
|
1739
1766
|
id="pre-chedule-heck-source">
|
|
1740
1767
|
<pre>
|
|
1741
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1768
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 103</span>
|
|
1769
|
+
103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preScheduleCheck</span>
|
|
1770
|
+
104: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'managers'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">manager</span><span class="ruby-operator">|</span>
|
|
1771
|
+
105: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">leaf?</span>
|
|
1772
|
+
106: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'manager_is_group'</span>,
|
|
1773
|
+
107: <span class="ruby-node">"Resource #{@property.fullId} has group #{manager.fullId} "</span> <span class="ruby-operator">+</span>
|
|
1774
|
+
108: <span class="ruby-value str">"assigned as manager. Managers must be leaf resources."</span>)
|
|
1775
|
+
109: <span class="ruby-keyword kw">end</span>
|
|
1776
|
+
110: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">manager</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@property</span>
|
|
1777
|
+
111: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'manager_is_self'</span>,
|
|
1778
|
+
112: <span class="ruby-node">"Resource #{@property.fullId} cannot manage itself."</span>)
|
|
1779
|
+
113: <span class="ruby-keyword kw">end</span>
|
|
1780
|
+
114: <span class="ruby-keyword kw">end</span>
|
|
1781
|
+
115: <span class="ruby-keyword kw">end</span></pre>
|
|
1755
1782
|
</div>
|
|
1756
1783
|
|
|
1757
1784
|
</div>
|
|
@@ -1785,13 +1812,13 @@ initializes variables used during the scheduling process.
|
|
|
1785
1812
|
<div class="method-source-code"
|
|
1786
1813
|
id="prepare-cheduling-source">
|
|
1787
1814
|
<pre>
|
|
1788
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1815
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 55</span>
|
|
1816
|
+
55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prepareScheduling</span>
|
|
1817
|
+
56: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'effort'</span>, <span class="ruby-ivar">@scenarioIdx</span>] = <span class="ruby-value">0</span>
|
|
1818
|
+
57: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span>
|
|
1819
|
+
58:
|
|
1820
|
+
59: <span class="ruby-identifier">setDirectReports</span>
|
|
1821
|
+
60: <span class="ruby-keyword kw">end</span></pre>
|
|
1795
1822
|
</div>
|
|
1796
1823
|
|
|
1797
1824
|
</div>
|
|
@@ -1828,17 +1855,17 @@ account.
|
|
|
1828
1855
|
<div class="method-source-code"
|
|
1829
1856
|
id="query-cost-source">
|
|
1830
1857
|
<pre>
|
|
1831
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1858
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 273</span>
|
|
1859
|
+
273: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_cost</span>(<span class="ruby-identifier">query</span>)
|
|
1860
|
+
274: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">costAccount</span>
|
|
1861
|
+
275: <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> =
|
|
1862
|
+
276: <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>,
|
|
1863
|
+
277: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
|
|
1864
|
+
278: <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>)
|
|
1865
|
+
279: <span class="ruby-keyword kw">else</span>
|
|
1866
|
+
280: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No cost account'</span>
|
|
1867
|
+
281: <span class="ruby-keyword kw">end</span>
|
|
1868
|
+
282: <span class="ruby-keyword kw">end</span></pre>
|
|
1842
1869
|
</div>
|
|
1843
1870
|
|
|
1844
1871
|
</div>
|
|
@@ -1874,12 +1901,12 @@ href="Task.html">Task</a> is taken into account.
|
|
|
1874
1901
|
<div class="method-source-code"
|
|
1875
1902
|
id="query-effort-source">
|
|
1876
1903
|
<pre>
|
|
1877
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1904
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 287</span>
|
|
1905
|
+
287: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effort</span>(<span class="ruby-identifier">query</span>)
|
|
1906
|
+
288: <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> =
|
|
1907
|
+
289: <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>)
|
|
1908
|
+
290: <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>)
|
|
1909
|
+
291: <span class="ruby-keyword kw">end</span></pre>
|
|
1883
1910
|
</div>
|
|
1884
1911
|
|
|
1885
1912
|
</div>
|
|
@@ -1913,12 +1940,12 @@ during the specified interval.
|
|
|
1913
1940
|
<div class="method-source-code"
|
|
1914
1941
|
id="query-freetime-source">
|
|
1915
1942
|
<pre>
|
|
1916
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1943
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 294</span>
|
|
1944
|
+
294: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_freetime</span>(<span class="ruby-identifier">query</span>)
|
|
1945
|
+
295: <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">time</span> =
|
|
1946
|
+
296: <span class="ruby-identifier">getEffectiveFreeTime</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-operator">/</span> (<span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span>)
|
|
1947
|
+
297: <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">time</span>)
|
|
1948
|
+
298: <span class="ruby-keyword kw">end</span></pre>
|
|
1922
1949
|
</div>
|
|
1923
1950
|
|
|
1924
1951
|
</div>
|
|
@@ -1952,12 +1979,12 @@ the specified interval.
|
|
|
1952
1979
|
<div class="method-source-code"
|
|
1953
1980
|
id="query-freework-source">
|
|
1954
1981
|
<pre>
|
|
1955
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1982
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 301</span>
|
|
1983
|
+
301: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_freework</span>(<span class="ruby-identifier">query</span>)
|
|
1984
|
+
302: <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> =
|
|
1985
|
+
303: <span class="ruby-identifier">getEffectiveFreeWork</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>)
|
|
1986
|
+
304: <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>)
|
|
1987
|
+
305: <span class="ruby-keyword kw">end</span></pre>
|
|
1961
1988
|
</div>
|
|
1962
1989
|
|
|
1963
1990
|
</div>
|
|
@@ -1990,11 +2017,11 @@ Get the rate of the resource.
|
|
|
1990
2017
|
<div class="method-source-code"
|
|
1991
2018
|
id="query-rate-source">
|
|
1992
2019
|
<pre>
|
|
1993
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2020
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 308</span>
|
|
2021
|
+
308: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_rate</span>(<span class="ruby-identifier">query</span>)
|
|
2022
|
+
309: <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">r</span> = <span class="ruby-identifier">rate</span>
|
|
2023
|
+
310: <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">r</span>)
|
|
2024
|
+
311: <span class="ruby-keyword kw">end</span></pre>
|
|
1998
2025
|
</div>
|
|
1999
2026
|
|
|
2000
2027
|
</div>
|
|
@@ -2031,17 +2058,17 @@ into account.
|
|
|
2031
2058
|
<div class="method-source-code"
|
|
2032
2059
|
id="query-revenue-source">
|
|
2033
2060
|
<pre>
|
|
2034
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2061
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 316</span>
|
|
2062
|
+
316: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_revenue</span>(<span class="ruby-identifier">query</span>)
|
|
2063
|
+
317: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">revenueAccount</span>
|
|
2064
|
+
318: <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> =
|
|
2065
|
+
319: <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>,
|
|
2066
|
+
320: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
|
|
2067
|
+
321: <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>)
|
|
2068
|
+
322: <span class="ruby-keyword kw">else</span>
|
|
2069
|
+
323: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No revenue account'</span>
|
|
2070
|
+
324: <span class="ruby-keyword kw">end</span>
|
|
2071
|
+
325: <span class="ruby-keyword kw">end</span></pre>
|
|
2045
2072
|
</div>
|
|
2046
2073
|
|
|
2047
2074
|
</div>
|
|
@@ -2076,12 +2103,12 @@ The result is in working days (effort).
|
|
|
2076
2103
|
<div class="method-source-code"
|
|
2077
2104
|
id="query-vacationdays-source">
|
|
2078
2105
|
<pre>
|
|
2079
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2106
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 329</span>
|
|
2107
|
+
329: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_vacationdays</span>(<span class="ruby-identifier">query</span>)
|
|
2108
|
+
330: <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">time</span> =
|
|
2109
|
+
331: <span class="ruby-identifier">getVacationDays</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>)
|
|
2110
|
+
332: <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">time</span>)
|
|
2111
|
+
333: <span class="ruby-keyword kw">end</span></pre>
|
|
2085
2112
|
</div>
|
|
2086
2113
|
|
|
2087
2114
|
</div>
|
|
@@ -2112,20 +2139,20 @@ The result is in working days (effort).
|
|
|
2112
2139
|
<div class="method-source-code"
|
|
2113
2140
|
id="set-irect-eports-source">
|
|
2114
2141
|
<pre>
|
|
2115
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2142
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 81</span>
|
|
2143
|
+
81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setDirectReports</span>
|
|
2144
|
+
82: <span class="ruby-comment cmt"># Only leaf resources have reporting lines.</span>
|
|
2145
|
+
83: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">leaf?</span>
|
|
2146
|
+
84:
|
|
2147
|
+
85: <span class="ruby-comment cmt"># The 'directreports' attribute is the reverse link for the 'managers'</span>
|
|
2148
|
+
86: <span class="ruby-comment cmt"># attribute. In contrast to the 'managers' attribute, the</span>
|
|
2149
|
+
87: <span class="ruby-comment cmt"># 'directreports' list has no duplicate entries.</span>
|
|
2150
|
+
88: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'managers'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">manager</span><span class="ruby-operator">|</span>
|
|
2151
|
+
89: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">manager</span>[<span class="ruby-value str">'directreports'</span>, <span class="ruby-ivar">@scenarioIdx</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@property</span>)
|
|
2152
|
+
90: <span class="ruby-identifier">manager</span>[<span class="ruby-value str">'directreports'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator"><<</span> <span class="ruby-ivar">@property</span>
|
|
2153
|
+
91: <span class="ruby-keyword kw">end</span>
|
|
2154
|
+
92: <span class="ruby-keyword kw">end</span>
|
|
2155
|
+
93: <span class="ruby-keyword kw">end</span></pre>
|
|
2129
2156
|
</div>
|
|
2130
2157
|
|
|
2131
2158
|
</div>
|
|
@@ -2156,14 +2183,14 @@ The result is in working days (effort).
|
|
|
2156
2183
|
<div class="method-source-code"
|
|
2157
2184
|
id="set-eports-source">
|
|
2158
2185
|
<pre>
|
|
2159
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2186
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 95</span>
|
|
2187
|
+
95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setReports</span>
|
|
2188
|
+
96: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'directreports'</span>).<span class="ruby-identifier">empty?</span>
|
|
2189
|
+
97:
|
|
2190
|
+
98: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'managers'</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>
|
|
2191
|
+
99: <span class="ruby-identifier">r</span>.<span class="ruby-identifier">setReports_i</span>(<span class="ruby-ivar">@scenarioIdx</span>, [ <span class="ruby-ivar">@property</span> ])
|
|
2192
|
+
100: <span class="ruby-keyword kw">end</span>
|
|
2193
|
+
101: <span class="ruby-keyword kw">end</span></pre>
|
|
2167
2194
|
</div>
|
|
2168
2195
|
|
|
2169
2196
|
</div>
|
|
@@ -2194,22 +2221,22 @@ The result is in working days (effort).
|
|
|
2194
2221
|
<div class="method-source-code"
|
|
2195
2222
|
id="turnover-source">
|
|
2196
2223
|
<pre>
|
|
2197
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2224
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 449</span>
|
|
2225
|
+
449: <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">task</span> = <span class="ruby-keyword kw">nil</span>)
|
|
2226
|
+
450: <span class="ruby-identifier">amount</span> = <span class="ruby-value">0.0</span>
|
|
2227
|
+
451: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
2228
|
+
452: <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>
|
|
2229
|
+
453: <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>, <span class="ruby-identifier">task</span>)
|
|
2230
|
+
454: <span class="ruby-keyword kw">end</span>
|
|
2231
|
+
455: <span class="ruby-keyword kw">else</span>
|
|
2232
|
+
456: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duties'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">duty</span><span class="ruby-operator">|</span>
|
|
2233
|
+
457: <span class="ruby-identifier">amount</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">duty</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>,
|
|
2234
|
+
458: <span class="ruby-ivar">@property</span>)
|
|
2235
|
+
459: <span class="ruby-keyword kw">end</span>
|
|
2236
|
+
460: <span class="ruby-keyword kw">end</span>
|
|
2237
|
+
461:
|
|
2238
|
+
462: <span class="ruby-identifier">amount</span>
|
|
2239
|
+
463: <span class="ruby-keyword kw">end</span></pre>
|
|
2213
2240
|
</div>
|
|
2214
2241
|
|
|
2215
2242
|
</div>
|
|
@@ -2250,25 +2277,25 @@ nil only allocations to this tasks are respected.
|
|
|
2250
2277
|
<div class="method-source-code"
|
|
2251
2278
|
id="allocated-ub-source">
|
|
2252
2279
|
<pre>
|
|
2253
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2280
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 717</span>
|
|
2281
|
+
717: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">allocatedSub</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>)
|
|
2282
|
+
718: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
2283
|
+
719: <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">resource</span><span class="ruby-operator">|</span>
|
|
2284
|
+
720: <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">resource</span>.<span class="ruby-identifier">allocatedSub</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>,
|
|
2285
|
+
721: <span class="ruby-identifier">task</span>)
|
|
2286
|
+
722: <span class="ruby-keyword kw">end</span>
|
|
2287
|
+
723: <span class="ruby-keyword kw">else</span>
|
|
2288
|
+
724: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'duties'</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">task</span>)
|
|
2289
|
+
725:
|
|
2290
|
+
726: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span> = <span class="ruby-identifier">fitIndicies</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>)
|
|
2291
|
+
727: <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">startIdx</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">endIdx</span>
|
|
2292
|
+
728:
|
|
2293
|
+
729: <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>
|
|
2294
|
+
730: <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">@scoreboard</span>[<span class="ruby-identifier">idx</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">task</span>
|
|
2295
|
+
731: <span class="ruby-keyword kw">end</span>
|
|
2296
|
+
732: <span class="ruby-keyword kw">end</span>
|
|
2297
|
+
733: <span class="ruby-keyword kw">false</span>
|
|
2298
|
+
734: <span class="ruby-keyword kw">end</span></pre>
|
|
2272
2299
|
</div>
|
|
2273
2300
|
|
|
2274
2301
|
</div>
|
|
@@ -2303,22 +2330,22 @@ particular task.
|
|
|
2303
2330
|
<div class="method-source-code"
|
|
2304
2331
|
id="fit-ndicies-source">
|
|
2305
2332
|
<pre>
|
|
2306
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2333
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 673</span>
|
|
2334
|
+
673: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fitIndicies</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span> = <span class="ruby-keyword kw">nil</span>)
|
|
2335
|
+
674: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>
|
|
2336
|
+
675: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-operator">&&</span>
|
|
2337
|
+
676: <span class="ruby-identifier">startIdx</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>]
|
|
2338
|
+
677: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-operator">&&</span>
|
|
2339
|
+
678: <span class="ruby-identifier">endIdx</span> <span class="ruby-operator">></span>
|
|
2340
|
+
679: <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
2341
|
+
680: <span class="ruby-keyword kw">else</span>
|
|
2342
|
+
681: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@firstBookedSlot</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@firstBookedSlot</span> <span class="ruby-operator">&&</span>
|
|
2343
|
+
682: <span class="ruby-identifier">startIdx</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@firstBookedSlot</span>
|
|
2344
|
+
683: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@lastBookedSlot</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lastBookedSlot</span> <span class="ruby-operator">&&</span>
|
|
2345
|
+
684: <span class="ruby-identifier">endIdx</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@lastBookedSlot</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
2346
|
+
685: <span class="ruby-keyword kw">end</span>
|
|
2347
|
+
686: [ <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span> ]
|
|
2348
|
+
687: <span class="ruby-keyword kw">end</span></pre>
|
|
2322
2349
|
</div>
|
|
2323
2350
|
|
|
2324
2351
|
</div>
|
|
@@ -2349,67 +2376,67 @@ particular task.
|
|
|
2349
2376
|
<div class="method-source-code"
|
|
2350
2377
|
id="init-coreboard-source">
|
|
2351
2378
|
<pre>
|
|
2352
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
604: <span class="ruby-keyword kw">end</span>
|
|
2369
|
-
605:
|
|
2370
|
-
606: <span class="ruby-comment cmt"># Mark all resource specific vacation slots as such</span>
|
|
2371
|
-
607: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'vacations'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">vacation</span><span class="ruby-operator">|</span>
|
|
2372
|
-
608: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">start</span>, <span class="ruby-keyword kw">true</span>)
|
|
2373
|
-
609: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">end</span>, <span class="ruby-keyword kw">true</span>)
|
|
2374
|
-
610: <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">i</span><span class="ruby-operator">|</span>
|
|
2375
|
-
611: <span class="ruby-comment cmt"># If the slot is nil, we don't set the time-off bit.</span>
|
|
2376
|
-
612: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = (<span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">2</span>) <span class="ruby-operator">|</span> (<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-value">2</span>)
|
|
2377
|
-
613: <span class="ruby-keyword kw">end</span>
|
|
2378
|
-
614: <span class="ruby-keyword kw">end</span>
|
|
2379
|
-
615:
|
|
2380
|
-
616: <span class="ruby-comment cmt"># Mark all global vacation slots as such</span>
|
|
2381
|
-
617: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'vacations'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">vacation</span><span class="ruby-operator">|</span>
|
|
2382
|
-
618: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">start</span>, <span class="ruby-keyword kw">true</span>)
|
|
2383
|
-
619: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">end</span>, <span class="ruby-keyword kw">true</span>)
|
|
2384
|
-
620: <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">i</span><span class="ruby-operator">|</span>
|
|
2385
|
-
621: <span class="ruby-comment cmt"># If the slot is nil or set to 4 then don't set the time-off bit.</span>
|
|
2386
|
-
622: <span class="ruby-identifier">sb</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>]
|
|
2387
|
-
623: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = ((<span class="ruby-identifier">sb</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">sb</span> <span class="ruby-operator">==</span> <span class="ruby-value">4</span>) <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">2</span>) <span class="ruby-operator">|</span> (<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-value">2</span>)
|
|
2388
|
-
624: <span class="ruby-keyword kw">end</span>
|
|
2379
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 610</span>
|
|
2380
|
+
610: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initScoreboard</span>
|
|
2381
|
+
611: <span class="ruby-comment cmt"># Create scoreboard and mark all slots as unavailable</span>
|
|
2382
|
+
612: <span class="ruby-ivar">@scoreboard</span> = <span class="ruby-constant">Scoreboard</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>], <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>],
|
|
2383
|
+
613: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>], <span class="ruby-value">2</span>)
|
|
2384
|
+
614:
|
|
2385
|
+
615: <span class="ruby-comment cmt"># We'll need this frequently and can savely cache it here.</span>
|
|
2386
|
+
616: <span class="ruby-ivar">@shifts</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>)
|
|
2387
|
+
617: <span class="ruby-ivar">@workinghours</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'workinghours'</span>)
|
|
2388
|
+
618:
|
|
2389
|
+
619: <span class="ruby-comment cmt"># Change all work time slots to nil (available) again.</span>
|
|
2390
|
+
620: <span class="ruby-identifier">date</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-value">0</span>)
|
|
2391
|
+
621: <span class="ruby-identifier">delta</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
|
|
2392
|
+
622: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">scoreboardSize</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
2393
|
+
623: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
|
|
2394
|
+
624: <span class="ruby-identifier">date</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">delta</span>
|
|
2389
2395
|
625: <span class="ruby-keyword kw">end</span>
|
|
2390
2396
|
626:
|
|
2391
|
-
627: <span class="ruby-
|
|
2392
|
-
628:
|
|
2393
|
-
629: <span class="ruby-
|
|
2394
|
-
630:
|
|
2395
|
-
631:
|
|
2396
|
-
632: <span class="ruby-comment cmt"># the
|
|
2397
|
-
633: <span class="ruby-
|
|
2398
|
-
634:
|
|
2399
|
-
635:
|
|
2400
|
-
636:
|
|
2401
|
-
637:
|
|
2402
|
-
638:
|
|
2403
|
-
639:
|
|
2404
|
-
640:
|
|
2405
|
-
641:
|
|
2406
|
-
642:
|
|
2407
|
-
643:
|
|
2408
|
-
644:
|
|
2409
|
-
645:
|
|
2410
|
-
646:
|
|
2411
|
-
647:
|
|
2412
|
-
648:
|
|
2397
|
+
627: <span class="ruby-comment cmt"># Mark all resource specific vacation slots as such</span>
|
|
2398
|
+
628: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'vacations'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">vacation</span><span class="ruby-operator">|</span>
|
|
2399
|
+
629: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">start</span>, <span class="ruby-keyword kw">true</span>)
|
|
2400
|
+
630: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">end</span>, <span class="ruby-keyword kw">true</span>)
|
|
2401
|
+
631: <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">i</span><span class="ruby-operator">|</span>
|
|
2402
|
+
632: <span class="ruby-comment cmt"># If the slot is nil, we don't set the time-off bit.</span>
|
|
2403
|
+
633: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = (<span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">2</span>) <span class="ruby-operator">|</span> (<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-value">2</span>)
|
|
2404
|
+
634: <span class="ruby-keyword kw">end</span>
|
|
2405
|
+
635: <span class="ruby-keyword kw">end</span>
|
|
2406
|
+
636:
|
|
2407
|
+
637: <span class="ruby-comment cmt"># Mark all global vacation slots as such</span>
|
|
2408
|
+
638: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'vacations'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">vacation</span><span class="ruby-operator">|</span>
|
|
2409
|
+
639: <span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">start</span>, <span class="ruby-keyword kw">true</span>)
|
|
2410
|
+
640: <span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">vacation</span>.<span class="ruby-identifier">end</span>, <span class="ruby-keyword kw">true</span>)
|
|
2411
|
+
641: <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">i</span><span class="ruby-operator">|</span>
|
|
2412
|
+
642: <span class="ruby-comment cmt"># If the slot is nil or set to 4 then don't set the time-off bit.</span>
|
|
2413
|
+
643: <span class="ruby-identifier">sb</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>]
|
|
2414
|
+
644: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = ((<span class="ruby-identifier">sb</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">sb</span> <span class="ruby-operator">==</span> <span class="ruby-value">4</span>) <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">2</span>) <span class="ruby-operator">|</span> (<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-value">2</span>)
|
|
2415
|
+
645: <span class="ruby-keyword kw">end</span>
|
|
2416
|
+
646: <span class="ruby-keyword kw">end</span>
|
|
2417
|
+
647:
|
|
2418
|
+
648: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@shifts</span>.<span class="ruby-identifier">nil?</span>
|
|
2419
|
+
649: <span class="ruby-comment cmt"># Mark the vacations from all the shifts the resource is assigned to.</span>
|
|
2420
|
+
650: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">scoreboardSize</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
2421
|
+
651: <span class="ruby-identifier">v</span> = <span class="ruby-ivar">@shifts</span>.<span class="ruby-identifier">getSbSlot</span>(<span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">i</span>))
|
|
2422
|
+
652: <span class="ruby-comment cmt"># Check if the vacation replacement bit is set. In that case we copy</span>
|
|
2423
|
+
653: <span class="ruby-comment cmt"># the whole interval over to the resource scoreboard overriding any</span>
|
|
2424
|
+
654: <span class="ruby-comment cmt"># global vacations.</span>
|
|
2425
|
+
655: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">v</span> & (<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-value">8</span>)) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
2426
|
+
656: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">v</span> & <span class="ruby-value">0x3E</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
|
2427
|
+
657: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">nil</span>
|
|
2428
|
+
658: <span class="ruby-keyword kw">else</span>
|
|
2429
|
+
659: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">v</span> & <span class="ruby-value">0x3E</span>
|
|
2430
|
+
660: <span class="ruby-keyword kw">end</span>
|
|
2431
|
+
661: <span class="ruby-keyword kw">elsif</span> ((<span class="ruby-identifier">sbV</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>]).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">sbV</span> & <span class="ruby-value">0x3C</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>) <span class="ruby-operator">&&</span>
|
|
2432
|
+
662: (<span class="ruby-identifier">v</span> & <span class="ruby-value">0x3C</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
2433
|
+
663: <span class="ruby-comment cmt"># We only add the shift vacations but don't turn global vacation</span>
|
|
2434
|
+
664: <span class="ruby-comment cmt"># slots into working slots again.</span>
|
|
2435
|
+
665: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">v</span> & <span class="ruby-value">0x3E</span>
|
|
2436
|
+
666: <span class="ruby-keyword kw">end</span>
|
|
2437
|
+
667: <span class="ruby-keyword kw">end</span>
|
|
2438
|
+
668: <span class="ruby-keyword kw">end</span>
|
|
2439
|
+
669: <span class="ruby-keyword kw">end</span></pre>
|
|
2413
2440
|
</div>
|
|
2414
2441
|
|
|
2415
2442
|
</div>
|
|
@@ -2440,14 +2467,14 @@ particular task.
|
|
|
2440
2467
|
<div class="method-source-code"
|
|
2441
2468
|
id="on-hift--source">
|
|
2442
2469
|
<pre>
|
|
2443
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2470
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 706</span>
|
|
2471
|
+
706: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
|
|
2472
|
+
707: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@shifts</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@shifts</span>.<span class="ruby-identifier">assigned?</span>(<span class="ruby-identifier">date</span>)
|
|
2473
|
+
708: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@shifts</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
|
|
2474
|
+
709: <span class="ruby-keyword kw">else</span>
|
|
2475
|
+
710: <span class="ruby-ivar">@workinghours</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
|
|
2476
|
+
711: <span class="ruby-keyword kw">end</span>
|
|
2477
|
+
712: <span class="ruby-keyword kw">end</span></pre>
|
|
2451
2478
|
</div>
|
|
2452
2479
|
|
|
2453
2480
|
</div>
|
|
@@ -2480,18 +2507,18 @@ Return the daily cost of a resource or resource group.
|
|
|
2480
2507
|
<div class="method-source-code"
|
|
2481
2508
|
id="rate-source">
|
|
2482
2509
|
<pre>
|
|
2483
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2510
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 737</span>
|
|
2511
|
+
737: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rate</span>
|
|
2512
|
+
738: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
2513
|
+
739: <span class="ruby-identifier">dailyRate</span> = <span class="ruby-value">0.0</span>
|
|
2514
|
+
740: <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">resource</span><span class="ruby-operator">|</span>
|
|
2515
|
+
741: <span class="ruby-identifier">dailyRate</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">rate</span>(<span class="ruby-ivar">@scenarioIdx</span>)
|
|
2516
|
+
742: <span class="ruby-keyword kw">end</span>
|
|
2517
|
+
743: <span class="ruby-identifier">dailyRate</span>
|
|
2518
|
+
744: <span class="ruby-keyword kw">else</span>
|
|
2519
|
+
745: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'rate'</span>)
|
|
2520
|
+
746: <span class="ruby-keyword kw">end</span>
|
|
2521
|
+
747: <span class="ruby-keyword kw">end</span></pre>
|
|
2495
2522
|
</div>
|
|
2496
2523
|
|
|
2497
2524
|
</div>
|
|
@@ -2522,23 +2549,23 @@ Return the daily cost of a resource or resource group.
|
|
|
2522
2549
|
<div class="method-source-code"
|
|
2523
2550
|
id="set-eports-i-source">
|
|
2524
2551
|
<pre>
|
|
2525
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2552
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 689</span>
|
|
2553
|
+
689: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setReports_i</span>(<span class="ruby-identifier">reports</span>)
|
|
2554
|
+
690: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">reports</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@property</span>)
|
|
2555
|
+
691: <span class="ruby-comment cmt"># A manager must never show up in the list of his/her own reports.</span>
|
|
2556
|
+
692: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'manager_loop'</span>,
|
|
2557
|
+
693: <span class="ruby-node">"Management loop detected. #{@property.fullId} has self "</span> <span class="ruby-operator">+</span>
|
|
2558
|
+
694: <span class="ruby-value str">"in list of reports"</span>)
|
|
2559
|
+
695: <span class="ruby-keyword kw">end</span>
|
|
2560
|
+
696: <span class="ruby-ivar">@property</span>[<span class="ruby-value str">'reports'</span>, <span class="ruby-ivar">@scenarioIdx</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">reports</span>
|
|
2561
|
+
697: <span class="ruby-comment cmt"># Resources can end up multiple times in the list if they have multiple</span>
|
|
2562
|
+
698: <span class="ruby-comment cmt"># reporting chains. We only need them once in the list.</span>
|
|
2563
|
+
699: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'reports'</span>).<span class="ruby-identifier">uniq!</span>
|
|
2564
|
+
700:
|
|
2565
|
+
701: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'managers'</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>
|
|
2566
|
+
702: <span class="ruby-identifier">r</span>.<span class="ruby-identifier">setReports_i</span>(<span class="ruby-ivar">@scenarioIdx</span>, <span class="ruby-identifier">a</span>(<span class="ruby-value str">'reports'</span>))
|
|
2567
|
+
703: <span class="ruby-keyword kw">end</span>
|
|
2568
|
+
704: <span class="ruby-keyword kw">end</span></pre>
|
|
2542
2569
|
</div>
|
|
2543
2570
|
|
|
2544
2571
|
</div>
|