As far as possible, data committed to the Working Database via the Dialog Box interface is checked and filtered to maintain the integrity and consistency of the database.

In general, text strings entered by users are the most dangerous type of dialog item because they are a human-readable encoding of some fundamental data type such as a number. This encoding and decoding to and from text strings done by users and computers is a rich source of errors. XPRafts checks all strings at three levels to ensure they can be interpreted correctly.

  • Absolute Validity. A numerical string, for example, cannot contain invalid characters.
  • Absolute Range Checking. Once a numerical string can be interpreted properly, its value is checked for validity in the context of the model, eg. a negative pipe length would not be accepted.
  • “Reasonable Range” Checking. If a data item is within the absolute range it is also compared to a reasonable range defined by the Expert Engineer. If the data is between the absolute and reasonable range, the user is asked to confirm that the data entered is correct and is not a typographical error.

These checks are applied to individual data items and are classed as low-level consistency checks. High-level consistency checks are also made, which generally involve placing constraints on relationships between data items. Because these checks rely on the existence of independent data items, often there is insufficient data for XP to perform these high-level checks interactively. These integrity checks are therefore performed off-line at the point of generating the data file for the model to solve.