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
|
@@ -158,12 +158,18 @@
|
|
|
158
158
|
|
|
159
159
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
160
160
|
|
|
161
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
162
|
+
|
|
161
163
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
162
164
|
|
|
163
165
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
164
166
|
|
|
165
167
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
166
168
|
|
|
169
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
170
|
+
|
|
171
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
172
|
+
|
|
167
173
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
168
174
|
|
|
169
175
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -270,7 +276,7 @@
|
|
|
270
276
|
|
|
271
277
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
272
278
|
|
|
273
|
-
<li><a href="../TaskJuggler/
|
|
279
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
274
280
|
|
|
275
281
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
276
282
|
|
|
@@ -450,6 +456,10 @@
|
|
|
450
456
|
|
|
451
457
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
452
458
|
|
|
459
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
460
|
+
|
|
461
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
462
|
+
|
|
453
463
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
454
464
|
|
|
455
465
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -148,12 +148,18 @@
|
|
|
148
148
|
|
|
149
149
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
150
150
|
|
|
151
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
152
|
+
|
|
151
153
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
152
154
|
|
|
153
155
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
154
156
|
|
|
155
157
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
156
158
|
|
|
159
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
160
|
+
|
|
161
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
162
|
+
|
|
157
163
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
158
164
|
|
|
159
165
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -260,7 +266,7 @@
|
|
|
260
266
|
|
|
261
267
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
262
268
|
|
|
263
|
-
<li><a href="../TaskJuggler/
|
|
269
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
264
270
|
|
|
265
271
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
266
272
|
|
|
@@ -440,6 +446,10 @@
|
|
|
440
446
|
|
|
441
447
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
442
448
|
|
|
449
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
450
|
+
|
|
451
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
452
|
+
|
|
443
453
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
444
454
|
|
|
445
455
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -89,6 +89,8 @@
|
|
|
89
89
|
|
|
90
90
|
<li><a href="#method-i-attributeName">#attributeName</a></li>
|
|
91
91
|
|
|
92
|
+
<li><a href="#method-i-checkReports">#checkReports</a></li>
|
|
93
|
+
|
|
92
94
|
<li><a href="#method-i-checkTimeSheets">#checkTimeSheets</a></li>
|
|
93
95
|
|
|
94
96
|
<li><a href="#method-i-convertToDailyLoad">#convertToDailyLoad</a></li>
|
|
@@ -227,12 +229,18 @@
|
|
|
227
229
|
|
|
228
230
|
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
|
229
231
|
|
|
232
|
+
<li><a href="../TaskJuggler/CollisionDetector.html">TaskJuggler::CollisionDetector</a></li>
|
|
233
|
+
|
|
230
234
|
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
|
231
235
|
|
|
232
236
|
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
|
233
237
|
|
|
234
238
|
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
|
235
239
|
|
|
240
|
+
<li><a href="../TaskJuggler/DataCache.html">TaskJuggler::DataCache</a></li>
|
|
241
|
+
|
|
242
|
+
<li><a href="../TaskJuggler/DataCacheEntry.html">TaskJuggler::DataCacheEntry</a></li>
|
|
243
|
+
|
|
236
244
|
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
|
237
245
|
|
|
238
246
|
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
|
@@ -339,7 +347,7 @@
|
|
|
339
347
|
|
|
340
348
|
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
341
349
|
|
|
342
|
-
<li><a href="../TaskJuggler/
|
|
350
|
+
<li><a href="../TaskJuggler/PlaceHolderCell.html">TaskJuggler::PlaceHolderCell</a></li>
|
|
343
351
|
|
|
344
352
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
345
353
|
|
|
@@ -519,6 +527,10 @@
|
|
|
519
527
|
|
|
520
528
|
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
|
521
529
|
|
|
530
|
+
<li><a href="../TaskJuggler/TextParser/State.html">TaskJuggler::TextParser::State</a></li>
|
|
531
|
+
|
|
532
|
+
<li><a href="../TaskJuggler/TextParser/StateTransition.html">TaskJuggler::TextParser::StateTransition</a></li>
|
|
533
|
+
|
|
522
534
|
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
|
523
535
|
|
|
524
536
|
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
|
@@ -875,24 +887,24 @@ granularity is reduced.
|
|
|
875
887
|
<div class="method-source-code"
|
|
876
888
|
id="max-chedule-ranularity-source">
|
|
877
889
|
<pre>
|
|
878
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
890
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 847</span>
|
|
891
|
+
847: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Project</span>.<span class="ruby-identifier">maxScheduleGranularity</span>
|
|
892
|
+
848: <span class="ruby-identifier">refTime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">gm</span>(<span class="ruby-value">2000</span>, <span class="ruby-value">1</span>, <span class="ruby-value">1</span>, <span class="ruby-value">0</span>, <span class="ruby-value">0</span>, <span class="ruby-value">0</span>)
|
|
893
|
+
849: <span class="ruby-keyword kw">case</span> (<span class="ruby-identifier">min</span> = <span class="ruby-identifier">refTime</span>.<span class="ruby-identifier">getlocal</span>.<span class="ruby-identifier">min</span>)
|
|
894
|
+
850: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
|
|
895
|
+
851: <span class="ruby-comment cmt"># We are hour-aligned to UTC; scheduleGranularity is 1 hour</span>
|
|
896
|
+
852: <span class="ruby-value">60</span> * <span class="ruby-value">60</span>
|
|
897
|
+
853: <span class="ruby-keyword kw">when</span> <span class="ruby-value">30</span>
|
|
898
|
+
854: <span class="ruby-comment cmt"># We are half-hour off from UTC; scheduleGranularity is 30 minutes</span>
|
|
899
|
+
855: <span class="ruby-value">30</span> * <span class="ruby-value">60</span>
|
|
900
|
+
856: <span class="ruby-keyword kw">when</span> <span class="ruby-value">15</span>, <span class="ruby-value">45</span>
|
|
901
|
+
857: <span class="ruby-comment cmt"># We are 15 or 45 minutes off from UTC; scheduleGranularity is 15</span>
|
|
902
|
+
858: <span class="ruby-comment cmt"># minutes</span>
|
|
903
|
+
859: <span class="ruby-value">15</span> * <span class="ruby-value">60</span>
|
|
904
|
+
860: <span class="ruby-keyword kw">else</span>
|
|
905
|
+
861: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown Time zone alignment #{min}"</span>
|
|
906
|
+
862: <span class="ruby-keyword kw">end</span>
|
|
907
|
+
863: <span class="ruby-keyword kw">end</span></pre>
|
|
896
908
|
</div>
|
|
897
909
|
|
|
898
910
|
</div>
|
|
@@ -951,7 +963,7 @@ The constructor will set default values for all project attributes.
|
|
|
951
963
|
78: <span class="ruby-value str">'flags'</span> =<span class="ruby-operator">></span> [],
|
|
952
964
|
79: <span class="ruby-value str">'journal'</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Journal</span>.<span class="ruby-identifier">new</span>,
|
|
953
965
|
80: <span class="ruby-value str">'limits'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">nil</span>,
|
|
954
|
-
81: <span class="ruby-value str">'loadUnit'</span> =<span class="ruby-operator">></span> <span class="ruby-value">:
|
|
966
|
+
81: <span class="ruby-value str">'loadUnit'</span> =<span class="ruby-operator">></span> <span class="ruby-value">:days</span>,
|
|
955
967
|
82: <span class="ruby-value str">'name'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>,
|
|
956
968
|
83: <span class="ruby-value str">'navigators'</span> =<span class="ruby-operator">></span> {},
|
|
957
969
|
84: <span class="ruby-value str">'now'</span> =<span class="ruby-operator">></span> <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">align</span>(<span class="ruby-value">3600</span>),
|
|
@@ -970,7 +982,7 @@ The constructor will set default values for all project attributes.
|
|
|
970
982
|
97: <span class="ruby-value str">'vacations'</span> =<span class="ruby-operator">></span> [],
|
|
971
983
|
98: <span class="ruby-value str">'version'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">version</span> <span class="ruby-operator">||</span> <span class="ruby-value str">"1.0"</span>,
|
|
972
984
|
99: <span class="ruby-value str">'weekStartsMonday'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>,
|
|
973
|
-
100: <span class="ruby-value str">'workinghours'</span> =<span class="ruby-operator">></span> <span class="ruby-
|
|
985
|
+
100: <span class="ruby-value str">'workinghours'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">nil</span>,
|
|
974
986
|
101: <span class="ruby-value str">'yearlyworkingdays'</span> =<span class="ruby-operator">></span> <span class="ruby-value">260.714</span>
|
|
975
987
|
102: }
|
|
976
988
|
103:
|
|
@@ -1368,7 +1380,24 @@ to <em>value</em>.
|
|
|
1368
1380
|
430: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown project attribute #{name}"</span>
|
|
1369
1381
|
431: <span class="ruby-keyword kw">end</span>
|
|
1370
1382
|
432: <span class="ruby-ivar">@attributes</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
|
|
1371
|
-
433:
|
|
1383
|
+
433:
|
|
1384
|
+
434: <span class="ruby-comment cmt"># If the start, end or schedule granularity have been changed, we have</span>
|
|
1385
|
+
435: <span class="ruby-comment cmt"># to reset the working hours.</span>
|
|
1386
|
+
436: <span class="ruby-keyword kw">if</span> <span class="ruby-node">%(start end scheduleGranularity timezone timingresolution)</span>.
|
|
1387
|
+
437: <span class="ruby-identifier">include?</span>(<span class="ruby-identifier">name</span>)
|
|
1388
|
+
438: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-operator">&&</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'end'</span>]
|
|
1389
|
+
439: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'workinghours'</span>] =
|
|
1390
|
+
440: <span class="ruby-constant">WorkingHours</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'scheduleGranularity'</span>],
|
|
1391
|
+
441: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>], <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'end'</span>])
|
|
1392
|
+
442: <span class="ruby-comment cmt"># WorkingHours is using a copy-on-write scheme to prevent multiple</span>
|
|
1393
|
+
443: <span class="ruby-comment cmt"># copies of the same Scoreboard. All other WorkingHours objects are</span>
|
|
1394
|
+
444: <span class="ruby-comment cmt"># created as copies of this object. By calling</span>
|
|
1395
|
+
445: <span class="ruby-comment cmt"># WorkingHours::onShift? we make sure this instance has got a</span>
|
|
1396
|
+
446: <span class="ruby-comment cmt"># Scoreboard than gets reused by the other instances.</span>
|
|
1397
|
+
447: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'workinghours'</span>].<span class="ruby-identifier">onShift?</span>(<span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>])
|
|
1398
|
+
448: <span class="ruby-keyword kw">end</span>
|
|
1399
|
+
449: <span class="ruby-keyword kw">end</span>
|
|
1400
|
+
450: <span class="ruby-keyword kw">end</span></pre>
|
|
1372
1401
|
</div>
|
|
1373
1402
|
|
|
1374
1403
|
</div>
|
|
@@ -1402,10 +1431,10 @@ return nil if it does not exist.
|
|
|
1402
1431
|
<div class="method-source-code"
|
|
1403
1432
|
id="account-source">
|
|
1404
1433
|
<pre>
|
|
1405
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1434
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 553</span>
|
|
1435
|
+
553: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">account</span>(<span class="ruby-identifier">id</span>)
|
|
1436
|
+
554: <span class="ruby-ivar">@accounts</span>[<span class="ruby-identifier">id</span>]
|
|
1437
|
+
555: <span class="ruby-keyword kw">end</span></pre>
|
|
1409
1438
|
</div>
|
|
1410
1439
|
|
|
1411
1440
|
</div>
|
|
@@ -1441,11 +1470,11 @@ pound sign.
|
|
|
1441
1470
|
<div class="method-source-code"
|
|
1442
1471
|
id="alert-evel-olor-source">
|
|
1443
1472
|
<pre>
|
|
1444
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1473
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 485</span>
|
|
1474
|
+
485: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alertLevelColor</span>(<span class="ruby-identifier">levelIndex</span>)
|
|
1475
|
+
486: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'unknown'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>][<span class="ruby-identifier">levelIndex</span>]
|
|
1476
|
+
487: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>][<span class="ruby-identifier">levelIndex</span>][<span class="ruby-value">2</span>]
|
|
1477
|
+
488: <span class="ruby-keyword kw">end</span></pre>
|
|
1449
1478
|
</div>
|
|
1450
1479
|
|
|
1451
1480
|
</div>
|
|
@@ -1479,11 +1508,11 @@ Return the ID or keyword of the alert level with the given
|
|
|
1479
1508
|
<div class="method-source-code"
|
|
1480
1509
|
id="alert-evel-d-source">
|
|
1481
1510
|
<pre>
|
|
1482
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1511
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 470</span>
|
|
1512
|
+
470: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alertLevelId</span>(<span class="ruby-identifier">levelIndex</span>)
|
|
1513
|
+
471: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'unknown'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>][<span class="ruby-identifier">levelIndex</span>]
|
|
1514
|
+
472: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>][<span class="ruby-identifier">levelIndex</span>][<span class="ruby-value">0</span>]
|
|
1515
|
+
473: <span class="ruby-keyword kw">end</span></pre>
|
|
1487
1516
|
</div>
|
|
1488
1517
|
|
|
1489
1518
|
</div>
|
|
@@ -1517,15 +1546,15 @@ the index of it. If no level is found, nil is returned.
|
|
|
1517
1546
|
<div class="method-source-code"
|
|
1518
1547
|
id="alert-evel-ndex-source">
|
|
1519
1548
|
<pre>
|
|
1520
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1549
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 459</span>
|
|
1550
|
+
459: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alertLevelIndex</span>(<span class="ruby-identifier">levelName</span>)
|
|
1551
|
+
460: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>].<span class="ruby-identifier">length</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>
|
|
1552
|
+
461: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>][<span class="ruby-identifier">i</span>][<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">levelName</span>
|
|
1553
|
+
462: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">i</span>
|
|
1554
|
+
463: <span class="ruby-keyword kw">end</span>
|
|
1555
|
+
464: <span class="ruby-keyword kw">end</span>
|
|
1556
|
+
465: <span class="ruby-keyword kw">nil</span>
|
|
1557
|
+
466: <span class="ruby-keyword kw">end</span></pre>
|
|
1529
1558
|
</div>
|
|
1530
1559
|
|
|
1531
1560
|
</div>
|
|
@@ -1559,11 +1588,11 @@ Return the user readable name of the alert level with the given
|
|
|
1559
1588
|
<div class="method-source-code"
|
|
1560
1589
|
id="alert-evel-ame-source">
|
|
1561
1590
|
<pre>
|
|
1562
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1591
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 477</span>
|
|
1592
|
+
477: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alertLevelName</span>(<span class="ruby-identifier">levelIndex</span>)
|
|
1593
|
+
478: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'unknown'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>][<span class="ruby-identifier">levelIndex</span>]
|
|
1594
|
+
479: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alertLevels'</span>][<span class="ruby-identifier">levelIndex</span>][<span class="ruby-value">1</span>]
|
|
1595
|
+
480: <span class="ruby-keyword kw">end</span></pre>
|
|
1567
1596
|
</div>
|
|
1568
1597
|
|
|
1569
1598
|
</div>
|
|
@@ -1598,14 +1627,63 @@ tasks over resources here.
|
|
|
1598
1627
|
<div class="method-source-code"
|
|
1599
1628
|
id="attribute-ame-source">
|
|
1600
1629
|
<pre>
|
|
1601
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1630
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 868</span>
|
|
1631
|
+
868: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attributeName</span>(<span class="ruby-identifier">id</span>)
|
|
1632
|
+
869: <span class="ruby-comment cmt"># We have to see if the attribute id is a task or resource attribute and</span>
|
|
1633
|
+
870: <span class="ruby-comment cmt"># return it's name.</span>
|
|
1634
|
+
871: (<span class="ruby-identifier">name</span> = <span class="ruby-ivar">@tasks</span>.<span class="ruby-identifier">attributeName</span>(<span class="ruby-identifier">id</span>)).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span>
|
|
1635
|
+
872: (<span class="ruby-identifier">name</span> = <span class="ruby-ivar">@resources</span>.<span class="ruby-identifier">attributeName</span>(<span class="ruby-identifier">id</span>)).<span class="ruby-identifier">nil?</span>
|
|
1636
|
+
873: <span class="ruby-identifier">name</span>
|
|
1637
|
+
874: <span class="ruby-keyword kw">end</span></pre>
|
|
1638
|
+
</div>
|
|
1639
|
+
|
|
1640
|
+
</div>
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
</div>
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
<div id="check-eports-method" class="method-detail ">
|
|
1649
|
+
<a name="method-i-checkReports"></a>
|
|
1650
|
+
|
|
1651
|
+
<div class="method-heading">
|
|
1652
|
+
|
|
1653
|
+
<span class="method-name">checkReports</span><span
|
|
1654
|
+
class="method-args">()</span>
|
|
1655
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1656
|
+
|
|
1657
|
+
</div>
|
|
1658
|
+
|
|
1659
|
+
<div class="method-description">
|
|
1660
|
+
|
|
1661
|
+
<p>
|
|
1662
|
+
Make sure that we have a least one report defined that has an output
|
|
1663
|
+
format.
|
|
1664
|
+
</p>
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
<div class="method-source-code"
|
|
1669
|
+
id="check-eports-source">
|
|
1670
|
+
<pre>
|
|
1671
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 624</span>
|
|
1672
|
+
624: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkReports</span>
|
|
1673
|
+
625: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@reports</span>.<span class="ruby-identifier">empty?</span>
|
|
1674
|
+
626: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-value str">'no_report_defined'</span>,
|
|
1675
|
+
627: <span class="ruby-value str">"This project has no reports defined. "</span> <span class="ruby-operator">+</span>
|
|
1676
|
+
628: <span class="ruby-value str">"No output data will be generated."</span>)
|
|
1677
|
+
629: <span class="ruby-keyword kw">end</span>
|
|
1678
|
+
630:
|
|
1679
|
+
631: <span class="ruby-ivar">@reports</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">report</span><span class="ruby-operator">|</span>
|
|
1680
|
+
632: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'formats'</span>).<span class="ruby-identifier">empty?</span>
|
|
1681
|
+
633: <span class="ruby-keyword kw">end</span>
|
|
1682
|
+
634:
|
|
1683
|
+
635: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-value str">'all_formats_empty'</span>,
|
|
1684
|
+
636: <span class="ruby-value str">"None of the reports has a 'formats' attribute. "</span> <span class="ruby-operator">+</span>
|
|
1685
|
+
637: <span class="ruby-value str">"No output data will be generated."</span>)
|
|
1686
|
+
638: <span class="ruby-keyword kw">end</span></pre>
|
|
1609
1687
|
</div>
|
|
1610
1688
|
|
|
1611
1689
|
</div>
|
|
@@ -1636,10 +1714,10 @@ tasks over resources here.
|
|
|
1636
1714
|
<div class="method-source-code"
|
|
1637
1715
|
id="check-ime-heets-source">
|
|
1638
1716
|
<pre>
|
|
1639
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1717
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 732</span>
|
|
1718
|
+
732: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkTimeSheets</span>
|
|
1719
|
+
733: <span class="ruby-ivar">@timeSheets</span>.<span class="ruby-identifier">check</span>
|
|
1720
|
+
734: <span class="ruby-keyword kw">end</span></pre>
|
|
1643
1721
|
</div>
|
|
1644
1722
|
|
|
1645
1723
|
</div>
|
|
@@ -1673,10 +1751,10 @@ setting of the global ‘dailyworkinghours’ attribute.
|
|
|
1673
1751
|
<div class="method-source-code"
|
|
1674
1752
|
id="convert-o-aily-oad-source">
|
|
1675
1753
|
<pre>
|
|
1676
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1754
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 802</span>
|
|
1755
|
+
802: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convertToDailyLoad</span>(<span class="ruby-identifier">seconds</span>)
|
|
1756
|
+
803: <span class="ruby-identifier">seconds</span> <span class="ruby-operator">/</span> (<span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'dailyworkinghours'</span>] * <span class="ruby-value">3600.0</span>)
|
|
1757
|
+
804: <span class="ruby-keyword kw">end</span></pre>
|
|
1680
1758
|
</div>
|
|
1681
1759
|
|
|
1682
1760
|
</div>
|
|
@@ -1710,10 +1788,10 @@ can be set to other values by the user.
|
|
|
1710
1788
|
<div class="method-source-code"
|
|
1711
1789
|
id="daily-orking-ours-source">
|
|
1712
1790
|
<pre>
|
|
1713
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1791
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 492</span>
|
|
1792
|
+
492: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dailyWorkingHours</span>
|
|
1793
|
+
493: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'dailyworkinghours'</span>].<span class="ruby-identifier">to_f</span>
|
|
1794
|
+
494: <span class="ruby-keyword kw">end</span></pre>
|
|
1717
1795
|
</div>
|
|
1718
1796
|
|
|
1719
1797
|
</div>
|
|
@@ -1749,21 +1827,21 @@ time frame.
|
|
|
1749
1827
|
<div class="method-source-code"
|
|
1750
1828
|
id="date-o-dx-source">
|
|
1751
1829
|
<pre>
|
|
1752
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1830
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 828</span>
|
|
1831
|
+
828: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">forceIntoProject</span> = <span class="ruby-keyword kw">false</span>)
|
|
1832
|
+
829: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">date</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'end'</span>])
|
|
1833
|
+
830: <span class="ruby-comment cmt"># Date is out of range.</span>
|
|
1834
|
+
831: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">forceIntoProject</span>
|
|
1835
|
+
832: <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">date</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>]
|
|
1836
|
+
833: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">scoreboardSize</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'end'</span>]
|
|
1837
|
+
834: <span class="ruby-keyword kw">else</span>
|
|
1838
|
+
835: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Date #{date} is out of project time range "</span> <span class="ruby-operator">+</span>
|
|
1839
|
+
836: <span class="ruby-node">"(#{@attributes['start']} - #{@attributes['end']})"</span>
|
|
1840
|
+
837: <span class="ruby-keyword kw">end</span>
|
|
1841
|
+
838: <span class="ruby-keyword kw">end</span>
|
|
1842
|
+
839: <span class="ruby-comment cmt"># Calculate the corresponding index.</span>
|
|
1843
|
+
840: ((<span class="ruby-identifier">date</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>]) <span class="ruby-operator">/</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'scheduleGranularity'</span>]).<span class="ruby-identifier">to_i</span>
|
|
1844
|
+
841: <span class="ruby-keyword kw">end</span></pre>
|
|
1767
1845
|
</div>
|
|
1768
1846
|
|
|
1769
1847
|
</div>
|
|
@@ -1834,10 +1912,10 @@ This function sends an error message to the message handler.
|
|
|
1834
1912
|
<div class="method-source-code"
|
|
1835
1913
|
id="error-source">
|
|
1836
1914
|
<pre>
|
|
1837
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1915
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 890</span>
|
|
1916
|
+
890: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">text</span>)
|
|
1917
|
+
891: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">text</span>)
|
|
1918
|
+
892: <span class="ruby-keyword kw">end</span></pre>
|
|
1841
1919
|
</div>
|
|
1842
1920
|
|
|
1843
1921
|
</div>
|
|
@@ -1868,37 +1946,43 @@ This function sends an error message to the message handler.
|
|
|
1868
1946
|
<div class="method-source-code"
|
|
1869
1947
|
id="generate-eport-source">
|
|
1870
1948
|
<pre>
|
|
1871
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1949
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 682</span>
|
|
1950
|
+
682: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateReport</span>(<span class="ruby-identifier">reportId</span>, <span class="ruby-identifier">regExpMode</span>, <span class="ruby-identifier">dynamicAttributes</span> = <span class="ruby-keyword kw">nil</span>)
|
|
1951
|
+
683: <span class="ruby-identifier">reportList</span> = <span class="ruby-identifier">regExpMode</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">reportList</span> = <span class="ruby-identifier">matchingReports</span>(<span class="ruby-identifier">reportId</span>) <span class="ruby-operator">:</span>
|
|
1952
|
+
684: [ <span class="ruby-identifier">reportId</span> ]
|
|
1953
|
+
685: <span class="ruby-identifier">reportList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
|
|
1954
|
+
686: <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">report</span> = <span class="ruby-ivar">@reports</span>[<span class="ruby-identifier">id</span>])
|
|
1955
|
+
687: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'unknown_report_id'</span>,
|
|
1956
|
+
688: <span class="ruby-node">"Request to generate unknown report #{id}"</span>)
|
|
1957
|
+
689: <span class="ruby-keyword kw">end</span>
|
|
1958
|
+
690: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'formats'</span>).<span class="ruby-identifier">empty?</span>
|
|
1959
|
+
691: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">error</span>(<span class="ruby-value str">'formats_empty'</span>,
|
|
1960
|
+
692: <span class="ruby-node">"The report #{report.fullId} has no 'formats' attribute. "</span> <span class="ruby-operator">+</span>
|
|
1961
|
+
693: <span class="ruby-value str">"No output data will be generated."</span>)
|
|
1962
|
+
694: <span class="ruby-keyword kw">end</span>
|
|
1963
|
+
695:
|
|
1964
|
+
696: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">startProgressMeter</span>(<span class="ruby-node">"Report #{report.name}"</span>)
|
|
1965
|
+
697: <span class="ruby-ivar">@reportContexts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">context</span> = <span class="ruby-constant">ReportContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">report</span>))
|
|
1966
|
+
698:
|
|
1967
|
+
699: <span class="ruby-comment cmt"># If we have dynamic attributes we need to backup the old attributes</span>
|
|
1968
|
+
700: <span class="ruby-comment cmt"># first, then parse the dynamicAttributes String replacing the</span>
|
|
1969
|
+
701: <span class="ruby-comment cmt"># original values.</span>
|
|
1970
|
+
702: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dynamicAttributes</span>
|
|
1971
|
+
703: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">attributeBackup</span> = <span class="ruby-identifier">report</span>.<span class="ruby-identifier">backupAttributes</span>
|
|
1972
|
+
704: <span class="ruby-identifier">parser</span> = <span class="ruby-constant">ProjectFileParser</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@messageHandler</span>)
|
|
1973
|
+
705: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">parseReportAttributes</span>(<span class="ruby-identifier">report</span>, <span class="ruby-identifier">dynamicAttributes</span>)
|
|
1974
|
+
706: <span class="ruby-identifier">report</span>.<span class="ruby-identifier">set</span>(<span class="ruby-value str">'interactive'</span>, <span class="ruby-keyword kw">true</span>)
|
|
1975
|
+
707: <span class="ruby-keyword kw">end</span>
|
|
1976
|
+
708:
|
|
1977
|
+
709: <span class="ruby-identifier">report</span>.<span class="ruby-identifier">generate</span>
|
|
1978
|
+
710:
|
|
1979
|
+
711: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dynamicAttributes</span>
|
|
1980
|
+
712: <span class="ruby-identifier">report</span>.<span class="ruby-identifier">restoreAttributes</span>(<span class="ruby-identifier">context</span>.<span class="ruby-identifier">attributeBackup</span>)
|
|
1981
|
+
713: <span class="ruby-keyword kw">end</span>
|
|
1982
|
+
714: <span class="ruby-ivar">@reportContexts</span>.<span class="ruby-identifier">pop</span>
|
|
1983
|
+
715: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">stopProgressMeter</span>
|
|
1984
|
+
716: <span class="ruby-keyword kw">end</span>
|
|
1985
|
+
717: <span class="ruby-keyword kw">end</span></pre>
|
|
1902
1986
|
</div>
|
|
1903
1987
|
|
|
1904
1988
|
</div>
|
|
@@ -1933,46 +2017,46 @@ href="Project.html#method-i-schedule">Project#schedule</a> has been called.
|
|
|
1933
2017
|
<div class="method-source-code"
|
|
1934
2018
|
id="generate-eports-source">
|
|
1935
2019
|
<pre>
|
|
1936
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
2020
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 642</span>
|
|
2021
|
+
642: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateReports</span>(<span class="ruby-identifier">maxCpuCores</span>)
|
|
2022
|
+
643: <span class="ruby-ivar">@reports</span>.<span class="ruby-identifier">index</span>
|
|
2023
|
+
644: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">maxCpuCores</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
|
2024
|
+
645: <span class="ruby-ivar">@reports</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">report</span><span class="ruby-operator">|</span>
|
|
2025
|
+
646: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'formats'</span>).<span class="ruby-identifier">empty?</span>
|
|
2026
|
+
647: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">startProgressMeter</span>(<span class="ruby-node">"Report #{report.name}"</span>)
|
|
2027
|
+
648: <span class="ruby-ivar">@reportContexts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-constant">ReportContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">report</span>))
|
|
2028
|
+
649: <span class="ruby-identifier">report</span>.<span class="ruby-identifier">generate</span>
|
|
2029
|
+
650: <span class="ruby-ivar">@reportContexts</span>.<span class="ruby-identifier">pop</span>
|
|
2030
|
+
651: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">stopProgressMeter</span>
|
|
2031
|
+
652: <span class="ruby-keyword kw">end</span>
|
|
2032
|
+
653: <span class="ruby-keyword kw">else</span>
|
|
2033
|
+
654: <span class="ruby-comment cmt"># Kickoff the generation of all reports by pushing the jobs into the</span>
|
|
2034
|
+
655: <span class="ruby-comment cmt"># BatchProcessor queue.</span>
|
|
2035
|
+
656: <span class="ruby-identifier">bp</span> = <span class="ruby-constant">BatchProcessor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">maxCpuCores</span>)
|
|
2036
|
+
657: <span class="ruby-ivar">@reports</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">report</span><span class="ruby-operator">|</span>
|
|
2037
|
+
658: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'formats'</span>).<span class="ruby-identifier">empty?</span>
|
|
2038
|
+
659: <span class="ruby-identifier">bp</span>.<span class="ruby-identifier">queue</span>(<span class="ruby-identifier">report</span>) {
|
|
2039
|
+
660: <span class="ruby-ivar">@reportContexts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-constant">ReportContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">report</span>))
|
|
2040
|
+
661: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">report</span>.<span class="ruby-identifier">generate</span>
|
|
2041
|
+
662: <span class="ruby-ivar">@reportContexts</span>.<span class="ruby-identifier">pop</span>
|
|
2042
|
+
663: <span class="ruby-identifier">res</span>
|
|
2043
|
+
664: }
|
|
2044
|
+
665: <span class="ruby-keyword kw">end</span>
|
|
2045
|
+
666: <span class="ruby-comment cmt"># Now wait for all the jobs to finish.</span>
|
|
2046
|
+
667: <span class="ruby-identifier">bp</span>.<span class="ruby-identifier">wait</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">report</span><span class="ruby-operator">|</span>
|
|
2047
|
+
668: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">startProgressMeter</span>(<span class="ruby-node">"Report #{report.tag.name}"</span>)
|
|
2048
|
+
669: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">report</span>.<span class="ruby-identifier">stdout</span>)
|
|
2049
|
+
670: <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">report</span>.<span class="ruby-identifier">stderr</span>)
|
|
2050
|
+
671: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">report</span>.<span class="ruby-identifier">retVal</span>.<span class="ruby-identifier">signaled?</span>
|
|
2051
|
+
672: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">error</span>(<span class="ruby-value str">'rg_signal'</span>, <span class="ruby-value str">"Signal raised"</span>)
|
|
2052
|
+
673: <span class="ruby-keyword kw">end</span>
|
|
2053
|
+
674: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">report</span>.<span class="ruby-identifier">retVal</span>.<span class="ruby-identifier">success?</span>
|
|
2054
|
+
675: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">error</span>(<span class="ruby-value str">'rg_abort'</span>, <span class="ruby-value str">"Process aborted"</span>)
|
|
2055
|
+
676: <span class="ruby-keyword kw">end</span>
|
|
2056
|
+
677: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">stopProgressMeter</span>
|
|
2057
|
+
678: <span class="ruby-keyword kw">end</span>
|
|
2058
|
+
679: <span class="ruby-keyword kw">end</span>
|
|
2059
|
+
680: <span class="ruby-keyword kw">end</span></pre>
|
|
1976
2060
|
</div>
|
|
1977
2061
|
|
|
1978
2062
|
</div>
|
|
@@ -2008,13 +2092,13 @@ raised.
|
|
|
2008
2092
|
<div class="method-source-code"
|
|
2009
2093
|
id="idx-o-ate-source">
|
|
2010
2094
|
<pre>
|
|
2011
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2095
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 818</span>
|
|
2096
|
+
818: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">idxToDate</span>(<span class="ruby-identifier">idx</span>)
|
|
2097
|
+
819: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">idx</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">idx</span> <span class="ruby-operator">></span> <span class="ruby-identifier">scoreboardSize</span>)
|
|
2098
|
+
820: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Scoreboard index out of range"</span>
|
|
2099
|
+
821: <span class="ruby-keyword kw">end</span>
|
|
2100
|
+
822: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">idx</span> * <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'scheduleGranularity'</span>]
|
|
2101
|
+
823: <span class="ruby-keyword kw">end</span></pre>
|
|
2018
2102
|
</div>
|
|
2019
2103
|
|
|
2020
2104
|
</div>
|
|
@@ -2052,29 +2136,29 @@ defined and the slot lies within a defined working time period.
|
|
|
2052
2136
|
<div class="method-source-code"
|
|
2053
2137
|
id="is-orking-ime-source">
|
|
2054
2138
|
<pre>
|
|
2055
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2139
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 777</span>
|
|
2140
|
+
777: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">isWorkingTime</span>(*<span class="ruby-identifier">args</span>)
|
|
2141
|
+
778: <span class="ruby-comment cmt"># Normalize argument(s) to Interval</span>
|
|
2142
|
+
779: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
|
2143
|
+
780: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Interval</span>)
|
|
2144
|
+
781: <span class="ruby-identifier">iv</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
|
|
2145
|
+
782: <span class="ruby-keyword kw">else</span>
|
|
2146
|
+
783: <span class="ruby-identifier">iv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+</span>
|
|
2147
|
+
784: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'scheduleGranularity'</span>])
|
|
2148
|
+
785: <span class="ruby-keyword kw">end</span>
|
|
2149
|
+
786: <span class="ruby-keyword kw">else</span>
|
|
2150
|
+
787: <span class="ruby-identifier">iv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>])
|
|
2151
|
+
788: <span class="ruby-keyword kw">end</span>
|
|
2152
|
+
789:
|
|
2153
|
+
790: <span class="ruby-comment cmt"># Check if the interval has overlap with any of the global vacations.</span>
|
|
2154
|
+
791: <span class="ruby-ivar">@attributes</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>
|
|
2155
|
+
792: <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">vacation</span>.<span class="ruby-identifier">overlaps?</span>(<span class="ruby-identifier">iv</span>)
|
|
2156
|
+
793: <span class="ruby-keyword kw">end</span>
|
|
2157
|
+
794:
|
|
2158
|
+
795: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'workinghours'</span>].<span class="ruby-identifier">timeOff?</span>(<span class="ruby-identifier">iv</span>)
|
|
2159
|
+
796:
|
|
2160
|
+
797: <span class="ruby-keyword kw">true</span>
|
|
2161
|
+
798: <span class="ruby-keyword kw">end</span></pre>
|
|
2078
2162
|
</div>
|
|
2079
2163
|
|
|
2080
2164
|
</div>
|
|
@@ -2105,19 +2189,19 @@ defined and the slot lies within a defined working time period.
|
|
|
2105
2189
|
<div class="method-source-code"
|
|
2106
2190
|
id="list-eports-source">
|
|
2107
2191
|
<pre>
|
|
2108
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2192
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 719</span>
|
|
2193
|
+
719: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listReports</span>(<span class="ruby-identifier">reportId</span>, <span class="ruby-identifier">regExpMode</span>)
|
|
2194
|
+
720: <span class="ruby-identifier">reportList</span> = <span class="ruby-identifier">regExpMode</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">reportList</span> = <span class="ruby-identifier">matchingReports</span>(<span class="ruby-identifier">reportId</span>) <span class="ruby-operator">:</span>
|
|
2195
|
+
721: <span class="ruby-ivar">@reports</span>[<span class="ruby-identifier">reportId</span>] <span class="ruby-operator">?</span> [ <span class="ruby-identifier">reportId</span> ] <span class="ruby-operator">:</span> []
|
|
2196
|
+
722: <span class="ruby-identifier">puts</span> <span class="ruby-node">"No match for #{reportId}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">reportList</span>.<span class="ruby-identifier">empty?</span>
|
|
2197
|
+
723: <span class="ruby-identifier">reportList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
|
|
2198
|
+
724: <span class="ruby-identifier">report</span> = <span class="ruby-ivar">@reports</span>[<span class="ruby-identifier">id</span>]
|
|
2199
|
+
725: <span class="ruby-identifier">formats</span> = <span class="ruby-identifier">report</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'formats'</span>)
|
|
2200
|
+
726: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">formats</span>.<span class="ruby-identifier">empty?</span>
|
|
2201
|
+
727:
|
|
2202
|
+
728: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"%s\t%s\t%s"</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">formats</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>), <span class="ruby-identifier">report</span>.<span class="ruby-identifier">name</span>)
|
|
2203
|
+
729: <span class="ruby-keyword kw">end</span>
|
|
2204
|
+
730: <span class="ruby-keyword kw">end</span></pre>
|
|
2121
2205
|
</div>
|
|
2122
2206
|
|
|
2123
2207
|
</div>
|
|
@@ -2150,10 +2234,10 @@ Return the average number of working days per month.
|
|
|
2150
2234
|
<div class="method-source-code"
|
|
2151
2235
|
id="monthly-orking-ays-source">
|
|
2152
2236
|
<pre>
|
|
2153
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2237
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 502</span>
|
|
2238
|
+
502: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">monthlyWorkingDays</span>
|
|
2239
|
+
503: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'yearlyworkingdays'</span>] <span class="ruby-operator">/</span> <span class="ruby-value">12.0</span>
|
|
2240
|
+
504: <span class="ruby-keyword kw">end</span></pre>
|
|
2157
2241
|
</div>
|
|
2158
2242
|
|
|
2159
2243
|
</div>
|
|
@@ -2187,10 +2271,10 @@ return nil if it does not exist.
|
|
|
2187
2271
|
<div class="method-source-code"
|
|
2188
2272
|
id="report-source">
|
|
2189
2273
|
<pre>
|
|
2190
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2274
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 568</span>
|
|
2275
|
+
568: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">report</span>(<span class="ruby-identifier">id</span>)
|
|
2276
|
+
569: <span class="ruby-ivar">@reports</span>[<span class="ruby-identifier">id</span>]
|
|
2277
|
+
570: <span class="ruby-keyword kw">end</span></pre>
|
|
2194
2278
|
</div>
|
|
2195
2279
|
|
|
2196
2280
|
</div>
|
|
@@ -2224,13 +2308,13 @@ return nil if it does not exist.
|
|
|
2224
2308
|
<div class="method-source-code"
|
|
2225
2309
|
id="report-y-ame-source">
|
|
2226
2310
|
<pre>
|
|
2227
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2311
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 574</span>
|
|
2312
|
+
574: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reportByName</span>(<span class="ruby-identifier">name</span>)
|
|
2313
|
+
575: <span class="ruby-ivar">@reports</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">report</span><span class="ruby-operator">|</span>
|
|
2314
|
+
576: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">report</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">report</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span>
|
|
2315
|
+
577: <span class="ruby-keyword kw">end</span>
|
|
2316
|
+
578: <span class="ruby-keyword kw">nil</span>
|
|
2317
|
+
579: <span class="ruby-keyword kw">end</span></pre>
|
|
2234
2318
|
</div>
|
|
2235
2319
|
|
|
2236
2320
|
</div>
|
|
@@ -2264,10 +2348,10 @@ return nil if it does not exist.
|
|
|
2264
2348
|
<div class="method-source-code"
|
|
2265
2349
|
id="resource-source">
|
|
2266
2350
|
<pre>
|
|
2267
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2351
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 563</span>
|
|
2352
|
+
563: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resource</span>(<span class="ruby-identifier">id</span>)
|
|
2353
|
+
564: <span class="ruby-ivar">@resources</span>[<span class="ruby-identifier">id</span>]
|
|
2354
|
+
565: <span class="ruby-keyword kw">end</span></pre>
|
|
2271
2355
|
</div>
|
|
2272
2356
|
|
|
2273
2357
|
</div>
|
|
@@ -2301,17 +2385,17 @@ or <em>index</em>.
|
|
|
2301
2385
|
<div class="method-source-code"
|
|
2302
2386
|
id="scenario-source">
|
|
2303
2387
|
<pre>
|
|
2304
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2388
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 521</span>
|
|
2389
|
+
521: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scenario</span>(<span class="ruby-identifier">arg</span>)
|
|
2390
|
+
522: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Fixnum</span>)
|
|
2391
|
+
523: <span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sc</span><span class="ruby-operator">|</span>
|
|
2392
|
+
524: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sc</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sc</span>.<span class="ruby-identifier">sequenceNo</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">arg</span>
|
|
2393
|
+
525: <span class="ruby-keyword kw">end</span>
|
|
2394
|
+
526: <span class="ruby-keyword kw">else</span>
|
|
2395
|
+
527: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@scenarios</span>[<span class="ruby-identifier">arg</span>]
|
|
2396
|
+
528: <span class="ruby-keyword kw">end</span>
|
|
2397
|
+
529: <span class="ruby-keyword kw">nil</span>
|
|
2398
|
+
530: <span class="ruby-keyword kw">end</span></pre>
|
|
2315
2399
|
</div>
|
|
2316
2400
|
|
|
2317
2401
|
</div>
|
|
@@ -2344,10 +2428,10 @@ Return the number of defined scenarios for the project.
|
|
|
2344
2428
|
<div class="method-source-code"
|
|
2345
2429
|
id="scenario-ount-source">
|
|
2346
2430
|
<pre>
|
|
2347
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2431
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 453</span>
|
|
2432
|
+
453: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scenarioCount</span>
|
|
2433
|
+
454: <span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">items</span>
|
|
2434
|
+
455: <span class="ruby-keyword kw">end</span></pre>
|
|
2351
2435
|
</div>
|
|
2352
2436
|
|
|
2353
2437
|
</div>
|
|
@@ -2381,16 +2465,16 @@ specified by <em>scenario</em> or <em>id</em>.
|
|
|
2381
2465
|
<div class="method-source-code"
|
|
2382
2466
|
id="scenario-dx-source">
|
|
2383
2467
|
<pre>
|
|
2384
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2468
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 537</span>
|
|
2469
|
+
537: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scenarioIdx</span>(<span class="ruby-identifier">sc</span>)
|
|
2470
|
+
538: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sc</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Scenario</span>)
|
|
2471
|
+
539: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sc</span>.<span class="ruby-identifier">sequenceNo</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
|
2472
|
+
540: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@scenarios</span>[<span class="ruby-identifier">sc</span>].<span class="ruby-identifier">nil?</span>
|
|
2473
|
+
541: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
|
2474
|
+
542: <span class="ruby-keyword kw">else</span>
|
|
2475
|
+
543: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@scenarios</span>[<span class="ruby-identifier">sc</span>].<span class="ruby-identifier">sequenceNo</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
|
2476
|
+
544: <span class="ruby-keyword kw">end</span>
|
|
2477
|
+
545: <span class="ruby-keyword kw">end</span></pre>
|
|
2394
2478
|
</div>
|
|
2395
2479
|
|
|
2396
2480
|
</div>
|
|
@@ -2425,44 +2509,44 @@ stores the result in the data structures again.
|
|
|
2425
2509
|
<div class="method-source-code"
|
|
2426
2510
|
id="schedule-source">
|
|
2427
2511
|
<pre>
|
|
2428
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
573:
|
|
2436
|
-
574: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@tasks</span>.<span class="ruby-identifier">empty?</span>
|
|
2437
|
-
575: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">error</span>(<span class="ruby-value str">'no_tasks'</span>, <span class="ruby-value str">"No tasks defined"</span>)
|
|
2438
|
-
576: <span class="ruby-keyword kw">end</span>
|
|
2439
|
-
577:
|
|
2440
|
-
578: <span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sc</span><span class="ruby-operator">|</span>
|
|
2441
|
-
579: <span class="ruby-comment cmt"># Skip disabled scenarios</span>
|
|
2442
|
-
580: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sc</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'enabled'</span>)
|
|
2443
|
-
581:
|
|
2444
|
-
582: <span class="ruby-identifier">scIdx</span> = <span class="ruby-identifier">scenarioIdx</span>(<span class="ruby-identifier">sc</span>)
|
|
2445
|
-
583:
|
|
2446
|
-
584: <span class="ruby-comment cmt"># All user provided values are set now. The next step is to</span>
|
|
2447
|
-
585: <span class="ruby-comment cmt"># propagate inherited values. These values must be marked as</span>
|
|
2448
|
-
586: <span class="ruby-comment cmt"># inherited by setting the mode to 1. As we always call</span>
|
|
2449
|
-
587: <span class="ruby-comment cmt"># PropertyTreeNode#inherit this is just a safeguard.</span>
|
|
2450
|
-
588: <span class="ruby-constant">AttributeBase</span>.<span class="ruby-identifier">setMode</span>(<span class="ruby-value">1</span>)
|
|
2451
|
-
589: <span class="ruby-identifier">prepareScenario</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2512
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 584</span>
|
|
2513
|
+
584: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">schedule</span>
|
|
2514
|
+
585: [ <span class="ruby-ivar">@shifts</span>, <span class="ruby-ivar">@resources</span>, <span class="ruby-ivar">@tasks</span> ].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
|
2515
|
+
586: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">inheritAttributesFromScenario</span>
|
|
2516
|
+
587: <span class="ruby-comment cmt"># Set all index counters to their proper values.</span>
|
|
2517
|
+
588: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">index</span>
|
|
2518
|
+
589: <span class="ruby-keyword kw">end</span>
|
|
2452
2519
|
590:
|
|
2453
|
-
591:
|
|
2454
|
-
592: <span class="ruby-
|
|
2455
|
-
593:
|
|
2456
|
-
594:
|
|
2457
|
-
595:
|
|
2458
|
-
596:
|
|
2459
|
-
597: <span class="ruby-
|
|
2460
|
-
598:
|
|
2461
|
-
599:
|
|
2520
|
+
591: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@tasks</span>.<span class="ruby-identifier">empty?</span>
|
|
2521
|
+
592: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">error</span>(<span class="ruby-value str">'no_tasks'</span>, <span class="ruby-value str">"No tasks defined"</span>)
|
|
2522
|
+
593: <span class="ruby-keyword kw">end</span>
|
|
2523
|
+
594:
|
|
2524
|
+
595: <span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sc</span><span class="ruby-operator">|</span>
|
|
2525
|
+
596: <span class="ruby-comment cmt"># Skip disabled scenarios</span>
|
|
2526
|
+
597: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sc</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'enabled'</span>)
|
|
2527
|
+
598:
|
|
2528
|
+
599: <span class="ruby-identifier">scIdx</span> = <span class="ruby-identifier">scenarioIdx</span>(<span class="ruby-identifier">sc</span>)
|
|
2462
2529
|
600:
|
|
2463
|
-
601:
|
|
2464
|
-
602:
|
|
2465
|
-
603:
|
|
2530
|
+
601: <span class="ruby-comment cmt"># All user provided values are set now. The next step is to</span>
|
|
2531
|
+
602: <span class="ruby-comment cmt"># propagate inherited values. These values must be marked as</span>
|
|
2532
|
+
603: <span class="ruby-comment cmt"># inherited by setting the mode to 1. As we always call</span>
|
|
2533
|
+
604: <span class="ruby-comment cmt"># PropertyTreeNode#inherit this is just a safeguard.</span>
|
|
2534
|
+
605: <span class="ruby-constant">AttributeBase</span>.<span class="ruby-identifier">setMode</span>(<span class="ruby-value">1</span>)
|
|
2535
|
+
606: <span class="ruby-identifier">prepareScenario</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2536
|
+
607:
|
|
2537
|
+
608: <span class="ruby-comment cmt"># Now change to mode 2 so all values that are modified are marked</span>
|
|
2538
|
+
609: <span class="ruby-comment cmt"># as computed.</span>
|
|
2539
|
+
610: <span class="ruby-constant">AttributeBase</span>.<span class="ruby-identifier">setMode</span>(<span class="ruby-value">2</span>)
|
|
2540
|
+
611: <span class="ruby-comment cmt"># Schedule the scenario.</span>
|
|
2541
|
+
612: <span class="ruby-identifier">scheduleScenario</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2542
|
+
613:
|
|
2543
|
+
614: <span class="ruby-comment cmt"># Complete the data sets, and check the result.</span>
|
|
2544
|
+
615: <span class="ruby-identifier">finishScenario</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2545
|
+
616: <span class="ruby-keyword kw">end</span>
|
|
2546
|
+
617:
|
|
2547
|
+
618: <span class="ruby-ivar">@timeSheets</span>.<span class="ruby-identifier">warnOnDelta</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@warnTsDeltas</span>
|
|
2548
|
+
619: <span class="ruby-keyword kw">true</span>
|
|
2549
|
+
620: <span class="ruby-keyword kw">end</span></pre>
|
|
2466
2550
|
</div>
|
|
2467
2551
|
|
|
2468
2552
|
</div>
|
|
@@ -2498,11 +2582,11 @@ number of entries in the scoreboards.
|
|
|
2498
2582
|
<div class="method-source-code"
|
|
2499
2583
|
id="scoreboard-ize-source">
|
|
2500
2584
|
<pre>
|
|
2501
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2585
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 810</span>
|
|
2586
|
+
810: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scoreboardSize</span>
|
|
2587
|
+
811: ((<span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'end'</span>] <span class="ruby-operator">-</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'start'</span>]) <span class="ruby-operator">/</span>
|
|
2588
|
+
812: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'scheduleGranularity'</span>]).<span class="ruby-identifier">to_i</span>
|
|
2589
|
+
813: <span class="ruby-keyword kw">end</span></pre>
|
|
2506
2590
|
</div>
|
|
2507
2591
|
|
|
2508
2592
|
</div>
|
|
@@ -2536,10 +2620,10 @@ nil if it does not exist.
|
|
|
2536
2620
|
<div class="method-source-code"
|
|
2537
2621
|
id="shift-source">
|
|
2538
2622
|
<pre>
|
|
2539
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2623
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 548</span>
|
|
2624
|
+
548: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">id</span>)
|
|
2625
|
+
549: <span class="ruby-ivar">@shifts</span>[<span class="ruby-identifier">id</span>]
|
|
2626
|
+
550: <span class="ruby-keyword kw">end</span></pre>
|
|
2543
2627
|
</div>
|
|
2544
2628
|
|
|
2545
2629
|
</div>
|
|
@@ -2572,10 +2656,10 @@ Convert timeSlots to working days.
|
|
|
2572
2656
|
<div class="method-source-code"
|
|
2573
2657
|
id="slots-o-ays-source">
|
|
2574
2658
|
<pre>
|
|
2575
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2659
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 512</span>
|
|
2660
|
+
512: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">slotsToDays</span>(<span class="ruby-identifier">slots</span>)
|
|
2661
|
+
513: <span class="ruby-identifier">slots</span> * <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'scheduleGranularity'</span>] <span class="ruby-operator">/</span> (<span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-identifier">dailyWorkingHours</span>)
|
|
2662
|
+
514: <span class="ruby-keyword kw">end</span></pre>
|
|
2579
2663
|
</div>
|
|
2580
2664
|
|
|
2581
2665
|
</div>
|
|
@@ -2609,10 +2693,10 @@ nil if it does not exist.
|
|
|
2609
2693
|
<div class="method-source-code"
|
|
2610
2694
|
id="task-source">
|
|
2611
2695
|
<pre>
|
|
2612
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2696
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 558</span>
|
|
2697
|
+
558: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">task</span>(<span class="ruby-identifier">id</span>)
|
|
2698
|
+
559: <span class="ruby-ivar">@tasks</span>[<span class="ruby-identifier">id</span>]
|
|
2699
|
+
560: <span class="ruby-keyword kw">end</span></pre>
|
|
2616
2700
|
</div>
|
|
2617
2701
|
|
|
2618
2702
|
</div>
|
|
@@ -2645,18 +2729,18 @@ Print the attribute values. It’s used for debugging only.
|
|
|
2645
2729
|
<div class="method-source-code"
|
|
2646
2730
|
id="to-s-source">
|
|
2647
2731
|
<pre>
|
|
2648
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2732
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 877</span>
|
|
2733
|
+
877: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
|
2734
|
+
878: <span class="ruby-comment cmt">#raise "STOP!"</span>
|
|
2735
|
+
879: <span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
|
|
2736
|
+
880: <span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attribute</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
|
2737
|
+
881: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>
|
|
2738
|
+
882: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"#{attribute}: "</span> <span class="ruby-operator">+</span>
|
|
2739
|
+
883: <span class="ruby-node">"#{value.is_a?(PropertyTreeNode) ? value.fullId : value}"</span>
|
|
2740
|
+
884: <span class="ruby-keyword kw">end</span>
|
|
2741
|
+
885: <span class="ruby-keyword kw">end</span>
|
|
2742
|
+
886: <span class="ruby-identifier">str</span>
|
|
2743
|
+
887: <span class="ruby-keyword kw">end</span></pre>
|
|
2660
2744
|
</div>
|
|
2661
2745
|
|
|
2662
2746
|
</div>
|
|
@@ -2689,10 +2773,10 @@ Return the average number of working days per week.
|
|
|
2689
2773
|
<div class="method-source-code"
|
|
2690
2774
|
id="weekly-orking-ays-source">
|
|
2691
2775
|
<pre>
|
|
2692
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2776
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 497</span>
|
|
2777
|
+
497: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weeklyWorkingDays</span>
|
|
2778
|
+
498: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'yearlyworkingdays'</span>] <span class="ruby-operator">/</span> <span class="ruby-value">52.1429</span>
|
|
2779
|
+
499: <span class="ruby-keyword kw">end</span></pre>
|
|
2696
2780
|
</div>
|
|
2697
2781
|
|
|
2698
2782
|
</div>
|
|
@@ -2725,10 +2809,10 @@ Return the average number of working days per year.
|
|
|
2725
2809
|
<div class="method-source-code"
|
|
2726
2810
|
id="yearly-orking-ays-source">
|
|
2727
2811
|
<pre>
|
|
2728
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2812
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 507</span>
|
|
2813
|
+
507: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">yearlyWorkingDays</span>
|
|
2814
|
+
508: <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'yearlyworkingdays'</span>].<span class="ruby-identifier">to_f</span>
|
|
2815
|
+
509: <span class="ruby-keyword kw">end</span></pre>
|
|
2732
2816
|
</div>
|
|
2733
2817
|
|
|
2734
2818
|
</div>
|
|
@@ -2765,31 +2849,34 @@ Return the average number of working days per year.
|
|
|
2765
2849
|
<div class="method-source-code"
|
|
2766
2850
|
id="finish-cenario-source">
|
|
2767
2851
|
<pre>
|
|
2768
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2852
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 963</span>
|
|
2853
|
+
963: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">finishScenario</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2854
|
+
964: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">startProgressMeter</span>(<span class="ruby-node">"Checking scenario #{scenario(scIdx).get('name')}"</span>)
|
|
2855
|
+
965: <span class="ruby-ivar">@tasks</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>
|
|
2856
|
+
966: <span class="ruby-comment cmt"># Recursively traverse the top-level tasks to finish all tasks.</span>
|
|
2857
|
+
967: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">finishScheduling</span>(<span class="ruby-identifier">scIdx</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>
|
|
2858
|
+
968: <span class="ruby-keyword kw">end</span>
|
|
2859
|
+
969:
|
|
2860
|
+
970: <span class="ruby-ivar">@resources</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>
|
|
2861
|
+
971: <span class="ruby-comment cmt"># Recursively traverse the top-level resources to finish them all.</span>
|
|
2862
|
+
972: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">finishScheduling</span>(<span class="ruby-identifier">scIdx</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">parent</span>
|
|
2863
|
+
973: <span class="ruby-keyword kw">end</span>
|
|
2864
|
+
974:
|
|
2865
|
+
975: <span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
|
2866
|
+
976: <span class="ruby-identifier">total</span> = <span class="ruby-ivar">@tasks</span>.<span class="ruby-identifier">items</span>
|
|
2867
|
+
977: <span class="ruby-ivar">@tasks</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>
|
|
2868
|
+
978: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">postScheduleCheck</span>(<span class="ruby-identifier">scIdx</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
|
|
2869
|
+
979: <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
2870
|
+
980: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">total</span>)
|
|
2871
|
+
981: <span class="ruby-keyword kw">end</span>
|
|
2872
|
+
982:
|
|
2873
|
+
983: <span class="ruby-comment cmt"># This should be really fast so we don't log progess.</span>
|
|
2874
|
+
984: <span class="ruby-ivar">@resources</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>
|
|
2875
|
+
985: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">postScheduleCheck</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2876
|
+
986: <span class="ruby-keyword kw">end</span>
|
|
2877
|
+
987:
|
|
2878
|
+
988: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">stopProgressMeter</span>
|
|
2879
|
+
989: <span class="ruby-keyword kw">end</span></pre>
|
|
2793
2880
|
</div>
|
|
2794
2881
|
|
|
2795
2882
|
</div>
|
|
@@ -2820,73 +2907,73 @@ Return the average number of working days per year.
|
|
|
2820
2907
|
<div class="method-source-code"
|
|
2821
2908
|
id="prepare-cenario-source">
|
|
2822
2909
|
<pre>
|
|
2823
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2910
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 896</span>
|
|
2911
|
+
896: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prepareScenario</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2912
|
+
897: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">startProgressMeter</span>(<span class="ruby-value str">"Preparing scenario "</span> <span class="ruby-operator">+</span>
|
|
2913
|
+
898: <span class="ruby-node">"#{scenario(scIdx).get('name')}"</span>)
|
|
2914
|
+
899: <span class="ruby-identifier">resources</span> = <span class="ruby-constant">PropertyList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@resources</span>)
|
|
2915
|
+
900: <span class="ruby-identifier">tasks</span> = <span class="ruby-constant">PropertyList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@tasks</span>)
|
|
2916
|
+
901:
|
|
2917
|
+
902: <span class="ruby-comment cmt"># Compile a list of leaf resources that are actually used in this</span>
|
|
2918
|
+
903: <span class="ruby-comment cmt"># project.</span>
|
|
2919
|
+
904: <span class="ruby-identifier">usedResources</span> = []
|
|
2920
|
+
905: <span class="ruby-identifier">tasks</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>
|
|
2921
|
+
906: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">candidates</span>(<span class="ruby-identifier">scIdx</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>
|
|
2922
|
+
907: <span class="ruby-identifier">usedResources</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">resource</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">usedResources</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">resource</span>)
|
|
2923
|
+
908: <span class="ruby-keyword kw">end</span>
|
|
2924
|
+
909: <span class="ruby-keyword kw">end</span>
|
|
2925
|
+
910: <span class="ruby-identifier">total</span> = <span class="ruby-identifier">usedResources</span>.<span class="ruby-identifier">length</span>
|
|
2926
|
+
911: <span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
|
2927
|
+
912: <span class="ruby-identifier">usedResources</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>
|
|
2928
|
+
913: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">prepareScheduling</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2929
|
+
914: <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">preScheduleCheck</span>(<span class="ruby-identifier">scIdx</span>)
|
|
2930
|
+
915: <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
2931
|
+
916: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>((<span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">total</span>) * <span class="ruby-value">0.8</span>)
|
|
2932
|
+
917: <span class="ruby-keyword kw">end</span>
|
|
2933
|
+
918:
|
|
2934
|
+
919: <span class="ruby-identifier">resources</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">setDirectReports</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2935
|
+
920: <span class="ruby-identifier">resources</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">setReports</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2936
|
+
921:
|
|
2937
|
+
922: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">prepareScheduling</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2938
|
+
923: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-constant">Xref</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2939
|
+
924: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">propagateInitialValues</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2940
|
+
925: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">preScheduleCheck</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2941
|
+
926:
|
|
2942
|
+
927: <span class="ruby-comment cmt"># Check for dependency loops in the task graph.</span>
|
|
2943
|
+
928: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">resetLoopFlags</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2944
|
+
929: <span class="ruby-identifier">tasks</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>
|
|
2945
|
+
930: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">checkForLoops</span>(<span class="ruby-identifier">scIdx</span>, [], <span class="ruby-keyword kw">false</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
|
|
2946
|
+
931: <span class="ruby-keyword kw">end</span>
|
|
2947
|
+
932: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-value">0.85</span>)
|
|
2948
|
+
933: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">resetLoopFlags</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2949
|
+
934: <span class="ruby-identifier">tasks</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>
|
|
2950
|
+
935: <span class="ruby-identifier">task</span>.<span class="ruby-identifier">checkForLoops</span>(<span class="ruby-identifier">scIdx</span>, [], <span class="ruby-keyword kw">true</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
|
|
2951
|
+
936: <span class="ruby-keyword kw">end</span>
|
|
2952
|
+
937: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-value">0.87</span>)
|
|
2953
|
+
938:
|
|
2954
|
+
939: <span class="ruby-comment cmt"># Compute the criticalness of the tasks and their pathes.</span>
|
|
2955
|
+
940: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">countResourceAllocations</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2956
|
+
941: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-value">0.88</span>)
|
|
2957
|
+
942: <span class="ruby-identifier">resources</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">calcCriticalness</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2958
|
+
943: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-value">0.9</span>)
|
|
2959
|
+
944: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">calcCriticalness</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2960
|
+
945: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-value">0.95</span>)
|
|
2961
|
+
946: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">calcPathCriticalness</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
2962
|
+
947: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-value">0.99</span>)
|
|
2963
|
+
948: <span class="ruby-ivar">@timeSheets</span>.<span class="ruby-identifier">check</span>
|
|
2964
|
+
949: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-value">1.0</span>)
|
|
2965
|
+
950:
|
|
2966
|
+
951: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">stopProgressMeter</span>
|
|
2967
|
+
952: <span class="ruby-comment cmt"># This is used for debugging only</span>
|
|
2968
|
+
953: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">false</span>
|
|
2969
|
+
954: <span class="ruby-identifier">resources</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>
|
|
2970
|
+
955: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{resource}"</span>
|
|
2971
|
+
956: <span class="ruby-keyword kw">end</span>
|
|
2972
|
+
957: <span class="ruby-identifier">tasks</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>
|
|
2973
|
+
958: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{task}"</span>
|
|
2974
|
+
959: <span class="ruby-keyword kw">end</span>
|
|
2975
|
+
960: <span class="ruby-keyword kw">end</span>
|
|
2976
|
+
961: <span class="ruby-keyword kw">end</span></pre>
|
|
2890
2977
|
</div>
|
|
2891
2978
|
|
|
2892
2979
|
</div>
|
|
@@ -2920,85 +3007,85 @@ index <tt>scIdx</tt>.
|
|
|
2920
3007
|
<div class="method-source-code"
|
|
2921
3008
|
id="schedule-cenario-source">
|
|
2922
3009
|
<pre>
|
|
2923
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3010
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 992</span>
|
|
3011
|
+
992: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scheduleScenario</span>(<span class="ruby-identifier">scIdx</span>)
|
|
3012
|
+
993: <span class="ruby-identifier">tasks</span> = <span class="ruby-constant">PropertyList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@tasks</span>)
|
|
3013
|
+
994: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">delete_if</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">task</span>.<span class="ruby-identifier">leaf?</span> }
|
|
3014
|
+
995:
|
|
3015
|
+
996: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">enter</span>(<span class="ruby-value str">'scheduleScenario'</span>, <span class="ruby-node">"#{tasks.length} leaf tasks"</span>)
|
|
3016
|
+
997: <span class="ruby-comment cmt"># The sorting of the work item list determines which tasks will get their</span>
|
|
3017
|
+
998: <span class="ruby-comment cmt"># resources first. The first sorting criterium is the user specified task</span>
|
|
3018
|
+
999: <span class="ruby-comment cmt"># priority. The second criterium is the scheduler determined priority</span>
|
|
3019
|
+
1000: <span class="ruby-comment cmt"># stored in the pathcriticalness attribute. That way, the user can always</span>
|
|
3020
|
+
1001: <span class="ruby-comment cmt"># override the scheduler determined priority. To always have a defined</span>
|
|
3021
|
+
1002: <span class="ruby-comment cmt"># order, the third criterium is the sequence number.</span>
|
|
3022
|
+
1003: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">setSorting</span>([ [ <span class="ruby-value str">'priority'</span>, <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">scIdx</span> ],
|
|
3023
|
+
1004: [ <span class="ruby-value str">'pathcriticalness'</span>, <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">scIdx</span> ],
|
|
3024
|
+
1005: [ <span class="ruby-value str">'seqno'</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-value">1</span> ] ])
|
|
3025
|
+
1006: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">sort!</span>
|
|
3026
|
+
1007: <span class="ruby-identifier">totalTasks</span> = <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">length</span>
|
|
3027
|
+
1008:
|
|
3028
|
+
1009: <span class="ruby-comment cmt"># Enter the main scheduling loop. This loop is only terminated when all</span>
|
|
3029
|
+
1010: <span class="ruby-comment cmt"># tasks have been scheduled or another thread has set the breakFlag to</span>
|
|
3030
|
+
1011: <span class="ruby-comment cmt"># true.</span>
|
|
3031
|
+
1012: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">startProgressMeter</span>(<span class="ruby-value str">"Scheduling scenario "</span> <span class="ruby-operator">+</span>
|
|
3032
|
+
1013: <span class="ruby-node">"#{scenario(scIdx).get('name')}"</span>)
|
|
3033
|
+
1014: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
|
3034
|
+
1015: <span class="ruby-comment cmt"># The main scheduler loop only needs to look at the first task that is</span>
|
|
3035
|
+
1016: <span class="ruby-comment cmt"># ready to be scheduled.</span>
|
|
3036
|
+
1017: <span class="ruby-identifier">workItems</span> = <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">to_ary</span>
|
|
3037
|
+
1018:
|
|
3038
|
+
1019: <span class="ruby-comment cmt"># Count the already completed tasks.</span>
|
|
3039
|
+
1020: <span class="ruby-identifier">completedTasks</span> = <span class="ruby-value">0</span>
|
|
3040
|
+
1021: <span class="ruby-identifier">workItems</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>
|
|
3041
|
+
1022: <span class="ruby-identifier">completedTasks</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-identifier">scIdx</span>]
|
|
3042
|
+
1023: <span class="ruby-keyword kw">end</span>
|
|
3043
|
+
1024:
|
|
3044
|
+
1025: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-identifier">completedTasks</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">totalTasks</span>)
|
|
3045
|
+
1026: <span class="ruby-comment cmt"># Remove all tasks that are not ready for scheduling yet.</span>
|
|
3046
|
+
1027: <span class="ruby-identifier">workItems</span>.<span class="ruby-identifier">delete_if</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">task</span>.<span class="ruby-identifier">readyForScheduling?</span>(<span class="ruby-identifier">scIdx</span>) }
|
|
3047
|
+
1028:
|
|
3048
|
+
1029: <span class="ruby-comment cmt"># Check if we are done.</span>
|
|
3049
|
+
1030: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">workItems</span>.<span class="ruby-identifier">empty?</span>
|
|
3050
|
+
1031:
|
|
3051
|
+
1032: <span class="ruby-comment cmt"># The first task in the list is the one with the highes priority and</span>
|
|
3052
|
+
1033: <span class="ruby-comment cmt"># the largest path criticalness that is ready to be scheduled.</span>
|
|
3053
|
+
1034: <span class="ruby-identifier">task</span> = <span class="ruby-identifier">workItems</span>[<span class="ruby-value">0</span>]
|
|
3054
|
+
1035: <span class="ruby-comment cmt"># Schedule it.</span>
|
|
3055
|
+
1036: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>.<span class="ruby-identifier">schedule</span>(<span class="ruby-identifier">scIdx</span>)
|
|
3056
|
+
1037: <span class="ruby-constant">Log</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"Task #{task.fullId}: #{task['start', scIdx]} -> "</span> <span class="ruby-operator">+</span>
|
|
3057
|
+
1038: <span class="ruby-node">"#{task['end', scIdx]}"</span>
|
|
3058
|
+
1039: <span class="ruby-keyword kw">end</span>
|
|
3059
|
+
1040: <span class="ruby-keyword kw">end</span>
|
|
3060
|
+
1041: <span class="ruby-identifier">unscheduledTasks</span> = []
|
|
3061
|
+
1042: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">unscheduledTasks</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">t</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">t</span>[<span class="ruby-value str">'scheduled'</span>, <span class="ruby-identifier">scIdx</span>] }
|
|
3062
|
+
1043:
|
|
3063
|
+
1044: <span class="ruby-comment cmt"># Check for unscheduled tasks and report the first 10 of them as</span>
|
|
3064
|
+
1045: <span class="ruby-comment cmt"># warnings.</span>
|
|
3065
|
+
1046: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">unscheduledTasks</span>.<span class="ruby-identifier">empty?</span>
|
|
3066
|
+
1047: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">warning</span>(
|
|
3067
|
+
1048: <span class="ruby-value str">'unscheduled_tasks'</span>,
|
|
3068
|
+
1049: <span class="ruby-node">"#{unscheduledTasks.length} tasks could not be scheduled"</span>)
|
|
3069
|
+
1050: <span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
|
3070
|
+
1051: <span class="ruby-identifier">unscheduledTasks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
|
3071
|
+
1052: <span class="ruby-ivar">@messageHandler</span>.<span class="ruby-identifier">warning</span>(
|
|
3072
|
+
1053: <span class="ruby-value str">'unscheduled_task'</span>,
|
|
3073
|
+
1054: <span class="ruby-node">"Task #{t.fullId}: "</span> <span class="ruby-operator">+</span>
|
|
3074
|
+
1055: <span class="ruby-node">"#{t['start', scIdx] ? t['start', scIdx] : '<?>'} -> "</span> <span class="ruby-operator">+</span>
|
|
3075
|
+
1056: <span class="ruby-node">"#{t['end', scIdx] ? t['end', scIdx] : '<?>'}"</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">t</span>,
|
|
3076
|
+
1057: <span class="ruby-identifier">scenario</span>(<span class="ruby-identifier">scIdx</span>))
|
|
3077
|
+
1058:
|
|
3078
|
+
1059: <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
3079
|
+
1060: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">>=</span> <span class="ruby-value">10</span>
|
|
3080
|
+
1061: <span class="ruby-keyword kw">end</span>
|
|
3081
|
+
1062: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">stopProgressMeter</span>
|
|
3082
|
+
1063: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
3083
|
+
1064: <span class="ruby-keyword kw">end</span>
|
|
3084
|
+
1065:
|
|
3085
|
+
1066: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">stopProgressMeter</span>
|
|
3086
|
+
1067: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">exit</span>(<span class="ruby-value str">'scheduleScenario'</span>, <span class="ruby-node">"Scheduling of scenario #{scIdx} finished"</span>)
|
|
3087
|
+
1068: <span class="ruby-keyword kw">true</span>
|
|
3088
|
+
1069: <span class="ruby-keyword kw">end</span></pre>
|
|
3002
3089
|
</div>
|
|
3003
3090
|
|
|
3004
3091
|
</div>
|
|
@@ -3035,15 +3122,15 @@ index <tt>scIdx</tt>.
|
|
|
3035
3122
|
<div class="method-source-code"
|
|
3036
3123
|
id="matching-eports-source">
|
|
3037
3124
|
<pre>
|
|
3038
|
-
<span class="ruby-comment cmt"># File lib/Project.rb, line
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3125
|
+
<span class="ruby-comment cmt"># File lib/Project.rb, line 1073</span>
|
|
3126
|
+
1073: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">matchingReports</span>(<span class="ruby-identifier">reportId</span>)
|
|
3127
|
+
1074: <span class="ruby-identifier">list</span> = []
|
|
3128
|
+
1075: <span class="ruby-ivar">@reports</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">report</span><span class="ruby-operator">|</span>
|
|
3129
|
+
1076: <span class="ruby-identifier">id</span> = <span class="ruby-identifier">report</span>.<span class="ruby-identifier">fullId</span>
|
|
3130
|
+
1077: <span class="ruby-identifier">list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">id</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">reportId</span>) <span class="ruby-operator">=~</span> <span class="ruby-identifier">id</span>
|
|
3131
|
+
1078: <span class="ruby-keyword kw">end</span>
|
|
3132
|
+
1079: <span class="ruby-identifier">list</span>
|
|
3133
|
+
1080: <span class="ruby-keyword kw">end</span></pre>
|
|
3047
3134
|
</div>
|
|
3048
3135
|
|
|
3049
3136
|
</div>
|