Class ObjectiveProgressReport
- All Implemented Interfaces:
Selectable<Report>
,Comparable<Report>
The report will create two charts. The first shows the number of
iterations on the x axis and the objective function value on the y axis.
Each sub-element of the objective function (as specified in the
constructor) is displayed.
The second chart shows the percent change in the objective function
terms over the course of the simulation.
These charts can be used to confirm the progress that is being made by the solver, and help in making decisions about how many iterations should be allowed in order to achieve an acceptable convergence.
Here is an example of how to create this report type:
reportWriter.addReport(new ObjectiveProgressReport("scenario/progress", "Progress of accounts towards solution", new String[] {"product.Yield.*", "flow.even.product.Yield.*", "ratio.Route.*", "patch.opening.*"}, ""));
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.spatial.reportwriter.Report
Report.GetNodesAt
-
Field Summary
FieldsFields inherited from class ca.spatial.reportwriter.Report
AREA, LINE, PIE, SIDE_BY_SIDE_BARS, STACKED_BARS
-
Constructor Summary
ConstructorsConstructorDescriptionObjectiveProgressReport(String filename, String title, ConvergenceSpec[] specs, String html)
ObjectiveProgressReport(String filename, String title, String[] patterns, String html)
Create a new report that will track changes to the objective function that occur from the time that the report is added. -
Method Summary
Modifier and TypeMethodDescriptionca.spatial.reportwriter.Report.DataCache
doReport(String filename, PrintStream out, Map<String,Object> param, ca.spatial.reportwriter.Report.DataCache cache)
The method used by the report writer to format the requested report.String[]
getTypes()
An accessor function to retrieve the list of report types supported by this report.Methods inherited from class ca.spatial.reportwriter.Report
addDefaultParam, chartImg, compareTo, csvLink, doesAnyTypes, doesCSV, doesGIF, doesHTML, doesPNG, doesType, encodeFileURL, encodeURL, endMainContent, escapeRegexChars, footer, formatColumnHeadings, formatColumnHeadings, getAdditionalFiles, getAttributeStore, getBasepart, getBasepart, getDefaultFilename, getDisplayFormat, getExtension, getExtension, getFilename, getFolderpart, getFolderpart, getLength, getNamepart, getNamepart, getPathToRoot, getReportFor, getTitle, header, htmlText, indexLink, interpolateParams, isDhandler, isIndexed, isSelected, parentIndex, patternToRegex, setAttributeStore, setDefaultParams, setDisplayFormat, setIndexed, setSelected, setTitle, toString, uniqueLabels
-
Field Details
-
TYPES
-
-
Constructor Details
-
ObjectiveProgressReport
Create a new report that will track changes to the objective function that occur from the time that the report is added. The charts will show the change in objective function value over time. The objective values to display are determined by the value of the patterns parameter. This parameter contains a list of regular expression that will be matched against the targets defined in the model. The objective function value from each match target will be summed, and the results display as they change through time, and as a percent change from one point to the next.The objective function is sampled each time the solver prints out progress information. Over the course of a lengthy simulation the report may record a very large number of sample points.
Here is an example of how to create this report type:
reportWriter.addReport(new ObjectiveProgressReport("scenario/progress", "Progress of accounts towards solution", new String[] {"product.Yield.*", "flow.even.product.Yield.*", "ratio.Route.*", "patch.opening.*"}, ""));
- Parameters:
filename
- The basename of the report (not including the filename extenstion).title
- The report title (also used in the index).patterns
- A list of regular expression, each one describing a set of targets that should be added to the report. The chart legends will have one entry for each pattern.
-
ObjectiveProgressReport
public ObjectiveProgressReport(String filename, String title, ConvergenceSpec[] specs, String html)
-
-
Method Details
-
doReport
public ca.spatial.reportwriter.Report.DataCache doReport(String filename, PrintStream out, Map<String,Object> param, ca.spatial.reportwriter.Report.DataCache cache)Description copied from class:Report
The method used by the report writer to format the requested report. This method is implemented in every custom report. Application programs generally do not need to call this method, but instead use the report writer methods to obtain reports. -
getTypes
Description copied from class:Report
An accessor function to retrieve the list of report types supported by this report. See the documentation for the TYPES variable for the list of sub-types.
-