Since all variables and parameters represent a value, you can refer to either in an expression as a value, rather than as an item. For example, this expression, referring to the quantitative variable Q1:
conclude that Q1 = 200
Within a KB, you can use variables and parameters to represent external values. For example, in a KB monitoring a nuclear power plant, variables could represent temperature readings. The reason for using variables or parameters to represent such knowledge is twofold. They:
Parameter Features
In effect, a parameter is a simple variable. Parameters provide a storage space in memory for an inconstant data value that can be updated as often as necessary. In addition to storing a data value, a parameter has these capabilities:
Forward chaining allows the parameter to trigger other events when it receives a value, by invoking rules that refer to it.
A parameter is guaranteed to have a value, and does not require data seeking to obtain one. Parameters supply reliable data sources that all parts of G2 can access.
All variables are capable of having two values concurrently: a value obtained through a data server, and a simulation value. You can save a history of one or both of those values.
The G2 Simulator, which can provide simulation values, is a superseded capability. For more information, see Appendix F, Superseded Practices.
Memory Considerations
As with all items, variables and parameters maintain their capabilities within their attributes, such as Last-recorded-value and Validity-interval. History-keeping-spec attribute for both variables and parameters can require potentially large amounts of storage, depending on its value. Summary of Variable and Parameter Differences
The following table summarizes the differences between parameters and variables:
Consider these issues when deciding whether to use a variable or a parameter: