- Function CaseCreateDifferenceFile(referenceCase, outputFilename, diffTypes, absoluteTolerance, relativeTolerance, outputPrecision, respectDomainCurrentCase)
CaseCreateDifferenceFile
With the procedure CaseCreateDifferenceFile
you can create an AIMMS
input file containing the differences between the current data and a
reference case.
CaseCreateDifferenceFile(
referenceCase, ! (input) element in the set AllCases
outputFilename, ! (input) scalar string expression
diffTypes, ! (input) indexed element parameter
absoluteTolerance, ! (optional) scalar expression
relativeTolerance, ! (optional) scalar expression
outputPrecision, ! (optional) scalar expression
respectDomainCurrentCase ! (optional) scalar expression
)
Arguments
- referenceCase
An element in the set
AllCases
specifying the case to which the current data should be compared.- outputFilename
A string expression specifying the name of the file the differences are written to.
- diffTypes
An element parameter indexed over (a subset of)
AllIdentifiers
with range the predeclared setAllDifferencingModes
.- absoluteTolerance
A scalar expression specifying the absolute tolerance when comparing numerical values. The range of this argument is \([0,inf)\), the default is the value of the option
equality_absolute_tolerance
.- relativeTolerance
A scalar expression specifying the relative tolerance when comparing numerical values. The range of this argument is \([0,1]\), the default is the value of the option
equality_relative_tolerance
.- outputPrecision
A scalar expression specifying how many decimals should be printed. The range of the argument is \(\{0\ldots{}20\}\), the default is the value of the option
listing_precision
.- respectDomainCurrentCase
A scalar expression specifying whether or not the current domain should be taken into account. When 0: The current domain is not taken into account and all differences are written to the output file. When 1: The current domain is taken into account; the differences are filtered according to the domain of the identifier.
Return Value
This procedure returns 0 upon failure, 1 upon success. When successful all differences between the current model data and the data in the reference case are written to a file.
Note
In a READ statement, when reading from an input file that was generated by
CaseCreateDifferenceFile
function withdiffTypes
equal toelementReplacement
,elementAddition
orelementMultiplication
, the file is always read in merge mode, so that thediffTypes
can be applied in a sensible way.