OpenTD.Results.Dataset.Comparer Class Reference
Last update: 16.07.2025Use to compare two Datasets. More...

Public Member Functions | |
| Comparer (IDataset a, IDataset b) | |
| Initializes a new instance of the Comparer class. | |
| void | CloseDatasets () |
| void | ReOpenDatasets () |
| bool | Run () |
| Compares the datasets. Writes a report to the string Message. Returns true if the Datasets are found to be equal for all of the tests performed. | |
| List< ExceedancePlot > | PlotExceedances (int maxPerSubtype=1, IEnumerable< DataSubtype > subtypes=null) |
| bool | SaveExceedancePlots (string directoryPath, out string resultMsg, string prefix="", int maxPerSubtype=1, IEnumerable< DataSubtype > subtypes=null) |
| List< ExceedancePlot > | GetExceedancePlots (int maxPerSubtype=1, IEnumerable< DataSubtype > subtypes=null) |
| override string | ToString () |
| void | _writeline (string msg) |
| Do not use. | |
| void | _writesuccess (string msg) |
| Do not use. | |
| void | _markdiff (string msg) |
| Do not use. | |
Properties | |
| IDataset | DatasetA [get] |
| One of the datasets to compare. | |
| IDataset | DatasetB [get] |
| One of the datasets to compare. | |
| List< long > | RecNumsA [get] |
| A list of the record numbers in DatasetA. | |
| List< long > | RecNumsB [get] |
| A list of the record numbers in DatasetB. | |
| List< double > | TimesA [get] |
| A list of the times in DatasetA. | |
| List< double > | TimesB [get] |
| A list of the times in DatasetB. | |
| Dictionary< StandardDataSubtypes, ICompareData > | ComparisonMethods [get, set] |
| This dispatch table determines what comparison methods will be used for each StandardDataSubtype (T, TL, etc.). All others not listed will use the DefaultComparisonMethod algorithm. | |
| ICompareData | DefaultComparisonMethod [get, set] |
| For StandardDataSubtypes (T, TL, etc.) not listed in the ComparisonMethods dispatch table, use this comparison algorithm. | |
| double | TimePercentTol [get, set] |
| Tolerance for comparison of time series. | |
| bool | CompareRecords [get, set] |
| Determines whether Run() will compare the number of records. | |
| bool | CompareTimes [get, set] |
| Determines whether Run() will compare the max and min times. | |
| bool | CompareThermalSubmodels [get, set] |
| Determines whether Run() will compare the names of the thermal submodels. | |
| bool | CompareNodeNames [get, set] |
| Determines whether Run() will compare the ID's of nodes in common thermal submodels. | |
| bool | CompareConductorNames [get, set] |
| Determines whether Run() will compare the ID's of conductors in common thermal submodels. | |
| bool | CompareFluidSubmodels [get, set] |
| Determines whether Run() will compare the names of the fluid submodels. | |
| bool | CompareLumpNames [get, set] |
| Determines whether Run() will compare the ID's of lumps in common fluid submodels. | |
| bool | ComparePathNames [get, set] |
| Determines whether Run() will compare the ID's of paths in common fluid submodels. | |
| bool | CompareTieNames [get, set] |
| Determines whether Run() will compare the ID's of ties in common fluid submodels. | |
| bool | CompareFTieNames [get, set] |
| Determines whether Run() will compare the ID's of FTies in common fluid submodels. | |
| bool | CompareIFaceNames [get, set] |
| Determines whether Run() will compare the ID's of IFaces in common fluid submodels. | |
| bool | CompareRegisterNames [get, set] |
| Determines whether Run() will compare the names of registers. | |
| List< FullStandardDataSubtype > | DataToCompare [get, set] |
| List of FullStandardDataSubtype (T, TL, PL, etc.) to compare for all common-name entities. For example, if TL is in the list, then Run() will find all the lump names that are common between the two Datasets and compare all values of TL for all of them. | |
| List< string > | RegisterDataToCompare [get, set] |
| List of registers to compare, if common between datasets. If list is empty, will compare data for all common registers. | |
| bool | CompareJustFinalRecord [get, set] |
| Determines whether Run() will compare just the final data values in each dataset. If true, will also ignore differences in number of records and won't compare times. Defaults to false. | |
| Dictionary< DataSubtype, List< Exceedance > > | Exceedances [get] |
| After calling Run(), contains information about data items that exceeded the allowable percent tolerance. Contains a dictionary with one entry for each FullStandardDataSubtype (T, TL, PL, etc.) tested. The entries are lists of all items that exceed the percent tolerance, in descending order by exceedance amount. | |
| string | Message [get] |
| Run() outputs a report to this string. | |
Detailed Description
Constructor & Destructor Documentation
◆ Comparer()
Member Function Documentation
◆ _markdiff()
|
inline |
◆ _writeline()
|
inline |
◆ _writesuccess()
|
inline |
◆ CloseDatasets()
|
inline |
◆ GetExceedancePlots()
|
inline |
◆ PlotExceedances()
|
inline |
◆ ReOpenDatasets()
|
inline |
◆ Run()
|
inline |
Compares the datasets. Writes a report to the string Message. Returns true if the Datasets are found to be equal for all of the tests performed.
- Returns
trueif all tests performed indicate the Datasets are equal,falseotherwise.
◆ SaveExceedancePlots()
|
inline |
◆ ToString()
|
inline |
Property Documentation
◆ CompareConductorNames
|
getset |
Determines whether Run() will compare the ID's of conductors in common thermal submodels.
◆ CompareFluidSubmodels
|
getset |
Determines whether Run() will compare the names of the fluid submodels.
◆ CompareFTieNames
|
getset |
Determines whether Run() will compare the ID's of FTies in common fluid submodels.
◆ CompareIFaceNames
|
getset |
Determines whether Run() will compare the ID's of IFaces in common fluid submodels.
◆ CompareJustFinalRecord
|
getset |
Determines whether Run() will compare just the final data values in each dataset. If true, will also ignore differences in number of records and won't compare times. Defaults to false.
Implements OpenTD.Results.Dataset.IComparerInput.
◆ CompareLumpNames
|
getset |
Determines whether Run() will compare the ID's of lumps in common fluid submodels.
◆ CompareNodeNames
|
getset |
Determines whether Run() will compare the ID's of nodes in common thermal submodels.
◆ ComparePathNames
|
getset |
Determines whether Run() will compare the ID's of paths in common fluid submodels.
◆ CompareRecords
|
getset |
Determines whether Run() will compare the number of records.
◆ CompareRegisterNames
|
getset |
Determines whether Run() will compare the names of registers.
◆ CompareThermalSubmodels
|
getset |
Determines whether Run() will compare the names of the thermal submodels.
◆ CompareTieNames
|
getset |
Determines whether Run() will compare the ID's of ties in common fluid submodels.
◆ CompareTimes
|
getset |
Determines whether Run() will compare the max and min times.
◆ ComparisonMethods
|
getset |
This dispatch table determines what comparison methods will be used for each StandardDataSubtype (T, TL, etc.). All others not listed will use the DefaultComparisonMethod algorithm.
◆ DatasetA
|
get |
One of the datasets to compare.
Implements OpenTD.Results.Dataset.IComparerInput.
◆ DatasetB
|
get |
One of the datasets to compare.
Implements OpenTD.Results.Dataset.IComparerInput.
◆ DataToCompare
|
getset |
List of FullStandardDataSubtype (T, TL, PL, etc.) to compare for all common-name entities. For example, if TL is in the list, then Run() will find all the lump names that are common between the two Datasets and compare all values of TL for all of them.
The data to compare.
- See also
- OpenTD.Results.DataType.FullStandardDataSubtype
◆ DefaultComparisonMethod
|
getset |
For StandardDataSubtypes (T, TL, etc.) not listed in the ComparisonMethods dispatch table, use this comparison algorithm.
◆ Exceedances
|
get |
After calling Run(), contains information about data items that exceeded the allowable percent tolerance. Contains a dictionary with one entry for each FullStandardDataSubtype (T, TL, PL, etc.) tested. The entries are lists of all items that exceed the percent tolerance, in descending order by exceedance amount.
- See also
- OpenTD.Results.DataType.FullStandardDataSubtype, OpenTD.Results.Dataset.Exceedance
Implements OpenTD.Results.Dataset.IComparerOutput.
◆ Message
|
get |
Run() outputs a report to this string.
◆ RecNumsA
|
get |
A list of the record numbers in DatasetA.
Implements OpenTD.Results.Dataset.IComparerInput.
◆ RecNumsB
|
get |
A list of the record numbers in DatasetB.
Implements OpenTD.Results.Dataset.IComparerInput.
◆ RegisterDataToCompare
|
getset |
List of registers to compare, if common between datasets. If list is empty, will compare data for all common registers.
◆ TimePercentTol
|
getset |
Tolerance for comparison of time series.
◆ TimesA
|
get |
A list of the times in DatasetA.
Implements OpenTD.Results.Dataset.IComparerInput.
◆ TimesB
|
get |
A list of the times in DatasetB.
Implements OpenTD.Results.Dataset.IComparerInput.
The documentation for this class was generated from the following file:
- C:/Users/mgarrett/source/repos/BuildsTdSuite/builds/OpenTD/OpenTD.Results/Dataset/Comparer.cs