taskjuggler 0.0.7 → 0.0.8
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 +119 -0
- data/benchmarks/allocatedSlots.tjp +1602 -0
- data/benchmarks/booking.tjp +40 -30
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/css/tjmanual.css +0 -0
- data/{test/TestSuite/Scheduler/Correct → benchmarks}/css/tjreport.css +1 -0
- data/benchmarks/gantt.tjp +57 -0
- data/benchmarks/htmltaskreport.tjp +26 -1
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/details.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/flag-green.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/flag-red.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/flag-yellow.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/resource.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/resourcegroup.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/task.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/taskgroup.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/trend-down.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/trend-flat.png +0 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/icons/trend-up.png +0 -0
- data/benchmarks/profile.clt +36082 -0
- data/benchmarks/profile.html +58182 -0
- data/benchmarks/runbench.rb +6 -0
- data/{test/TestSuite/ReportGenerator/Errors → benchmarks}/scripts/wz_tooltip.js +0 -0
- data/doc/AppConfig.html +85 -37
- data/doc/Arguments.html +11 -1
- data/doc/CHANGELOG.html +131 -2
- data/doc/COPYING.html +11 -1
- data/doc/Object.html +12 -3
- data/doc/README.html +11 -1
- data/doc/RuntimeConfig.html +11 -1
- data/doc/String.html +11 -1
- data/doc/StringIO.html +11 -1
- data/doc/TaskJuggler.html +250 -219
- data/doc/TaskJuggler/Account.html +11 -1
- data/doc/TaskJuggler/AccountAttribute.html +11 -1
- data/doc/TaskJuggler/AccountScenario.html +11 -1
- data/doc/TaskJuggler/Allocation.html +11 -1
- data/doc/TaskJuggler/AllocationAttribute.html +11 -1
- data/doc/TaskJuggler/AttributeBase.html +11 -1
- data/doc/TaskJuggler/AttributeDefinition.html +11 -1
- data/doc/TaskJuggler/BatchProcessor.html +11 -1
- data/doc/TaskJuggler/Booking.html +11 -1
- data/doc/TaskJuggler/BookingListAttribute.html +11 -1
- data/doc/TaskJuggler/BooleanAttribute.html +11 -1
- data/doc/TaskJuggler/CSVFile.html +12 -2
- data/doc/TaskJuggler/CellSettingPattern.html +11 -1
- data/doc/TaskJuggler/CellSettingPatternList.html +11 -1
- data/doc/TaskJuggler/Charge.html +11 -1
- data/doc/TaskJuggler/ChargeListAttribute.html +11 -1
- data/doc/TaskJuggler/ChargeSet.html +11 -1
- data/doc/TaskJuggler/ChargeSetListAttribute.html +11 -1
- data/doc/TaskJuggler/CollisionDetector.html +1063 -0
- data/doc/TaskJuggler/ColumnListAttribute.html +11 -1
- data/doc/TaskJuggler/ColumnTable.html +11 -1
- data/doc/TaskJuggler/Daemon.html +11 -1
- data/doc/TaskJuggler/{OnShiftCache.html → DataCache.html} +127 -139
- data/doc/TaskJuggler/DataCacheEntry.html +711 -0
- data/doc/TaskJuggler/DateAttribute.html +11 -1
- data/doc/TaskJuggler/DefinitionListAttribute.html +11 -1
- data/doc/TaskJuggler/DependencyListAttribute.html +11 -1
- data/doc/TaskJuggler/DurationAttribute.html +16 -5
- data/doc/TaskJuggler/FileList.html +11 -1
- data/doc/TaskJuggler/FileRecord.html +11 -1
- data/doc/TaskJuggler/FixnumAttribute.html +19 -9
- data/doc/TaskJuggler/FlagListAttribute.html +29 -19
- data/doc/TaskJuggler/FloatAttribute.html +23 -13
- data/doc/TaskJuggler/FormatListAttribute.html +19 -9
- data/doc/TaskJuggler/GanttChart.html +94 -133
- data/doc/TaskJuggler/GanttContainer.html +11 -1
- data/doc/TaskJuggler/GanttHeader.html +11 -1
- data/doc/TaskJuggler/GanttHeaderScaleItem.html +11 -1
- data/doc/TaskJuggler/GanttLine.html +11 -1
- data/doc/TaskJuggler/GanttLoadStack.html +11 -1
- data/doc/TaskJuggler/GanttMilestone.html +11 -1
- data/doc/TaskJuggler/GanttRouter.html +247 -596
- data/doc/TaskJuggler/GanttTaskBar.html +11 -1
- data/doc/TaskJuggler/HTMLDocument.html +11 -1
- data/doc/TaskJuggler/HTMLGraphics.html +11 -1
- data/doc/TaskJuggler/Interval.html +11 -1
- data/doc/TaskJuggler/IntervalListAttribute.html +33 -23
- data/doc/TaskJuggler/JobInfo.html +11 -1
- data/doc/TaskJuggler/Journal.html +11 -1
- data/doc/TaskJuggler/JournalEntry.html +11 -1
- data/doc/TaskJuggler/JournalEntryList.html +11 -1
- data/doc/TaskJuggler/KeywordArray.html +11 -1
- data/doc/TaskJuggler/KeywordDocumentation.html +16 -6
- data/doc/TaskJuggler/Limits.html +11 -1
- data/doc/TaskJuggler/Limits/Limit.html +11 -1
- data/doc/TaskJuggler/LimitsAttribute.html +24 -14
- data/doc/TaskJuggler/ListAttributeBase.html +11 -1
- data/doc/TaskJuggler/Log.html +11 -1
- data/doc/TaskJuggler/LogFile.html +11 -1
- data/doc/TaskJuggler/LogicalAttribute.html +11 -1
- data/doc/TaskJuggler/LogicalExpression.html +11 -1
- data/doc/TaskJuggler/LogicalExpressionAttribute.html +19 -9
- data/doc/TaskJuggler/LogicalFlag.html +11 -1
- data/doc/TaskJuggler/LogicalFunction.html +11 -1
- data/doc/TaskJuggler/LogicalOperation.html +11 -1
- data/doc/TaskJuggler/Macro.html +11 -1
- data/doc/TaskJuggler/MacroTable.html +11 -1
- data/doc/TaskJuggler/ManagerResponsibilities.html +11 -1
- data/doc/TaskJuggler/ManagerStatusRecord.html +11 -1
- data/doc/TaskJuggler/Message.html +11 -1
- data/doc/TaskJuggler/MessageHandler.html +11 -1
- data/doc/TaskJuggler/Navigator.html +12 -2
- data/doc/TaskJuggler/NavigatorElement.html +11 -1
- data/doc/TaskJuggler/NikuProject.html +11 -1
- data/doc/TaskJuggler/NikuReport.html +11 -1
- data/doc/TaskJuggler/NikuResource.html +11 -1
- data/doc/TaskJuggler/NodeListAttribute.html +17 -7
- data/doc/TaskJuggler/PlaceHolderCell.html +722 -0
- data/doc/TaskJuggler/ProcessIntercom.html +11 -1
- data/doc/TaskJuggler/ProcessIntercomIface.html +11 -1
- data/doc/TaskJuggler/Project.html +587 -500
- data/doc/TaskJuggler/ProjectBroker.html +11 -1
- data/doc/TaskJuggler/ProjectBrokerIface.html +11 -1
- data/doc/TaskJuggler/ProjectFileParser.html +205 -192
- data/doc/TaskJuggler/ProjectFileScanner.html +230 -207
- data/doc/TaskJuggler/ProjectRecord.html +11 -1
- data/doc/TaskJuggler/ProjectServer.html +11 -1
- data/doc/TaskJuggler/ProjectServerIface.html +11 -1
- data/doc/TaskJuggler/PropertyAttribute.html +19 -9
- data/doc/TaskJuggler/PropertyList.html +95 -83
- data/doc/TaskJuggler/PropertySet.html +11 -1
- data/doc/TaskJuggler/PropertyTreeNode.html +11 -1
- data/doc/TaskJuggler/Query.html +234 -232
- data/doc/TaskJuggler/RTFHandlers.html +11 -1
- data/doc/TaskJuggler/RTFNavigator.html +11 -1
- data/doc/TaskJuggler/RTFQuery.html +11 -1
- data/doc/TaskJuggler/RTFReport.html +11 -1
- data/doc/TaskJuggler/RTFReportLink.html +11 -1
- data/doc/TaskJuggler/RTFWithQuerySupport.html +11 -1
- data/doc/TaskJuggler/RealFormat.html +12 -2
- data/doc/TaskJuggler/RealFormatAttribute.html +15 -5
- data/doc/TaskJuggler/ReferenceAttribute.html +38 -28
- data/doc/TaskJuggler/Report.html +96 -113
- data/doc/TaskJuggler/ReportBase.html +161 -152
- data/doc/TaskJuggler/ReportContext.html +11 -1
- data/doc/TaskJuggler/ReportServer.html +59 -48
- data/doc/TaskJuggler/ReportServerIface.html +51 -41
- data/doc/TaskJuggler/ReportServerRecord.html +11 -1
- data/doc/TaskJuggler/ReportServlet.html +11 -1
- data/doc/TaskJuggler/ReportTable.html +46 -25
- data/doc/TaskJuggler/ReportTableCell.html +296 -275
- data/doc/TaskJuggler/ReportTableColumn.html +14 -4
- data/doc/TaskJuggler/ReportTableLegend.html +11 -1
- data/doc/TaskJuggler/ReportTableLine.html +19 -7
- data/doc/TaskJuggler/Resource.html +12 -2
- data/doc/TaskJuggler/ResourceListAttribute.html +40 -30
- data/doc/TaskJuggler/ResourceListRE.html +11 -1
- data/doc/TaskJuggler/ResourceScenario.html +708 -565
- data/doc/TaskJuggler/RichText.html +54 -36
- data/doc/TaskJuggler/RichTextAttribute.html +31 -21
- data/doc/TaskJuggler/RichTextDocument.html +11 -1
- data/doc/TaskJuggler/RichTextElement.html +11 -1
- data/doc/TaskJuggler/RichTextFunctionExample.html +11 -1
- data/doc/TaskJuggler/RichTextFunctionHandler.html +11 -1
- data/doc/TaskJuggler/RichTextImage.html +11 -1
- data/doc/TaskJuggler/RichTextIntermediate.html +81 -71
- data/doc/TaskJuggler/RichTextParser.html +88 -33
- data/doc/TaskJuggler/RichTextScanner.html +45 -35
- data/doc/TaskJuggler/RichTextSnip.html +11 -1
- data/doc/TaskJuggler/RichTextSyntaxRules.html +436 -389
- data/doc/TaskJuggler/Scenario.html +11 -1
- data/doc/TaskJuggler/ScenarioData.html +11 -1
- data/doc/TaskJuggler/ScenarioListAttribute.html +23 -13
- data/doc/TaskJuggler/Scoreboard.html +92 -73
- data/doc/TaskJuggler/SheetHandlerBase.html +11 -1
- data/doc/TaskJuggler/SheetReceiver.html +11 -1
- data/doc/TaskJuggler/SheetSender.html +11 -1
- data/doc/TaskJuggler/Shift.html +11 -1
- data/doc/TaskJuggler/ShiftAssignment.html +11 -1
- data/doc/TaskJuggler/ShiftAssignments.html +11 -1
- data/doc/TaskJuggler/ShiftAssignmentsAttribute.html +24 -14
- data/doc/TaskJuggler/ShiftScenario.html +11 -1
- data/doc/TaskJuggler/SimpleQueryExpander.html +11 -1
- data/doc/TaskJuggler/SortListAttribute.html +21 -11
- data/doc/TaskJuggler/SourceFileInfo.html +11 -1
- data/doc/TaskJuggler/StatusSheetReceiver.html +11 -1
- data/doc/TaskJuggler/StatusSheetReport.html +11 -1
- data/doc/TaskJuggler/StatusSheetSender.html +112 -11
- data/doc/TaskJuggler/StringAttribute.html +23 -13
- data/doc/TaskJuggler/SymbolAttribute.html +19 -9
- data/doc/TaskJuggler/SyntaxReference.html +80 -71
- data/doc/TaskJuggler/TOCEntry.html +11 -1
- data/doc/TaskJuggler/TSResourceRecord.html +11 -1
- data/doc/TaskJuggler/TSTaskRecord.html +11 -1
- data/doc/TaskJuggler/TableColumnDefinition.html +11 -1
- data/doc/TaskJuggler/TableOfContents.html +11 -1
- data/doc/TaskJuggler/TableReport.html +422 -411
- data/doc/TaskJuggler/Task.html +11 -1
- data/doc/TaskJuggler/TaskDependency.html +11 -1
- data/doc/TaskJuggler/TaskListAttribute.html +33 -23
- data/doc/TaskJuggler/TaskListRE.html +11 -1
- data/doc/TaskJuggler/TaskScenario.html +2007 -1919
- data/doc/TaskJuggler/TextFormatter.html +11 -1
- data/doc/TaskJuggler/TextParser.html +421 -612
- data/doc/TaskJuggler/TextParser/Pattern.html +410 -211
- data/doc/TaskJuggler/TextParser/Rule.html +224 -152
- data/doc/TaskJuggler/TextParser/StackElement.html +190 -28
- data/doc/TaskJuggler/TextParser/State.html +989 -0
- data/doc/TaskJuggler/TextParser/StateTransition.html +782 -0
- data/doc/TaskJuggler/TextParser/TextParserResultArray.html +25 -14
- data/doc/TaskJuggler/TextParser/TokenDoc.html +11 -1
- data/doc/TaskJuggler/TextReport.html +11 -1
- data/doc/TaskJuggler/TextScanner.html +285 -273
- data/doc/TaskJuggler/TextScanner/BufferStreamHandle.html +17 -7
- data/doc/TaskJuggler/TextScanner/FileStreamHandle.html +24 -14
- data/doc/TaskJuggler/TextScanner/MacroStackEntry.html +11 -1
- data/doc/TaskJuggler/TextScanner/StreamHandle.html +64 -52
- data/doc/TaskJuggler/TimeSheet.html +11 -1
- data/doc/TaskJuggler/TimeSheetReceiver.html +11 -1
- data/doc/TaskJuggler/TimeSheetRecord.html +11 -1
- data/doc/TaskJuggler/TimeSheetReport.html +11 -1
- data/doc/TaskJuggler/TimeSheetSender.html +11 -1
- data/doc/TaskJuggler/TimeSheetSummary.html +11 -1
- data/doc/TaskJuggler/TimeSheets.html +11 -1
- data/doc/TaskJuggler/Tj3AppBase.html +11 -1
- data/doc/TaskJuggler/Tj3Client.html +11 -1
- data/doc/TaskJuggler/Tj3Daemon.html +11 -1
- data/doc/TaskJuggler/Tj3SheetAppBase.html +11 -1
- data/doc/TaskJuggler/Tj3SsReceiver.html +11 -1
- data/doc/TaskJuggler/Tj3SsSender.html +11 -1
- data/doc/TaskJuggler/Tj3TsReceiver.html +11 -1
- data/doc/TaskJuggler/Tj3TsSender.html +11 -1
- data/doc/TaskJuggler/Tj3TsSummary.html +11 -1
- data/doc/TaskJuggler/TjException.html +11 -1
- data/doc/TaskJuggler/TjTime.html +474 -324
- data/doc/TaskJuggler/TjpExample.html +11 -1
- data/doc/TaskJuggler/TjpExportRE.html +11 -1
- data/doc/TaskJuggler/TjpSyntaxRules.html +3731 -3662
- data/doc/TaskJuggler/URLParameter.html +11 -1
- data/doc/TaskJuggler/UserManual.html +11 -1
- data/doc/TaskJuggler/VimSyntax.html +11 -1
- data/doc/TaskJuggler/WebServer.html +11 -1
- data/doc/TaskJuggler/WorkingHours.html +295 -221
- data/doc/TaskJuggler/WorkingHoursAttribute.html +11 -1
- data/doc/TaskJuggler/XMLBlob.html +11 -1
- data/doc/TaskJuggler/XMLComment.html +11 -1
- data/doc/TaskJuggler/XMLDocument.html +11 -1
- data/doc/TaskJuggler/XMLElement.html +11 -1
- data/doc/TaskJuggler/XMLNamedText.html +11 -1
- data/doc/TaskJuggler/XMLText.html +11 -1
- data/doc/index.html +694 -624
- data/doc/lib/AppConfig_rb.html +1 -1
- data/doc/lib/Attributes_rb.html +1 -1
- data/doc/lib/Booking_rb.html +1 -1
- data/doc/lib/DataCache_rb.html +69 -0
- data/doc/lib/KeywordDocumentation_rb.html +1 -1
- data/doc/lib/ProjectFileParser_rb.html +1 -1
- data/doc/lib/ProjectFileScanner_rb.html +1 -1
- data/doc/lib/Project_rb.html +1 -1
- data/doc/lib/PropertyList_rb.html +1 -1
- data/doc/lib/Query_rb.html +1 -1
- data/doc/lib/RealFormat_rb.html +1 -1
- data/doc/lib/ResourceScenario_rb.html +1 -1
- data/doc/lib/Resource_rb.html +1 -1
- data/doc/lib/RichTextParser_rb.html +1 -1
- data/doc/lib/RichTextScanner_rb.html +1 -1
- data/doc/lib/RichTextSyntaxRules_rb.html +1 -1
- data/doc/lib/RichText_rb.html +1 -1
- data/doc/lib/Scoreboard_rb.html +1 -1
- data/doc/lib/StatusSheetSender_rb.html +1 -1
- data/doc/lib/SyntaxReference_rb.html +1 -1
- data/doc/lib/TaskJuggler_rb.html +1 -1
- data/doc/lib/TaskScenario_rb.html +3 -1
- data/doc/lib/TextParser/Pattern_rb.html +3 -1
- data/doc/lib/TextParser/Rule_rb.html +3 -1
- data/doc/lib/TextParser/StackElement_rb.html +3 -1
- data/doc/lib/TextParser/State_rb.html +65 -0
- data/doc/lib/TextParser_rb.html +1 -1
- data/doc/lib/TextScanner_rb.html +1 -1
- data/doc/lib/Tj3Config_rb.html +1 -1
- data/doc/lib/TjTime_rb.html +1 -1
- data/doc/lib/TjpSyntaxRules_rb.html +1 -1
- data/doc/lib/WorkingHours_rb.html +3 -1
- data/doc/lib/daemon/ReportServer_rb.html +1 -1
- data/doc/lib/reports/CSVFile_rb.html +1 -1
- data/doc/lib/reports/CollisionDetector_rb.html +67 -0
- data/doc/lib/reports/GanttChart_rb.html +1 -1
- data/doc/lib/reports/GanttRouter_rb.html +3 -1
- data/doc/lib/reports/Navigator_rb.html +1 -1
- data/doc/lib/reports/ReportBase_rb.html +1 -1
- data/doc/lib/reports/ReportTableCell_rb.html +1 -1
- data/doc/lib/reports/ReportTableColumn_rb.html +1 -1
- data/doc/lib/reports/ReportTableLine_rb.html +1 -1
- data/doc/lib/reports/ReportTable_rb.html +1 -1
- data/doc/lib/reports/Report_rb.html +1 -1
- data/doc/lib/reports/TableReport_rb.html +1 -1
- data/doc/lib/taskjuggler3_rb.html +1 -1
- data/examples/tutorial.tjp +1 -2
- data/lib/AppConfig.rb +10 -4
- data/lib/Attributes.rb +4 -4
- data/lib/DataCache.rb +124 -0
- data/lib/KeywordDocumentation.rb +5 -5
- data/lib/Project.rb +54 -10
- data/lib/ProjectFileParser.rb +10 -9
- data/lib/ProjectFileScanner.rb +38 -25
- data/lib/PropertyList.rb +6 -4
- data/lib/Query.rb +0 -8
- data/lib/RealFormat.rb +1 -1
- data/lib/Resource.rb +1 -1
- data/lib/ResourceScenario.rb +96 -31
- data/lib/RichText.rb +17 -5
- data/lib/RichTextParser.rb +22 -9
- data/lib/RichTextScanner.rb +34 -34
- data/lib/RichTextSyntaxRules.rb +41 -36
- data/lib/Scoreboard.rb +16 -7
- data/lib/StatusSheetSender.rb +63 -0
- data/lib/SyntaxReference.rb +9 -10
- data/lib/TaskJuggler.rb +28 -4
- data/lib/TaskScenario.rb +66 -19
- data/lib/TextParser.rb +219 -384
- data/lib/TextParser/Pattern.rb +168 -49
- data/lib/TextParser/Rule.rb +33 -17
- data/lib/TextParser/StackElement.rb +42 -2
- data/lib/TextParser/State.rb +175 -0
- data/lib/TextScanner.rb +19 -15
- data/lib/Tj3Config.rb +1 -1
- data/lib/TjTime.rb +111 -3
- data/lib/TjpSyntaxRules.rb +122 -66
- data/lib/WorkingHours.rb +91 -186
- data/lib/daemon/ReportServer.rb +3 -2
- data/lib/reports/CSVFile.rb +1 -1
- data/lib/reports/CollisionDetector.rb +177 -0
- data/lib/reports/GanttChart.rb +25 -41
- data/lib/reports/GanttRouter.rb +104 -233
- data/lib/reports/Navigator.rb +1 -1
- data/lib/reports/Report.rb +9 -33
- data/lib/reports/ReportBase.rb +0 -1
- data/lib/reports/ReportTable.rb +19 -8
- data/lib/reports/ReportTableCell.rb +61 -25
- data/lib/reports/ReportTableColumn.rb +2 -2
- data/lib/reports/ReportTableLine.rb +4 -2
- data/lib/reports/TableReport.rb +1 -0
- data/lib/taskjuggler3.rb +0 -1
- data/manual/Installation +7 -3
- data/manual/Intro +12 -10
- data/manual/The_TaskJuggler_Syntax +4 -4
- data/test/TestSuite/CSV-Reports/celltext-Reference.csv +14 -14
- data/test/TestSuite/CSV-Reports/genrefs +1 -1
- data/test/TestSuite/CSV-Reports/resourcereport-Reference.csv +4 -4
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks-Reference.csv +22 -22
- data/test/TestSuite/CSV-Reports/sortByTree-Reference.csv +14 -14
- data/test/TestSuite/CSV-Reports/sortBy_duration.down-Reference.csv +14 -14
- data/test/TestSuite/CSV-Reports/sortBy_effort.up-Reference.csv +14 -14
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down-Reference.csv +14 -14
- data/test/TestSuite/CSV-Reports/taskreport-Reference.csv +14 -14
- data/test/TestSuite/CSV-Reports/taskreport_with_resources-Reference.csv +32 -24
- data/test/TestSuite/CSV-Reports/weekly-Reference.csv +13 -0
- data/test/TestSuite/CSV-Reports/weekly.tjp +9 -0
- data/test/TestSuite/HTML-Reports/css/tjreport.css +7 -2
- data/test/TestSuite/HTML-Reports/depArrows.html +839 -830
- data/test/TestSuite/HTML-Reports/depArrows.tjp +12 -12
- data/test/TestSuite/HTML-Reports/profile.html +37581 -0
- data/test/TestSuite/ReportGenerator/Errors/no_report_defined.tjp +7 -0
- data/test/TestSuite/ReportGenerator/Errors/rtp_report_recursion.tjp +1 -1
- data/test/TestSuite/StatusSheets/TimeSheets/2002-03-01/missing-reports +2 -0
- data/test/TestSuite/StatusSheets/run +2 -0
- data/test/TestSuite/Syntax/Correct/Booking.tjp +13 -5
- data/test/TestSuite/Syntax/Correct/ResourceRoot.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/RollupResource.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/empty.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/include_before_project.tjp +2 -0
- data/test/TestSuite/Syntax/Errors/no_reduce.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/unsupported_token.tjp +1 -1
- data/test/TestSuite/TimeSheets/run +1 -1
- data/test/test_CSV-Reports.rb +2 -4
- data/test/test_CollisionDetector.rb +85 -0
- data/test/test_Project.rb +2 -2
- data/test/test_ProjectFileScanner.rb +73 -31
- data/test/test_Query.rb +2 -2
- data/test/test_ReportGenerator.rb +1 -1
- data/test/test_RichText.rb +4 -4
- data/test/test_WorkingHours.rb +150 -11
- metadata +75 -67
- data/test/TestSuite/ReportGenerator/Errors/css/tjreport.css +0 -407
- data/test/TestSuite/ReportGenerator/Errors/rtp_report_recursion.html +0 -26
- data/test/TestSuite/Scheduler/Correct/Allocate.html +0 -3210
- data/test/TestSuite/Scheduler/Correct/Container.html +0 -349
- data/test/TestSuite/Scheduler/Correct/Limits.html +0 -4964
- data/test/TestSuite/Scheduler/Correct/Shift.html +0 -1719
- data/test/TestSuite/Scheduler/Correct/Shift2.html +0 -476
- data/test/TestSuite/Scheduler/Correct/css/tjmanual.css +0 -66
- data/test/TestSuite/Scheduler/Correct/icons/details.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/resource.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/resourcegroup.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/task.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/taskgroup.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-down.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-flat.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-up.png +0 -0
- data/test/TestSuite/Scheduler/Correct/scripts/wz_tooltip.js +0 -1301
- data/test/TestSuite/Scheduler/Errors/css/tjmanual.css +0 -66
- data/test/TestSuite/Scheduler/Errors/css/tjreport.css +0 -407
- data/test/TestSuite/Scheduler/Errors/icons/details.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/flag-green.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/flag-red.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/flag-yellow.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/resource.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/resourcegroup.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/task.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/taskgroup.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/trend-down.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/trend-flat.png +0 -0
- data/test/TestSuite/Scheduler/Errors/icons/trend-up.png +0 -0
- data/test/TestSuite/Scheduler/Errors/scripts/wz_tooltip.js +0 -1301
- data/test/TestSuite/StatusSheets/resrep.tji +0 -7
- data/test/TestSuite/StatusSheets/tj3d.log +0 -312
- data/test/TestSuite/Syntax/Correct/Managers.html +0 -263
- data/test/TestSuite/TimeSheets/acceptable_intervals +0 -1
- data/test/TestSuite/TimeSheets/statussheets.log +0 -1
|
@@ -155,12 +155,18 @@
|
|
|
155
155
|
|
|
156
156
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
157
157
|
|
|
158
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
159
|
+
|
|
158
160
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
159
161
|
|
|
160
162
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
161
163
|
|
|
162
164
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
163
165
|
|
|
166
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
167
|
+
|
|
168
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
169
|
+
|
|
164
170
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
165
171
|
|
|
166
172
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -267,7 +273,7 @@
|
|
|
267
273
|
|
|
268
274
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
269
275
|
|
|
270
|
-
<li><a href="../TaskJuggler/
|
|
276
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
271
277
|
|
|
272
278
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
273
279
|
|
|
@@ -447,6 +453,10 @@
|
|
|
447
453
|
|
|
448
454
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
449
455
|
|
|
456
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
457
|
+
|
|
458
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
459
|
+
|
|
450
460
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
451
461
|
|
|
452
462
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -758,7 +768,7 @@ Return the mininum required width for the column.
|
|
|
758
768
|
<div class="method-heading">
|
|
759
769
|
|
|
760
770
|
<span class="method-name">to_csv</span><span
|
|
761
|
-
class="method-args">(csv)</span>
|
|
771
|
+
class="method-args">(csv, startColumn)</span>
|
|
762
772
|
<span class="method-click-advice">click to toggle source</span>
|
|
763
773
|
|
|
764
774
|
</div>
|
|
@@ -777,9 +787,9 @@ Array holds the Arrays representing the lines.
|
|
|
777
787
|
id="to-csv-source">
|
|
778
788
|
<pre>
|
|
779
789
|
<span class="ruby-comment cmt"># File lib/reports/ReportTableColumn.rb, line 74</span>
|
|
780
|
-
74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_csv</span>(<span class="ruby-identifier">csv</span>)
|
|
790
|
+
74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_csv</span>(<span class="ruby-identifier">csv</span>, <span class="ruby-identifier">startColumn</span>)
|
|
781
791
|
75: <span class="ruby-comment cmt"># For CSV reports we can only include the first header line.</span>
|
|
782
|
-
76: <span class="ruby-ivar">@cell1</span>.<span class="ruby-identifier">to_csv</span>(<span class="ruby-identifier">csv</span>)
|
|
792
|
+
76: <span class="ruby-ivar">@cell1</span>.<span class="ruby-identifier">to_csv</span>(<span class="ruby-identifier">csv</span>, <span class="ruby-identifier">startColumn</span>, <span class="ruby-value">0</span>)
|
|
783
793
|
77: <span class="ruby-keyword kw">end</span></pre>
|
|
784
794
|
</div>
|
|
785
795
|
|
|
@@ -163,12 +163,18 @@
|
|
|
163
163
|
|
|
164
164
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
165
165
|
|
|
166
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
167
|
+
|
|
166
168
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
167
169
|
|
|
168
170
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
169
171
|
|
|
170
172
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
171
173
|
|
|
174
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
175
|
+
|
|
176
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
177
|
+
|
|
172
178
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
173
179
|
|
|
174
180
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -275,7 +281,7 @@
|
|
|
275
281
|
|
|
276
282
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
277
283
|
|
|
278
|
-
<li><a href="../TaskJuggler/
|
|
284
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
279
285
|
|
|
280
286
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
281
287
|
|
|
@@ -455,6 +461,10 @@
|
|
|
455
461
|
|
|
456
462
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
457
463
|
|
|
464
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
465
|
+
|
|
466
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
467
|
+
|
|
458
468
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
459
469
|
|
|
460
470
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -159,12 +159,18 @@
|
|
|
159
159
|
|
|
160
160
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
161
161
|
|
|
162
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
163
|
+
|
|
162
164
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
163
165
|
|
|
164
166
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
165
167
|
|
|
166
168
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
167
169
|
|
|
170
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
171
|
+
|
|
172
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
173
|
+
|
|
168
174
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
169
175
|
|
|
170
176
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -271,7 +277,7 @@
|
|
|
271
277
|
|
|
272
278
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
273
279
|
|
|
274
|
-
<li><a href="../TaskJuggler/
|
|
280
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
275
281
|
|
|
276
282
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
277
283
|
|
|
@@ -451,6 +457,10 @@
|
|
|
451
457
|
|
|
452
458
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
453
459
|
|
|
460
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
461
|
+
|
|
462
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
463
|
+
|
|
454
464
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
455
465
|
|
|
456
466
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -931,7 +941,7 @@ Return the scope property or nil
|
|
|
931
941
|
<div class="method-heading">
|
|
932
942
|
|
|
933
943
|
<span class="method-name">to_csv</span><span
|
|
934
|
-
class="method-args">(csv)</span>
|
|
944
|
+
class="method-args">(csv, startColumn, lineIdx)</span>
|
|
935
945
|
<span class="method-click-advice">click to toggle source</span>
|
|
936
946
|
|
|
937
947
|
</div>
|
|
@@ -949,11 +959,13 @@ every column cell of this line.
|
|
|
949
959
|
id="to-csv-source">
|
|
950
960
|
<pre>
|
|
951
961
|
<span class="ruby-comment cmt"># File lib/reports/ReportTableLine.rb, line 86</span>
|
|
952
|
-
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_csv</span>(<span class="ruby-identifier">csv</span>)
|
|
953
|
-
87: <span class="ruby-
|
|
954
|
-
88:
|
|
955
|
-
89:
|
|
956
|
-
90:
|
|
962
|
+
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_csv</span>(<span class="ruby-identifier">csv</span>, <span class="ruby-identifier">startColumn</span>, <span class="ruby-identifier">lineIdx</span>)
|
|
963
|
+
87: <span class="ruby-identifier">columnIdx</span> = <span class="ruby-identifier">startColumn</span>
|
|
964
|
+
88: <span class="ruby-ivar">@cells</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cell</span><span class="ruby-operator">|</span>
|
|
965
|
+
89: <span class="ruby-identifier">columnIdx</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">to_csv</span>(<span class="ruby-identifier">csv</span>, <span class="ruby-identifier">columnIdx</span>, <span class="ruby-identifier">lineIdx</span>)
|
|
966
|
+
90: <span class="ruby-keyword kw">end</span>
|
|
967
|
+
91: <span class="ruby-identifier">columnIdx</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">startColumn</span>
|
|
968
|
+
92: <span class="ruby-keyword kw">end</span></pre>
|
|
957
969
|
</div>
|
|
958
970
|
|
|
959
971
|
</div>
|
|
@@ -159,12 +159,18 @@
|
|
|
159
159
|
|
|
160
160
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
161
161
|
|
|
162
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
163
|
+
|
|
162
164
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
163
165
|
|
|
164
166
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
165
167
|
|
|
166
168
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
167
169
|
|
|
170
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
171
|
+
|
|
172
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
173
|
+
|
|
168
174
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
169
175
|
|
|
170
176
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -271,7 +277,7 @@
|
|
|
271
277
|
|
|
272
278
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
273
279
|
|
|
274
|
-
<li><a href="../TaskJuggler/
|
|
280
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
275
281
|
|
|
276
282
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
277
283
|
|
|
@@ -451,6 +457,10 @@
|
|
|
451
457
|
|
|
452
458
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
453
459
|
|
|
460
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
461
|
+
|
|
462
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
463
|
+
|
|
454
464
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
455
465
|
|
|
456
466
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -840,7 +850,7 @@ href="Query.html">Query</a>.
|
|
|
840
850
|
56: <span class="ruby-comment cmt"># Sort all entries in buckets by their alert level.</span>
|
|
841
851
|
57: <span class="ruby-identifier">numberOfLevels</span> = <span class="ruby-identifier">project</span>[<span class="ruby-value str">'alertLevels'</span>].<span class="ruby-identifier">length</span>
|
|
842
852
|
58: <span class="ruby-identifier">listByLevel</span> = []
|
|
843
|
-
59: <span class="ruby-
|
|
853
|
+
59: <span class="ruby-identifier">numberOfLevels</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">listByLevel</span>[<span class="ruby-identifier">i</span>] = [] }
|
|
844
854
|
60: <span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>
|
|
845
855
|
61: <span class="ruby-identifier">listByLevel</span>[<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">alertLevel</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">entry</span>
|
|
846
856
|
62: <span class="ruby-keyword kw">end</span>
|
|
@@ -157,12 +157,18 @@
|
|
|
157
157
|
|
|
158
158
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
159
159
|
|
|
160
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
161
|
+
|
|
160
162
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
161
163
|
|
|
162
164
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
163
165
|
|
|
164
166
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
165
167
|
|
|
168
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
169
|
+
|
|
170
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
171
|
+
|
|
166
172
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
167
173
|
|
|
168
174
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -269,7 +275,7 @@
|
|
|
269
275
|
|
|
270
276
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
271
277
|
|
|
272
|
-
<li><a href="../TaskJuggler/
|
|
278
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
273
279
|
|
|
274
280
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
275
281
|
|
|
@@ -449,6 +455,10 @@
|
|
|
449
455
|
|
|
450
456
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
451
457
|
|
|
458
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
459
|
+
|
|
460
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
461
|
+
|
|
452
462
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
453
463
|
|
|
454
464
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -590,12 +600,12 @@
|
|
|
590
600
|
<div class="method-source-code"
|
|
591
601
|
id="new-source">
|
|
592
602
|
<pre>
|
|
593
|
-
<span class="ruby-comment cmt"># File lib/Attributes.rb, line
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
603
|
+
<span class="ruby-comment cmt"># File lib/Attributes.rb, line 430</span>
|
|
604
|
+
430: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">type</span>)
|
|
605
|
+
431: <span class="ruby-keyword kw">super</span>
|
|
606
|
+
432:
|
|
607
|
+
433: <span class="ruby-ivar">@value</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
|
608
|
+
434: <span class="ruby-keyword kw">end</span></pre>
|
|
599
609
|
</div>
|
|
600
610
|
|
|
601
611
|
</div>
|
|
@@ -626,10 +636,10 @@
|
|
|
626
636
|
<div class="method-source-code"
|
|
627
637
|
id="tjp-d-source">
|
|
628
638
|
<pre>
|
|
629
|
-
<span class="ruby-comment cmt"># File lib/Attributes.rb, line
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
639
|
+
<span class="ruby-comment cmt"># File lib/Attributes.rb, line 436</span>
|
|
640
|
+
436: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ResourceListAttribute</span><span class="ruby-operator">::</span><span class="ruby-identifier">tjpId</span>
|
|
641
|
+
437: <span class="ruby-value str">'resourcelist'</span>
|
|
642
|
+
438: <span class="ruby-keyword kw">end</span></pre>
|
|
633
643
|
</div>
|
|
634
644
|
|
|
635
645
|
</div>
|
|
@@ -666,13 +676,13 @@
|
|
|
666
676
|
<div class="method-source-code"
|
|
667
677
|
id="to-rti-source">
|
|
668
678
|
<pre>
|
|
669
|
-
<span class="ruby-comment cmt"># File lib/Attributes.rb, line
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
679
|
+
<span class="ruby-comment cmt"># File lib/Attributes.rb, line 446</span>
|
|
680
|
+
446: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rti</span>(<span class="ruby-identifier">query</span> = <span class="ruby-keyword kw">nil</span>)
|
|
681
|
+
447: <span class="ruby-identifier">out</span> = []
|
|
682
|
+
448: <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">name</span> }
|
|
683
|
+
449: <span class="ruby-identifier">rText</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">out</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>))
|
|
684
|
+
450: <span class="ruby-identifier">rText</span>.<span class="ruby-identifier">generateIntermediateFormat</span>
|
|
685
|
+
451: <span class="ruby-keyword kw">end</span></pre>
|
|
676
686
|
</div>
|
|
677
687
|
|
|
678
688
|
</div>
|
|
@@ -703,12 +713,12 @@
|
|
|
703
713
|
<div class="method-source-code"
|
|
704
714
|
id="to-s-source">
|
|
705
715
|
<pre>
|
|
706
|
-
<span class="ruby-comment cmt"># File lib/Attributes.rb, line
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
716
|
+
<span class="ruby-comment cmt"># File lib/Attributes.rb, line 440</span>
|
|
717
|
+
440: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">query</span> = <span class="ruby-keyword kw">nil</span>)
|
|
718
|
+
441: <span class="ruby-identifier">out</span> = []
|
|
719
|
+
442: <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">fullId</span> }
|
|
720
|
+
443: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">", "</span>)
|
|
721
|
+
444: <span class="ruby-keyword kw">end</span></pre>
|
|
712
722
|
</div>
|
|
713
723
|
|
|
714
724
|
</div>
|
|
@@ -739,12 +749,12 @@
|
|
|
739
749
|
<div class="method-source-code"
|
|
740
750
|
id="to-tjp-source">
|
|
741
751
|
<pre>
|
|
742
|
-
<span class="ruby-comment cmt"># File lib/Attributes.rb, line
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
752
|
+
<span class="ruby-comment cmt"># File lib/Attributes.rb, line 453</span>
|
|
753
|
+
453: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_tjp</span>
|
|
754
|
+
454: <span class="ruby-identifier">out</span> = []
|
|
755
|
+
455: <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">fullId</span> }
|
|
756
|
+
456: <span class="ruby-ivar">@type</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>)
|
|
757
|
+
457: <span class="ruby-keyword kw">end</span></pre>
|
|
748
758
|
</div>
|
|
749
759
|
|
|
750
760
|
</div>
|
|
@@ -151,12 +151,18 @@
|
|
|
151
151
|
|
|
152
152
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
153
153
|
|
|
154
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
155
|
+
|
|
154
156
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
155
157
|
|
|
156
158
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
157
159
|
|
|
158
160
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
159
161
|
|
|
162
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
163
|
+
|
|
164
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
165
|
+
|
|
160
166
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
161
167
|
|
|
162
168
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -263,7 +269,7 @@
|
|
|
263
269
|
|
|
264
270
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
265
271
|
|
|
266
|
-
<li><a href="../TaskJuggler/
|
|
272
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
267
273
|
|
|
268
274
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
269
275
|
|
|
@@ -443,6 +449,10 @@
|
|
|
443
449
|
|
|
444
450
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
445
451
|
|
|
452
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
453
|
+
|
|
454
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
455
|
+
|
|
446
456
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
447
457
|
|
|
448
458
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -89,6 +89,10 @@
|
|
|
89
89
|
|
|
90
90
|
<li><a href="#method-i-cost">#cost</a></li>
|
|
91
91
|
|
|
92
|
+
<li><a href="#method-i-finishScheduling">#finishScheduling</a></li>
|
|
93
|
+
|
|
94
|
+
<li><a href="#method-i-fitIndicies">#fitIndicies</a></li>
|
|
95
|
+
|
|
92
96
|
<li><a href="#method-i-getAllocatedSlots">#getAllocatedSlots</a></li>
|
|
93
97
|
|
|
94
98
|
<li><a href="#method-i-getAllocatedTime">#getAllocatedTime</a></li>
|
|
@@ -219,12 +223,18 @@
|
|
|
219
223
|
|
|
220
224
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
221
225
|
|
|
226
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
227
|
+
|
|
222
228
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
223
229
|
|
|
224
230
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
225
231
|
|
|
226
232
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
227
233
|
|
|
234
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
235
|
+
|
|
236
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
237
|
+
|
|
228
238
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
229
239
|
|
|
230
240
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -331,7 +341,7 @@
|
|
|
331
341
|
|
|
332
342
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
333
343
|
|
|
334
|
-
<li><a href="../TaskJuggler/
|
|
344
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
335
345
|
|
|
336
346
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
337
347
|
|
|
@@ -511,6 +521,10 @@
|
|
|
511
521
|
|
|
512
522
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
513
523
|
|
|
524
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
525
|
+
|
|
526
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
527
|
+
|
|
514
528
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
515
529
|
|
|
516
530
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -673,9 +687,17 @@
|
|
|
673
687
|
37: <span class="ruby-comment cmt"># subset.</span>
|
|
674
688
|
38: <span class="ruby-ivar">@scoreboard</span> = <span class="ruby-keyword kw">nil</span>
|
|
675
689
|
39:
|
|
676
|
-
40: <span class="ruby-
|
|
677
|
-
41: <span class="ruby-ivar">@
|
|
678
|
-
42:
|
|
690
|
+
40: <span class="ruby-comment cmt"># The index of the earliest booked time slot.</span>
|
|
691
|
+
41: <span class="ruby-ivar">@firstBookedSlot</span> = <span class="ruby-keyword kw">nil</span>
|
|
692
|
+
42: <span class="ruby-comment cmt"># Same but for each assigned resource.</span>
|
|
693
|
+
43: <span class="ruby-ivar">@firstBookedSlots</span> = {}
|
|
694
|
+
44: <span class="ruby-comment cmt"># The index of the last booked time Slot.</span>
|
|
695
|
+
45: <span class="ruby-ivar">@lastBookedSlot</span> = <span class="ruby-keyword kw">nil</span>
|
|
696
|
+
46: <span class="ruby-comment cmt"># Same but for each assigned resource.</span>
|
|
697
|
+
47: <span class="ruby-ivar">@lastBookedSlots</span> = {}
|
|
698
|
+
48:
|
|
699
|
+
49: <span class="ruby-ivar">@dCache</span> = <span class="ruby-constant">DataCache</span>.<span class="ruby-identifier">instance</span>
|
|
700
|
+
50: <span class="ruby-keyword kw">end</span></pre>
|
|
679
701
|
</div>
|
|
680
702
|
|
|
681
703
|
</div>
|
|
@@ -716,21 +738,18 @@ If task is not nil only allocations to this tasks are respected.
|
|
|
716
738
|
<div class="method-source-code"
|
|
717
739
|
id="allocated--source">
|
|
718
740
|
<pre>
|
|
719
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
432:
|
|
732
|
-
433: <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>)
|
|
733
|
-
434: <span class="ruby-keyword kw">end</span></pre>
|
|
741
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 469</span>
|
|
742
|
+
469: <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>)
|
|
743
|
+
470: <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>)
|
|
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>
|
|
750
|
+
477:
|
|
751
|
+
478: <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>)
|
|
752
|
+
479: <span class="ruby-keyword kw">end</span></pre>
|
|
734
753
|
</div>
|
|
735
754
|
|
|
736
755
|
</div>
|
|
@@ -764,15 +783,15 @@ Returns true if the resource is available at the time specified by
|
|
|
764
783
|
<div class="method-source-code"
|
|
765
784
|
id="available--source">
|
|
766
785
|
<pre>
|
|
767
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
786
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 166</span>
|
|
787
|
+
166: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">available?</span>(<span class="ruby-identifier">sbIdx</span>)
|
|
788
|
+
167: <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>
|
|
789
|
+
168:
|
|
790
|
+
169: <span class="ruby-identifier">limits</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'limits'</span>)
|
|
791
|
+
170: <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>))
|
|
792
|
+
171:
|
|
793
|
+
172: <span class="ruby-keyword kw">true</span>
|
|
794
|
+
173: <span class="ruby-keyword kw">end</span></pre>
|
|
776
795
|
</div>
|
|
777
796
|
|
|
778
797
|
</div>
|
|
@@ -808,35 +827,47 @@ the slot was available.
|
|
|
808
827
|
<div class="method-source-code"
|
|
809
828
|
id="book-source">
|
|
810
829
|
<pre>
|
|
811
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
830
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 184</span>
|
|
831
|
+
184: <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>)
|
|
832
|
+
185: <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>)
|
|
833
|
+
186:
|
|
834
|
+
187: <span class="ruby-comment cmt"># Make sure the task is in the list of duties.</span>
|
|
835
|
+
188: <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>)
|
|
836
|
+
189: <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>
|
|
837
|
+
190: <span class="ruby-keyword kw">end</span>
|
|
838
|
+
191:
|
|
839
|
+
192: <span class="ruby-comment cmt">#puts "Booking resource #{@property.fullId} at " +</span>
|
|
840
|
+
193: <span class="ruby-comment cmt"># "#{@scoreboard.idxToDate(sbIdx)}/#{sbIdx} for task #{task.fullId}\n"</span>
|
|
841
|
+
194: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">sbIdx</span>] = <span class="ruby-identifier">task</span>
|
|
842
|
+
195: <span class="ruby-comment cmt"># Track the total allocated slots for this resource and all parent</span>
|
|
843
|
+
196: <span class="ruby-comment cmt"># resources.</span>
|
|
844
|
+
197: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@property</span>
|
|
845
|
+
198: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span>
|
|
846
|
+
199: <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>
|
|
847
|
+
200: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">parent</span>
|
|
848
|
+
201: <span class="ruby-keyword kw">end</span>
|
|
849
|
+
202: <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>)
|
|
850
|
+
203:
|
|
851
|
+
204: <span class="ruby-comment cmt"># Scoreboard iterations are fairly expensive but they are very frequent</span>
|
|
852
|
+
205: <span class="ruby-comment cmt"># operations in later processing. To limit the interations to the</span>
|
|
853
|
+
206: <span class="ruby-comment cmt"># relevant intervals, we store the interval for all bookings and for</span>
|
|
854
|
+
207: <span class="ruby-comment cmt"># each individual task.</span>
|
|
855
|
+
208: <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>
|
|
856
|
+
209: <span class="ruby-ivar">@firstBookedSlot</span> = <span class="ruby-identifier">sbIdx</span>
|
|
857
|
+
210: <span class="ruby-keyword kw">end</span>
|
|
858
|
+
211: <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>
|
|
859
|
+
212: <span class="ruby-ivar">@lastBookedSlot</span> = <span class="ruby-identifier">sbIdx</span>
|
|
860
|
+
213: <span class="ruby-keyword kw">end</span>
|
|
861
|
+
214: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>
|
|
862
|
+
215: <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>
|
|
863
|
+
216: <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>] = <span class="ruby-identifier">sbIdx</span>
|
|
864
|
+
217: <span class="ruby-keyword kw">end</span>
|
|
865
|
+
218: <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>
|
|
866
|
+
219: <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>] = <span class="ruby-identifier">sbIdx</span>
|
|
867
|
+
220: <span class="ruby-keyword kw">end</span>
|
|
868
|
+
221: <span class="ruby-keyword kw">end</span>
|
|
869
|
+
222: <span class="ruby-keyword kw">true</span>
|
|
870
|
+
223: <span class="ruby-keyword kw">end</span></pre>
|
|
840
871
|
</div>
|
|
841
872
|
|
|
842
873
|
</div>
|
|
@@ -867,45 +898,45 @@ the slot was available.
|
|
|
867
898
|
<div class="method-source-code"
|
|
868
899
|
id="book-ooking-source">
|
|
869
900
|
<pre>
|
|
870
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
901
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 225</span>
|
|
902
|
+
225: <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>)
|
|
903
|
+
226: <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>
|
|
904
|
+
227:
|
|
905
|
+
228: <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>
|
|
906
|
+
229: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">booked?</span>(<span class="ruby-identifier">sbIdx</span>)
|
|
907
|
+
230: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_conflict'</span>,
|
|
908
|
+
231: <span class="ruby-node">"Resource #{@property.fullId} has multiple conflicting "</span> <span class="ruby-operator">+</span>
|
|
909
|
+
232: <span class="ruby-node">"bookings for #{@scoreboard.idxToDate(sbIdx)}. The "</span> <span class="ruby-operator">+</span>
|
|
910
|
+
233: <span class="ruby-node">"conflicting tasks are #{@scoreboard[sbIdx].fullId} and "</span> <span class="ruby-operator">+</span>
|
|
911
|
+
234: <span class="ruby-node">"#{booking.task.fullId}."</span>, <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
|
|
912
|
+
235: <span class="ruby-keyword kw">end</span>
|
|
913
|
+
236: <span class="ruby-identifier">val</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">sbIdx</span>]
|
|
914
|
+
237: <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>)
|
|
915
|
+
238: <span class="ruby-comment cmt"># The booking is blocked due to the overtime attribute. Now let's</span>
|
|
916
|
+
239: <span class="ruby-comment cmt"># see if the user wants to be warned about it.</span>
|
|
917
|
+
240: <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>
|
|
918
|
+
241: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_no_duty'</span>,
|
|
919
|
+
242: <span class="ruby-node">"Resource #{@property.fullId} has no duty at "</span> <span class="ruby-operator">+</span>
|
|
920
|
+
243: <span class="ruby-node">"#{@scoreboard.idxToDate(sbIdx)}."</span>,
|
|
921
|
+
244: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
|
|
922
|
+
245: <span class="ruby-keyword kw">end</span>
|
|
923
|
+
246: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
924
|
+
247: <span class="ruby-keyword kw">end</span>
|
|
925
|
+
248: <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>)
|
|
926
|
+
249: <span class="ruby-comment cmt"># The booking is blocked due to the overtime attribute. Now let's</span>
|
|
927
|
+
250: <span class="ruby-comment cmt"># see if the user wants to be warned about it.</span>
|
|
928
|
+
251: <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>
|
|
929
|
+
252: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'booking_on_vacation'</span>,
|
|
930
|
+
253: <span class="ruby-node">"Resource #{@property.fullId} is on vacation at "</span> <span class="ruby-operator">+</span>
|
|
931
|
+
254: <span class="ruby-node">"#{@scoreboard.idxToDate(sbIdx)}."</span>,
|
|
932
|
+
255: <span class="ruby-identifier">booking</span>.<span class="ruby-identifier">sourceFileInfo</span>)
|
|
933
|
+
256: <span class="ruby-keyword kw">end</span>
|
|
934
|
+
257: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
935
|
+
258: <span class="ruby-keyword kw">end</span>
|
|
936
|
+
259: <span class="ruby-keyword kw">end</span>
|
|
937
|
+
260:
|
|
938
|
+
261: <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>)
|
|
939
|
+
262: <span class="ruby-keyword kw">end</span></pre>
|
|
909
940
|
</div>
|
|
910
941
|
|
|
911
942
|
</div>
|
|
@@ -939,10 +970,10 @@ Return true if the resource is booked for a tasks at the time specified by
|
|
|
939
970
|
<div class="method-source-code"
|
|
940
971
|
id="booked--source">
|
|
941
972
|
<pre>
|
|
942
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
973
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 177</span>
|
|
974
|
+
177: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">booked?</span>(<span class="ruby-identifier">sbIdx</span>)
|
|
975
|
+
178: <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>)
|
|
976
|
+
179: <span class="ruby-keyword kw">end</span></pre>
|
|
946
977
|
</div>
|
|
947
978
|
|
|
948
979
|
</div>
|
|
@@ -979,20 +1010,20 @@ guarantee, though.
|
|
|
979
1010
|
<div class="method-source-code"
|
|
980
1011
|
id="calc-riticalness-source">
|
|
981
1012
|
<pre>
|
|
982
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1013
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 66</span>
|
|
1014
|
+
66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calcCriticalness</span>
|
|
1015
|
+
67: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">nil?</span>
|
|
1016
|
+
68: <span class="ruby-comment cmt"># Resources that are not allocated are not critical at all.</span>
|
|
1017
|
+
69: <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>
|
|
1018
|
+
70: <span class="ruby-keyword kw">else</span>
|
|
1019
|
+
71: <span class="ruby-identifier">freeSlots</span> = <span class="ruby-value">0</span>
|
|
1020
|
+
72: <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>
|
|
1021
|
+
73: <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>
|
|
1022
|
+
74: <span class="ruby-keyword kw">end</span>
|
|
1023
|
+
75: <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>
|
|
1024
|
+
76: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'alloctdeffort'</span>) <span class="ruby-operator">/</span> <span class="ruby-identifier">freeSlots</span>
|
|
1025
|
+
77: <span class="ruby-keyword kw">end</span>
|
|
1026
|
+
78: <span class="ruby-keyword kw">end</span></pre>
|
|
996
1027
|
</div>
|
|
997
1028
|
|
|
998
1029
|
</div>
|
|
@@ -1033,14 +1064,14 @@ result is an Array of
|
|
|
1033
1064
|
<div class="method-source-code"
|
|
1034
1065
|
id="collect-ime-ff-ntervals-source">
|
|
1035
1066
|
<pre>
|
|
1036
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1067
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 529</span>
|
|
1068
|
+
529: <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>)
|
|
1069
|
+
530: <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>
|
|
1070
|
+
531:
|
|
1071
|
+
532: <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>
|
|
1072
|
+
533: <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>
|
|
1073
|
+
534: <span class="ruby-keyword kw">end</span>
|
|
1074
|
+
535: <span class="ruby-keyword kw">end</span></pre>
|
|
1044
1075
|
</div>
|
|
1045
1076
|
|
|
1046
1077
|
</div>
|
|
@@ -1076,10 +1107,60 @@ particular task is considered.
|
|
|
1076
1107
|
<div class="method-source-code"
|
|
1077
1108
|
id="cost-source">
|
|
1078
1109
|
<pre>
|
|
1079
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1110
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 462</span>
|
|
1111
|
+
462: <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>)
|
|
1112
|
+
463: <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>)
|
|
1113
|
+
464: <span class="ruby-keyword kw">end</span></pre>
|
|
1114
|
+
</div>
|
|
1115
|
+
|
|
1116
|
+
</div>
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
</div>
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
<div id="finish-cheduling-method" class="method-detail ">
|
|
1125
|
+
<a name="method-i-finishScheduling"></a>
|
|
1126
|
+
|
|
1127
|
+
<div class="method-heading">
|
|
1128
|
+
|
|
1129
|
+
<span class="method-name">finishScheduling</span><span
|
|
1130
|
+
class="method-args">()</span>
|
|
1131
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1132
|
+
|
|
1133
|
+
</div>
|
|
1134
|
+
|
|
1135
|
+
<div class="method-description">
|
|
1136
|
+
|
|
1137
|
+
<p>
|
|
1138
|
+
This method does some housekeeping work after the scheduling is completed.
|
|
1139
|
+
It’s meant to be called for top-level resources and then recursively
|
|
1140
|
+
descends into all child resources.
|
|
1141
|
+
</p>
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
<div class="method-source-code"
|
|
1146
|
+
id="finish-cheduling-source">
|
|
1147
|
+
<pre>
|
|
1148
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 119</span>
|
|
1149
|
+
119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">finishScheduling</span>
|
|
1150
|
+
120: <span class="ruby-comment cmt"># Recursively descend into all child resources.</span>
|
|
1151
|
+
121: <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>
|
|
1152
|
+
122: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">finishScheduling</span>(<span class="ruby-ivar">@scenarioIdx</span>)
|
|
1153
|
+
123: <span class="ruby-keyword kw">end</span>
|
|
1154
|
+
124:
|
|
1155
|
+
125: <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>)
|
|
1156
|
+
126: <span class="ruby-comment cmt"># Add the assigned task to the parent duties list.</span>
|
|
1157
|
+
127: <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>
|
|
1158
|
+
128: <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>)
|
|
1159
|
+
129: <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>
|
|
1160
|
+
130: <span class="ruby-keyword kw">end</span>
|
|
1161
|
+
131: <span class="ruby-keyword kw">end</span>
|
|
1162
|
+
132: <span class="ruby-keyword kw">end</span>
|
|
1163
|
+
133: <span class="ruby-keyword kw">end</span></pre>
|
|
1083
1164
|
</div>
|
|
1084
1165
|
|
|
1085
1166
|
</div>
|
|
@@ -1113,26 +1194,23 @@ not nil count only those slots that are assigned to this particular task.
|
|
|
1113
1194
|
<div class="method-source-code"
|
|
1114
1195
|
id="get-llocated-lots-source">
|
|
1115
1196
|
<pre>
|
|
1116
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
512:
|
|
1134
|
-
513: <span class="ruby-identifier">bookedSlots</span>
|
|
1135
|
-
514: <span class="ruby-keyword kw">end</span></pre>
|
|
1197
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 539</span>
|
|
1198
|
+
539: <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>)
|
|
1199
|
+
540: <span class="ruby-comment cmt"># If there is no scoreboard, we don't have any allocations.</span>
|
|
1200
|
+
541: <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>
|
|
1201
|
+
542:
|
|
1202
|
+
543: <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>)
|
|
1203
|
+
544: <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>
|
|
1204
|
+
545:
|
|
1205
|
+
546: <span class="ruby-identifier">bookedSlots</span> = <span class="ruby-value">0</span>
|
|
1206
|
+
547: <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>
|
|
1207
|
+
548: <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>)
|
|
1208
|
+
549: <span class="ruby-identifier">bookedSlots</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1209
|
+
550: <span class="ruby-keyword kw">end</span>
|
|
1210
|
+
551: <span class="ruby-keyword kw">end</span>
|
|
1211
|
+
552:
|
|
1212
|
+
553: <span class="ruby-identifier">bookedSlots</span>
|
|
1213
|
+
554: <span class="ruby-keyword kw">end</span></pre>
|
|
1136
1214
|
</div>
|
|
1137
1215
|
|
|
1138
1216
|
</div>
|
|
@@ -1165,25 +1243,25 @@ Returns the allocated accumulated time of this resource and its children.
|
|
|
1165
1243
|
<div class="method-source-code"
|
|
1166
1244
|
id="get-llocated-ime-source">
|
|
1167
1245
|
<pre>
|
|
1168
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1246
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 362</span>
|
|
1247
|
+
362: <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>)
|
|
1248
|
+
363: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1249
|
+
364: <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>)
|
|
1250
|
+
365: <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>)
|
|
1251
|
+
366:
|
|
1252
|
+
367: <span class="ruby-identifier">time</span> = <span class="ruby-value">0</span>
|
|
1253
|
+
368: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1254
|
+
369: <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>
|
|
1255
|
+
370: <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>)
|
|
1256
|
+
371: <span class="ruby-keyword kw">end</span>
|
|
1257
|
+
372: <span class="ruby-keyword kw">else</span>
|
|
1258
|
+
373: <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>
|
|
1259
|
+
374:
|
|
1260
|
+
375: <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>] *
|
|
1261
|
+
376: <span class="ruby-identifier">getAllocatedSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>))
|
|
1262
|
+
377: <span class="ruby-keyword kw">end</span>
|
|
1263
|
+
378: <span class="ruby-identifier">time</span>
|
|
1264
|
+
379: <span class="ruby-keyword kw">end</span></pre>
|
|
1187
1265
|
</div>
|
|
1188
1266
|
|
|
1189
1267
|
</div>
|
|
@@ -1216,52 +1294,50 @@ Iterate over the scoreboard and turn its content into a set of Bookings.
|
|
|
1216
1294
|
<div class="method-source-code"
|
|
1217
1295
|
id="get-ookings-source">
|
|
1218
1296
|
<pre>
|
|
1219
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
480: <span class="ruby-identifier">bookings</span>
|
|
1264
|
-
481: <span class="ruby-keyword kw">end</span></pre>
|
|
1297
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 482</span>
|
|
1298
|
+
482: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getBookings</span>
|
|
1299
|
+
483: <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>
|
|
1300
|
+
484: <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>
|
|
1301
|
+
485:
|
|
1302
|
+
486: <span class="ruby-identifier">bookings</span> = {}
|
|
1303
|
+
487: <span class="ruby-identifier">lastTask</span> = <span class="ruby-keyword kw">nil</span>
|
|
1304
|
+
488: <span class="ruby-identifier">bookingStart</span> = <span class="ruby-keyword kw">nil</span>
|
|
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>
|
|
1313
|
+
497:
|
|
1314
|
+
498: <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>
|
|
1315
|
+
499: <span class="ruby-identifier">task</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">idx</span>]
|
|
1316
|
+
500: <span class="ruby-comment cmt"># Now we watch for task changes.</span>
|
|
1317
|
+
501: <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>
|
|
1318
|
+
502: (<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>)
|
|
1319
|
+
503: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">lastTask</span>.<span class="ruby-identifier">nil?</span>
|
|
1320
|
+
504: <span class="ruby-comment cmt"># If we don't have a Booking for the task yet, we create one.</span>
|
|
1321
|
+
505: <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>
|
|
1322
|
+
506: <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>, [])
|
|
1323
|
+
507: <span class="ruby-keyword kw">end</span>
|
|
1324
|
+
508:
|
|
1325
|
+
509: <span class="ruby-comment cmt"># Append the new interval to the Booking.</span>
|
|
1326
|
+
510: <span class="ruby-identifier">bookings</span>[<span class="ruby-identifier">lastTask</span>].<span class="ruby-identifier">intervals</span> <span class="ruby-operator"><<</span>
|
|
1327
|
+
511: <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>),
|
|
1328
|
+
512: <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">idx</span>))
|
|
1329
|
+
513: <span class="ruby-keyword kw">end</span>
|
|
1330
|
+
514: <span class="ruby-comment cmt"># Get ready for the next task booking interval</span>
|
|
1331
|
+
515: <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>)
|
|
1332
|
+
516: <span class="ruby-identifier">lastTask</span> = <span class="ruby-identifier">task</span>
|
|
1333
|
+
517: <span class="ruby-identifier">bookingStart</span> = <span class="ruby-identifier">idx</span>
|
|
1334
|
+
518: <span class="ruby-keyword kw">else</span>
|
|
1335
|
+
519: <span class="ruby-identifier">lastTask</span> = <span class="ruby-identifier">bookingStart</span> = <span class="ruby-keyword kw">nil</span>
|
|
1336
|
+
520: <span class="ruby-keyword kw">end</span>
|
|
1337
|
+
521: <span class="ruby-keyword kw">end</span>
|
|
1338
|
+
522: <span class="ruby-keyword kw">end</span>
|
|
1339
|
+
523: <span class="ruby-identifier">bookings</span>
|
|
1340
|
+
524: <span class="ruby-keyword kw">end</span></pre>
|
|
1265
1341
|
</div>
|
|
1266
1342
|
|
|
1267
1343
|
</div>
|
|
@@ -1295,24 +1371,24 @@ children.
|
|
|
1295
1371
|
<div class="method-source-code"
|
|
1296
1372
|
id="get-ffective-ree-ime-source">
|
|
1297
1373
|
<pre>
|
|
1298
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1374
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 383</span>
|
|
1375
|
+
383: <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>)
|
|
1376
|
+
384: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1377
|
+
385: <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>)
|
|
1378
|
+
386: <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>)
|
|
1379
|
+
387:
|
|
1380
|
+
388: <span class="ruby-identifier">freeTime</span> = <span class="ruby-value">0</span>
|
|
1381
|
+
389: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1382
|
+
390: <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>
|
|
1383
|
+
391: <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>,
|
|
1384
|
+
392: <span class="ruby-identifier">endIdx</span>)
|
|
1385
|
+
393: <span class="ruby-keyword kw">end</span>
|
|
1386
|
+
394: <span class="ruby-keyword kw">else</span>
|
|
1387
|
+
395: <span class="ruby-identifier">freeTime</span> = <span class="ruby-identifier">getFreeSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>) *
|
|
1388
|
+
396: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
|
|
1389
|
+
397: <span class="ruby-keyword kw">end</span>
|
|
1390
|
+
398: <span class="ruby-identifier">freeTime</span>
|
|
1391
|
+
399: <span class="ruby-keyword kw">end</span></pre>
|
|
1316
1392
|
</div>
|
|
1317
1393
|
|
|
1318
1394
|
</div>
|
|
@@ -1346,24 +1422,24 @@ their efficiency.
|
|
|
1346
1422
|
<div class="method-source-code"
|
|
1347
1423
|
id="get-ffective-ree-ork-source">
|
|
1348
1424
|
<pre>
|
|
1349
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1425
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 403</span>
|
|
1426
|
+
403: <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>)
|
|
1427
|
+
404: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1428
|
+
405: <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>)
|
|
1429
|
+
406: <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>)
|
|
1430
|
+
407:
|
|
1431
|
+
408: <span class="ruby-identifier">work</span> = <span class="ruby-value">0.0</span>
|
|
1432
|
+
409: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1433
|
+
410: <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>
|
|
1434
|
+
411: <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>)
|
|
1435
|
+
412: <span class="ruby-keyword kw">end</span>
|
|
1436
|
+
413: <span class="ruby-keyword kw">else</span>
|
|
1437
|
+
414: <span class="ruby-identifier">work</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
|
|
1438
|
+
415: <span class="ruby-identifier">getFreeSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>) *
|
|
1439
|
+
416: <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>)
|
|
1440
|
+
417: <span class="ruby-keyword kw">end</span>
|
|
1441
|
+
418: <span class="ruby-identifier">work</span>
|
|
1442
|
+
419: <span class="ruby-keyword kw">end</span></pre>
|
|
1367
1443
|
</div>
|
|
1368
1444
|
|
|
1369
1445
|
</div>
|
|
@@ -1397,26 +1473,36 @@ efficiency.
|
|
|
1397
1473
|
<div class="method-source-code"
|
|
1398
1474
|
id="get-ffective-ork-source">
|
|
1399
1475
|
<pre>
|
|
1400
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1476
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 331</span>
|
|
1477
|
+
331: <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>)
|
|
1478
|
+
332: <span class="ruby-comment cmt"># There can't be any effective work if the start is after the end or the</span>
|
|
1479
|
+
333: <span class="ruby-comment cmt"># todo list doesn't contain the specified task.</span>
|
|
1480
|
+
334: <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>))
|
|
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>
|
|
1487
|
+
341:
|
|
1488
|
+
342: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1489
|
+
343: <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>)
|
|
1490
|
+
344: <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>)
|
|
1491
|
+
345:
|
|
1492
|
+
346: <span class="ruby-identifier">work</span> = <span class="ruby-value">0.0</span>
|
|
1493
|
+
347: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1494
|
+
348: <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>
|
|
1495
|
+
349: <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>)
|
|
1496
|
+
350: <span class="ruby-keyword kw">end</span>
|
|
1497
|
+
351: <span class="ruby-keyword kw">else</span>
|
|
1498
|
+
352: <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>
|
|
1499
|
+
353:
|
|
1500
|
+
354: <span class="ruby-identifier">work</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
|
|
1501
|
+
355: <span class="ruby-identifier">getAllocatedSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>, <span class="ruby-identifier">task</span>) *
|
|
1502
|
+
356: <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>)
|
|
1503
|
+
357: <span class="ruby-keyword kw">end</span>
|
|
1504
|
+
358: <span class="ruby-ivar">@dCache</span>.<span class="ruby-identifier">store</span>(<span class="ruby-identifier">work</span>, <span class="ruby-identifier">key</span>)
|
|
1505
|
+
359: <span class="ruby-keyword kw">end</span></pre>
|
|
1420
1506
|
</div>
|
|
1421
1507
|
|
|
1422
1508
|
</div>
|
|
@@ -1449,17 +1535,19 @@ Count the free slots between the start and end index.
|
|
|
1449
1535
|
<div class="method-source-code"
|
|
1450
1536
|
id="get-ree-lots-source">
|
|
1451
1537
|
<pre>
|
|
1452
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1538
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 557</span>
|
|
1539
|
+
557: <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>)
|
|
1540
|
+
558: <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>
|
|
1541
|
+
559:
|
|
1542
|
+
560: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span>
|
|
1543
|
+
561:
|
|
1544
|
+
562: <span class="ruby-identifier">freeSlots</span> = <span class="ruby-value">0</span>
|
|
1545
|
+
563: <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>
|
|
1546
|
+
564: <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>
|
|
1547
|
+
565: <span class="ruby-keyword kw">end</span>
|
|
1548
|
+
566:
|
|
1549
|
+
567: <span class="ruby-identifier">freeSlots</span>
|
|
1550
|
+
568: <span class="ruby-keyword kw">end</span></pre>
|
|
1463
1551
|
</div>
|
|
1464
1552
|
|
|
1465
1553
|
</div>
|
|
@@ -1492,27 +1580,27 @@ Return the number of working days that are blocked by vacations.
|
|
|
1492
1580
|
<div class="method-source-code"
|
|
1493
1581
|
id="get-acation-ays-source">
|
|
1494
1582
|
<pre>
|
|
1495
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1583
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 422</span>
|
|
1584
|
+
422: <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>)
|
|
1585
|
+
423: <span class="ruby-comment cmt"># Convert the interval dates to indexes if needed.</span>
|
|
1586
|
+
424: <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>)
|
|
1587
|
+
425: <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>)
|
|
1588
|
+
426:
|
|
1589
|
+
427: <span class="ruby-identifier">vacationDays</span> = <span class="ruby-value">0.0</span>
|
|
1590
|
+
428: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
1591
|
+
429: <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>
|
|
1592
|
+
430: <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>,
|
|
1593
|
+
431: <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>)
|
|
1594
|
+
432: <span class="ruby-keyword kw">end</span>
|
|
1595
|
+
433: <span class="ruby-keyword kw">else</span>
|
|
1596
|
+
434: <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>
|
|
1597
|
+
435:
|
|
1598
|
+
436: <span class="ruby-identifier">vacationDays</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">convertToDailyLoad</span>(
|
|
1599
|
+
437: <span class="ruby-identifier">getVacationSlots</span>(<span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span>) *
|
|
1600
|
+
438: <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>)
|
|
1601
|
+
439: <span class="ruby-keyword kw">end</span>
|
|
1602
|
+
440: <span class="ruby-identifier">vacationDays</span>
|
|
1603
|
+
441: <span class="ruby-keyword kw">end</span></pre>
|
|
1516
1604
|
</div>
|
|
1517
1605
|
|
|
1518
1606
|
</div>
|
|
@@ -1546,19 +1634,21 @@ been blocked by a vacation.
|
|
|
1546
1634
|
<div class="method-source-code"
|
|
1547
1635
|
id="get-acation-lots-source">
|
|
1548
1636
|
<pre>
|
|
1549
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1637
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 572</span>
|
|
1638
|
+
572: <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>)
|
|
1639
|
+
573: <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>
|
|
1640
|
+
574:
|
|
1641
|
+
575: <span class="ruby-identifier">initScoreboard</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@scoreboard</span>
|
|
1642
|
+
576:
|
|
1643
|
+
577: <span class="ruby-identifier">vacationSlots</span> = <span class="ruby-value">0</span>
|
|
1644
|
+
578: <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>
|
|
1645
|
+
579: <span class="ruby-identifier">val</span> = <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">idx</span>]
|
|
1646
|
+
580: <span class="ruby-comment cmt"># Bit 1 needs to be unset and the vacation bits must not be 0.</span>
|
|
1647
|
+
581: <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>
|
|
1648
|
+
582: (<span class="ruby-identifier">val</span> & <span class="ruby-value">0x3C</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
1649
|
+
583: <span class="ruby-keyword kw">end</span>
|
|
1650
|
+
584: <span class="ruby-identifier">vacationSlots</span>
|
|
1651
|
+
585: <span class="ruby-keyword kw">end</span></pre>
|
|
1562
1652
|
</div>
|
|
1563
1653
|
|
|
1564
1654
|
</div>
|
|
@@ -1589,35 +1679,35 @@ been blocked by a vacation.
|
|
|
1589
1679
|
<div class="method-source-code"
|
|
1590
1680
|
id="post-chedule-heck-source">
|
|
1591
1681
|
<pre>
|
|
1592
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1682
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 135</span>
|
|
1683
|
+
135: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">postScheduleCheck</span>
|
|
1684
|
+
136: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'fail'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'warn'</span>)
|
|
1685
|
+
137: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
1686
|
+
138: <span class="ruby-value str">'scenarioIdx'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@scenarioIdx</span>,
|
|
1687
|
+
139: <span class="ruby-value str">'property'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@property</span>,
|
|
1688
|
+
140: <span class="ruby-value str">'scopeProperty'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">nil</span>,
|
|
1689
|
+
141: <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>],
|
|
1690
|
+
142: <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>],
|
|
1691
|
+
143: <span class="ruby-value str">'loadUnit'</span> =<span class="ruby-operator">></span> <span class="ruby-value">:days</span>,
|
|
1692
|
+
144: <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>],
|
|
1693
|
+
145: <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>],
|
|
1694
|
+
146: <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>] }
|
|
1695
|
+
147: <span class="ruby-identifier">query</span> = <span class="ruby-constant">Query</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">queryAttrs</span>)
|
|
1696
|
+
148: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'fail'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'fail'</span>).<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">query</span>)
|
|
1697
|
+
149: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'resource_fail_check'</span>,
|
|
1698
|
+
150: <span class="ruby-node">"User defined check failed for resource #{@property.fullId} \n"</span> <span class="ruby-operator">+</span>
|
|
1699
|
+
151: <span class="ruby-node">"Condition: #{a('fail').to_s}\n"</span> <span class="ruby-operator">+</span>
|
|
1700
|
+
152: <span class="ruby-node">"Result: #{a('fail').to_s(query)}"</span>)
|
|
1701
|
+
153: <span class="ruby-keyword kw">end</span>
|
|
1702
|
+
154: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'warn'</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'warn'</span>).<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">query</span>)
|
|
1703
|
+
155: <span class="ruby-identifier">warning</span>(<span class="ruby-value str">'resource_warn_check'</span>,
|
|
1704
|
+
156: <span class="ruby-value str">"User defined warning triggered for resource "</span> <span class="ruby-operator">+</span>
|
|
1705
|
+
157: <span class="ruby-node">"#{@property.fullId} \n"</span> <span class="ruby-operator">+</span>
|
|
1706
|
+
158: <span class="ruby-node">"Condition: #{a('warn').to_s}\n"</span> <span class="ruby-operator">+</span>
|
|
1707
|
+
159: <span class="ruby-node">"Result: #{a('warn').to_s(query)}"</span>)
|
|
1708
|
+
160: <span class="ruby-keyword kw">end</span>
|
|
1709
|
+
161: <span class="ruby-keyword kw">end</span>
|
|
1710
|
+
162: <span class="ruby-keyword kw">end</span></pre>
|
|
1621
1711
|
</div>
|
|
1622
1712
|
|
|
1623
1713
|
</div>
|
|
@@ -1648,20 +1738,20 @@ been blocked by a vacation.
|
|
|
1648
1738
|
<div class="method-source-code"
|
|
1649
1739
|
id="pre-chedule-heck-source">
|
|
1650
1740
|
<pre>
|
|
1651
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1741
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 102</span>
|
|
1742
|
+
102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preScheduleCheck</span>
|
|
1743
|
+
103: <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>
|
|
1744
|
+
104: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">leaf?</span>
|
|
1745
|
+
105: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'manager_is_group'</span>,
|
|
1746
|
+
106: <span class="ruby-node">"Resource #{@property.fullId} has group #{manager.fullId} "</span> <span class="ruby-operator">+</span>
|
|
1747
|
+
107: <span class="ruby-value str">"assigned as manager. Managers must be leaf resources."</span>)
|
|
1748
|
+
108: <span class="ruby-keyword kw">end</span>
|
|
1749
|
+
109: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">manager</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@property</span>
|
|
1750
|
+
110: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'manager_is_self'</span>,
|
|
1751
|
+
111: <span class="ruby-node">"Resource #{@property.fullId} cannot manage itself."</span>)
|
|
1752
|
+
112: <span class="ruby-keyword kw">end</span>
|
|
1753
|
+
113: <span class="ruby-keyword kw">end</span>
|
|
1754
|
+
114: <span class="ruby-keyword kw">end</span></pre>
|
|
1665
1755
|
</div>
|
|
1666
1756
|
|
|
1667
1757
|
</div>
|
|
@@ -1695,13 +1785,13 @@ initializes variables used during the scheduling process.
|
|
|
1695
1785
|
<div class="method-source-code"
|
|
1696
1786
|
id="prepare-cheduling-source">
|
|
1697
1787
|
<pre>
|
|
1698
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1788
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 54</span>
|
|
1789
|
+
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prepareScheduling</span>
|
|
1790
|
+
55: <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>
|
|
1791
|
+
56: <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>
|
|
1792
|
+
57:
|
|
1793
|
+
58: <span class="ruby-identifier">setDirectReports</span>
|
|
1794
|
+
59: <span class="ruby-keyword kw">end</span></pre>
|
|
1705
1795
|
</div>
|
|
1706
1796
|
|
|
1707
1797
|
</div>
|
|
@@ -1738,17 +1828,17 @@ account.
|
|
|
1738
1828
|
<div class="method-source-code"
|
|
1739
1829
|
id="query-cost-source">
|
|
1740
1830
|
<pre>
|
|
1741
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1831
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 267</span>
|
|
1832
|
+
267: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_cost</span>(<span class="ruby-identifier">query</span>)
|
|
1833
|
+
268: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">costAccount</span>
|
|
1834
|
+
269: <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> =
|
|
1835
|
+
270: <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>,
|
|
1836
|
+
271: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
|
|
1837
|
+
272: <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>)
|
|
1838
|
+
273: <span class="ruby-keyword kw">else</span>
|
|
1839
|
+
274: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No cost account'</span>
|
|
1840
|
+
275: <span class="ruby-keyword kw">end</span>
|
|
1841
|
+
276: <span class="ruby-keyword kw">end</span></pre>
|
|
1752
1842
|
</div>
|
|
1753
1843
|
|
|
1754
1844
|
</div>
|
|
@@ -1784,12 +1874,12 @@ href="Task.html">Task</a> is taken into account.
|
|
|
1784
1874
|
<div class="method-source-code"
|
|
1785
1875
|
id="query-effort-source">
|
|
1786
1876
|
<pre>
|
|
1787
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1877
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 281</span>
|
|
1878
|
+
281: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_effort</span>(<span class="ruby-identifier">query</span>)
|
|
1879
|
+
282: <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> =
|
|
1880
|
+
283: <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>)
|
|
1881
|
+
284: <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>)
|
|
1882
|
+
285: <span class="ruby-keyword kw">end</span></pre>
|
|
1793
1883
|
</div>
|
|
1794
1884
|
|
|
1795
1885
|
</div>
|
|
@@ -1823,12 +1913,12 @@ during the specified interval.
|
|
|
1823
1913
|
<div class="method-source-code"
|
|
1824
1914
|
id="query-freetime-source">
|
|
1825
1915
|
<pre>
|
|
1826
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1916
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 288</span>
|
|
1917
|
+
288: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_freetime</span>(<span class="ruby-identifier">query</span>)
|
|
1918
|
+
289: <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> =
|
|
1919
|
+
290: <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>)
|
|
1920
|
+
291: <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>)
|
|
1921
|
+
292: <span class="ruby-keyword kw">end</span></pre>
|
|
1832
1922
|
</div>
|
|
1833
1923
|
|
|
1834
1924
|
</div>
|
|
@@ -1862,12 +1952,12 @@ the specified interval.
|
|
|
1862
1952
|
<div class="method-source-code"
|
|
1863
1953
|
id="query-freework-source">
|
|
1864
1954
|
<pre>
|
|
1865
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1955
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 295</span>
|
|
1956
|
+
295: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_freework</span>(<span class="ruby-identifier">query</span>)
|
|
1957
|
+
296: <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> =
|
|
1958
|
+
297: <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>)
|
|
1959
|
+
298: <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>)
|
|
1960
|
+
299: <span class="ruby-keyword kw">end</span></pre>
|
|
1871
1961
|
</div>
|
|
1872
1962
|
|
|
1873
1963
|
</div>
|
|
@@ -1900,11 +1990,11 @@ Get the rate of the resource.
|
|
|
1900
1990
|
<div class="method-source-code"
|
|
1901
1991
|
id="query-rate-source">
|
|
1902
1992
|
<pre>
|
|
1903
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1993
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 302</span>
|
|
1994
|
+
302: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_rate</span>(<span class="ruby-identifier">query</span>)
|
|
1995
|
+
303: <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>
|
|
1996
|
+
304: <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>)
|
|
1997
|
+
305: <span class="ruby-keyword kw">end</span></pre>
|
|
1908
1998
|
</div>
|
|
1909
1999
|
|
|
1910
2000
|
</div>
|
|
@@ -1941,17 +2031,17 @@ into account.
|
|
|
1941
2031
|
<div class="method-source-code"
|
|
1942
2032
|
id="query-revenue-source">
|
|
1943
2033
|
<pre>
|
|
1944
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
2034
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 310</span>
|
|
2035
|
+
310: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_revenue</span>(<span class="ruby-identifier">query</span>)
|
|
2036
|
+
311: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">revenueAccount</span>
|
|
2037
|
+
312: <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> =
|
|
2038
|
+
313: <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>,
|
|
2039
|
+
314: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span>)
|
|
2040
|
+
315: <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>)
|
|
2041
|
+
316: <span class="ruby-keyword kw">else</span>
|
|
2042
|
+
317: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">string</span> = <span class="ruby-value str">'No revenue account'</span>
|
|
2043
|
+
318: <span class="ruby-keyword kw">end</span>
|
|
2044
|
+
319: <span class="ruby-keyword kw">end</span></pre>
|
|
1955
2045
|
</div>
|
|
1956
2046
|
|
|
1957
2047
|
</div>
|
|
@@ -1986,12 +2076,12 @@ The result is in working days (effort).
|
|
|
1986
2076
|
<div class="method-source-code"
|
|
1987
2077
|
id="query-vacationdays-source">
|
|
1988
2078
|
<pre>
|
|
1989
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
2079
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 323</span>
|
|
2080
|
+
323: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_vacationdays</span>(<span class="ruby-identifier">query</span>)
|
|
2081
|
+
324: <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> =
|
|
2082
|
+
325: <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>)
|
|
2083
|
+
326: <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>)
|
|
2084
|
+
327: <span class="ruby-keyword kw">end</span></pre>
|
|
1995
2085
|
</div>
|
|
1996
2086
|
|
|
1997
2087
|
</div>
|
|
@@ -2022,20 +2112,20 @@ The result is in working days (effort).
|
|
|
2022
2112
|
<div class="method-source-code"
|
|
2023
2113
|
id="set-irect-eports-source">
|
|
2024
2114
|
<pre>
|
|
2025
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2115
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 80</span>
|
|
2116
|
+
80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setDirectReports</span>
|
|
2117
|
+
81: <span class="ruby-comment cmt"># Only leaf resources have reporting lines.</span>
|
|
2118
|
+
82: <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>
|
|
2119
|
+
83:
|
|
2120
|
+
84: <span class="ruby-comment cmt"># The 'directreports' attribute is the reverse link for the 'managers'</span>
|
|
2121
|
+
85: <span class="ruby-comment cmt"># attribute. In contrast to the 'managers' attribute, the</span>
|
|
2122
|
+
86: <span class="ruby-comment cmt"># 'directreports' list has no duplicate entries.</span>
|
|
2123
|
+
87: <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>
|
|
2124
|
+
88: <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>)
|
|
2125
|
+
89: <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>
|
|
2126
|
+
90: <span class="ruby-keyword kw">end</span>
|
|
2127
|
+
91: <span class="ruby-keyword kw">end</span>
|
|
2128
|
+
92: <span class="ruby-keyword kw">end</span></pre>
|
|
2039
2129
|
</div>
|
|
2040
2130
|
|
|
2041
2131
|
</div>
|
|
@@ -2066,14 +2156,14 @@ The result is in working days (effort).
|
|
|
2066
2156
|
<div class="method-source-code"
|
|
2067
2157
|
id="set-eports-source">
|
|
2068
2158
|
<pre>
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2159
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 94</span>
|
|
2160
|
+
94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setReports</span>
|
|
2161
|
+
95: <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>
|
|
2162
|
+
96:
|
|
2163
|
+
97: <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>
|
|
2164
|
+
98: <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> ])
|
|
2165
|
+
99: <span class="ruby-keyword kw">end</span>
|
|
2166
|
+
100: <span class="ruby-keyword kw">end</span></pre>
|
|
2077
2167
|
</div>
|
|
2078
2168
|
|
|
2079
2169
|
</div>
|
|
@@ -2104,22 +2194,22 @@ The result is in working days (effort).
|
|
|
2104
2194
|
<div class="method-source-code"
|
|
2105
2195
|
id="turnover-source">
|
|
2106
2196
|
<pre>
|
|
2107
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2197
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 443</span>
|
|
2198
|
+
443: <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>)
|
|
2199
|
+
444: <span class="ruby-identifier">amount</span> = <span class="ruby-value">0.0</span>
|
|
2200
|
+
445: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
2201
|
+
446: <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>
|
|
2202
|
+
447: <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>)
|
|
2203
|
+
448: <span class="ruby-keyword kw">end</span>
|
|
2204
|
+
449: <span class="ruby-keyword kw">else</span>
|
|
2205
|
+
450: <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>
|
|
2206
|
+
451: <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>,
|
|
2207
|
+
452: <span class="ruby-ivar">@property</span>)
|
|
2208
|
+
453: <span class="ruby-keyword kw">end</span>
|
|
2209
|
+
454: <span class="ruby-keyword kw">end</span>
|
|
2210
|
+
455:
|
|
2211
|
+
456: <span class="ruby-identifier">amount</span>
|
|
2212
|
+
457: <span class="ruby-keyword kw">end</span></pre>
|
|
2123
2213
|
</div>
|
|
2124
2214
|
|
|
2125
2215
|
</div>
|
|
@@ -2160,22 +2250,75 @@ nil only allocations to this tasks are respected.
|
|
|
2160
2250
|
<div class="method-source-code"
|
|
2161
2251
|
id="allocated-ub-source">
|
|
2162
2252
|
<pre>
|
|
2163
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2253
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 696</span>
|
|
2254
|
+
696: <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>)
|
|
2255
|
+
697: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
2256
|
+
698: <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>
|
|
2257
|
+
699: <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>,
|
|
2258
|
+
700: <span class="ruby-identifier">task</span>)
|
|
2259
|
+
701: <span class="ruby-keyword kw">end</span>
|
|
2260
|
+
702: <span class="ruby-keyword kw">else</span>
|
|
2261
|
+
703: <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>)
|
|
2262
|
+
704:
|
|
2263
|
+
705: <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>)
|
|
2264
|
+
706: <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>
|
|
2265
|
+
707:
|
|
2266
|
+
708: <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>
|
|
2267
|
+
709: <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>
|
|
2268
|
+
710: <span class="ruby-keyword kw">end</span>
|
|
2269
|
+
711: <span class="ruby-keyword kw">end</span>
|
|
2270
|
+
712: <span class="ruby-keyword kw">false</span>
|
|
2271
|
+
713: <span class="ruby-keyword kw">end</span></pre>
|
|
2272
|
+
</div>
|
|
2273
|
+
|
|
2274
|
+
</div>
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
</div>
|
|
2280
|
+
|
|
2281
|
+
|
|
2282
|
+
<div id="fit-ndicies-method" class="method-detail ">
|
|
2283
|
+
<a name="method-i-fitIndicies"></a>
|
|
2284
|
+
|
|
2285
|
+
<div class="method-heading">
|
|
2286
|
+
|
|
2287
|
+
<span class="method-name">fitIndicies</span><span
|
|
2288
|
+
class="method-args">(startIdx, endIdx, task = nil)</span>
|
|
2289
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
2290
|
+
|
|
2291
|
+
</div>
|
|
2292
|
+
|
|
2293
|
+
<div class="method-description">
|
|
2294
|
+
|
|
2295
|
+
<p>
|
|
2296
|
+
Limit the <em>startIdx</em> and <em>endIdx</em> to the actually assigned
|
|
2297
|
+
interval. If <em>task</em> is provided, fit it for the bookings of this
|
|
2298
|
+
particular task.
|
|
2299
|
+
</p>
|
|
2300
|
+
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
<div class="method-source-code"
|
|
2304
|
+
id="fit-ndicies-source">
|
|
2305
|
+
<pre>
|
|
2306
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 652</span>
|
|
2307
|
+
652: <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>)
|
|
2308
|
+
653: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>
|
|
2309
|
+
654: <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>
|
|
2310
|
+
655: <span class="ruby-identifier">startIdx</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@firstBookedSlots</span>[<span class="ruby-identifier">task</span>]
|
|
2311
|
+
656: <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>
|
|
2312
|
+
657: <span class="ruby-identifier">endIdx</span> <span class="ruby-operator">></span>
|
|
2313
|
+
658: <span class="ruby-ivar">@lastBookedSlots</span>[<span class="ruby-identifier">task</span>] <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
2314
|
+
659: <span class="ruby-keyword kw">else</span>
|
|
2315
|
+
660: <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>
|
|
2316
|
+
661: <span class="ruby-identifier">startIdx</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@firstBookedSlot</span>
|
|
2317
|
+
662: <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>
|
|
2318
|
+
663: <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>
|
|
2319
|
+
664: <span class="ruby-keyword kw">end</span>
|
|
2320
|
+
665: [ <span class="ruby-identifier">startIdx</span>, <span class="ruby-identifier">endIdx</span> ]
|
|
2321
|
+
666: <span class="ruby-keyword kw">end</span></pre>
|
|
2179
2322
|
</div>
|
|
2180
2323
|
|
|
2181
2324
|
</div>
|
|
@@ -2206,67 +2349,67 @@ nil only allocations to this tasks are respected.
|
|
|
2206
2349
|
<div class="method-source-code"
|
|
2207
2350
|
id="init-coreboard-source">
|
|
2208
2351
|
<pre>
|
|
2209
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2352
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 589</span>
|
|
2353
|
+
589: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initScoreboard</span>
|
|
2354
|
+
590: <span class="ruby-comment cmt"># Create scoreboard and mark all slots as unavailable</span>
|
|
2355
|
+
591: <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>],
|
|
2356
|
+
592: <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>], <span class="ruby-value">2</span>)
|
|
2357
|
+
593:
|
|
2358
|
+
594: <span class="ruby-comment cmt"># We'll need this frequently and can savely cache it here.</span>
|
|
2359
|
+
595: <span class="ruby-ivar">@shifts</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'shifts'</span>)
|
|
2360
|
+
596: <span class="ruby-ivar">@workinghours</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'workinghours'</span>)
|
|
2361
|
+
597:
|
|
2362
|
+
598: <span class="ruby-comment cmt"># Change all work time slots to nil (available) again.</span>
|
|
2363
|
+
599: <span class="ruby-identifier">date</span> = <span class="ruby-ivar">@scoreboard</span>.<span class="ruby-identifier">idxToDate</span>(<span class="ruby-value">0</span>)
|
|
2364
|
+
600: <span class="ruby-identifier">delta</span> = <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
|
|
2365
|
+
601: <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>
|
|
2366
|
+
602: <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>)
|
|
2367
|
+
603: <span class="ruby-identifier">date</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">delta</span>
|
|
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>
|
|
2389
|
+
625: <span class="ruby-keyword kw">end</span>
|
|
2390
|
+
626:
|
|
2391
|
+
627: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@shifts</span>.<span class="ruby-identifier">nil?</span>
|
|
2392
|
+
628: <span class="ruby-comment cmt"># Mark the vacations from all the shifts the resource is assigned to.</span>
|
|
2393
|
+
629: <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>
|
|
2394
|
+
630: <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>))
|
|
2395
|
+
631: <span class="ruby-comment cmt"># Check if the vacation replacement bit is set. In that case we copy</span>
|
|
2396
|
+
632: <span class="ruby-comment cmt"># the whole interval over to the resource scoreboard overriding any</span>
|
|
2397
|
+
633: <span class="ruby-comment cmt"># global vacations.</span>
|
|
2398
|
+
634: <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>
|
|
2399
|
+
635: <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>
|
|
2400
|
+
636: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">nil</span>
|
|
2401
|
+
637: <span class="ruby-keyword kw">else</span>
|
|
2402
|
+
638: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">v</span> & <span class="ruby-value">0x3E</span>
|
|
2403
|
+
639: <span class="ruby-keyword kw">end</span>
|
|
2404
|
+
640: <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>
|
|
2405
|
+
641: (<span class="ruby-identifier">v</span> & <span class="ruby-value">0x3C</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
2406
|
+
642: <span class="ruby-comment cmt"># We only add the shift vacations but don't turn global vacation</span>
|
|
2407
|
+
643: <span class="ruby-comment cmt"># slots into working slots again.</span>
|
|
2408
|
+
644: <span class="ruby-ivar">@scoreboard</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">v</span> & <span class="ruby-value">0x3E</span>
|
|
2409
|
+
645: <span class="ruby-keyword kw">end</span>
|
|
2410
|
+
646: <span class="ruby-keyword kw">end</span>
|
|
2411
|
+
647: <span class="ruby-keyword kw">end</span>
|
|
2412
|
+
648: <span class="ruby-keyword kw">end</span></pre>
|
|
2270
2413
|
</div>
|
|
2271
2414
|
|
|
2272
2415
|
</div>
|
|
@@ -2297,14 +2440,14 @@ nil only allocations to this tasks are respected.
|
|
|
2297
2440
|
<div class="method-source-code"
|
|
2298
2441
|
id="on-hift--source">
|
|
2299
2442
|
<pre>
|
|
2300
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2443
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 685</span>
|
|
2444
|
+
685: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
|
|
2445
|
+
686: <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>)
|
|
2446
|
+
687: <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>)
|
|
2447
|
+
688: <span class="ruby-keyword kw">else</span>
|
|
2448
|
+
689: <span class="ruby-ivar">@workinghours</span>.<span class="ruby-identifier">onShift?</span>(<span class="ruby-identifier">date</span>)
|
|
2449
|
+
690: <span class="ruby-keyword kw">end</span>
|
|
2450
|
+
691: <span class="ruby-keyword kw">end</span></pre>
|
|
2308
2451
|
</div>
|
|
2309
2452
|
|
|
2310
2453
|
</div>
|
|
@@ -2337,18 +2480,18 @@ Return the daily cost of a resource or resource group.
|
|
|
2337
2480
|
<div class="method-source-code"
|
|
2338
2481
|
id="rate-source">
|
|
2339
2482
|
<pre>
|
|
2340
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2483
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 716</span>
|
|
2484
|
+
716: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rate</span>
|
|
2485
|
+
717: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property</span>.<span class="ruby-identifier">container?</span>
|
|
2486
|
+
718: <span class="ruby-identifier">dailyRate</span> = <span class="ruby-value">0.0</span>
|
|
2487
|
+
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>
|
|
2488
|
+
720: <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>)
|
|
2489
|
+
721: <span class="ruby-keyword kw">end</span>
|
|
2490
|
+
722: <span class="ruby-identifier">dailyRate</span>
|
|
2491
|
+
723: <span class="ruby-keyword kw">else</span>
|
|
2492
|
+
724: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'rate'</span>)
|
|
2493
|
+
725: <span class="ruby-keyword kw">end</span>
|
|
2494
|
+
726: <span class="ruby-keyword kw">end</span></pre>
|
|
2352
2495
|
</div>
|
|
2353
2496
|
|
|
2354
2497
|
</div>
|
|
@@ -2379,23 +2522,23 @@ Return the daily cost of a resource or resource group.
|
|
|
2379
2522
|
<div class="method-source-code"
|
|
2380
2523
|
id="set-eports-i-source">
|
|
2381
2524
|
<pre>
|
|
2382
|
-
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2525
|
+
<span class="ruby-comment cmt"># File lib/ResourceScenario.rb, line 668</span>
|
|
2526
|
+
668: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setReports_i</span>(<span class="ruby-identifier">reports</span>)
|
|
2527
|
+
669: <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>)
|
|
2528
|
+
670: <span class="ruby-comment cmt"># A manager must never show up in the list of his/her own reports.</span>
|
|
2529
|
+
671: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'manager_loop'</span>,
|
|
2530
|
+
672: <span class="ruby-node">"Management loop detected. #{@property.fullId} has self "</span> <span class="ruby-operator">+</span>
|
|
2531
|
+
673: <span class="ruby-value str">"in list of reports"</span>)
|
|
2532
|
+
674: <span class="ruby-keyword kw">end</span>
|
|
2533
|
+
675: <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>
|
|
2534
|
+
676: <span class="ruby-comment cmt"># Resources can end up multiple times in the list if they have multiple</span>
|
|
2535
|
+
677: <span class="ruby-comment cmt"># reporting chains. We only need them once in the list.</span>
|
|
2536
|
+
678: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'reports'</span>).<span class="ruby-identifier">uniq!</span>
|
|
2537
|
+
679:
|
|
2538
|
+
680: <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>
|
|
2539
|
+
681: <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>))
|
|
2540
|
+
682: <span class="ruby-keyword kw">end</span>
|
|
2541
|
+
683: <span class="ruby-keyword kw">end</span></pre>
|
|
2399
2542
|
</div>
|
|
2400
2543
|
|
|
2401
2544
|
</div>
|