next up previous contents
Next: Forms for defining model Up: Top-level Forms Previous: defRelation

defQuantityFunction

  

The defQuantityFunction form defines a function that maps a tuple of objects to a quantity. In addition to being globally defined via defQuantityFunction, quantity functions may also be defined within model fragment and entity definitions in the :quantities clause (See section gif, page gif).

  figure284
Figure: Quantity functions are defined with the defQuantityFunction form. Quantity functions associate time dependent quantities with the objects that they describe.

tex2html_wrap2312

tex2html_wrap2314

 (defQuantityFunction QF name (x ...x)

[ :=> implication asentence]

[ :dimension dimension expression ]

[ :non-numeric non-numeric? ]

[ :piecewise-continuous piecewise-continuous? ]

[ :step-quantity step-quantity? ]

[ :count-quantity count-quantity? ])

The QF name is a function constant naming an n-ary function that returns a time-dependent quantity. The x ... x are logical variables.

:=>
The implication asentence is a logical sentence that mentions the variables x. It may be used to place restrictions on the values that the time dependent quantity may take on, or assert things, such as type information, about the x. The translations required to make time explicit (See section gif, page gif) are performed on the implication asentence.

:dimension
The dimension expression is a dimension expression (See section gif, page gif for the complete syntax). It specifies the dimension of the quantities returned by the quantity function.

:non-numeric
If boolean non-numeric? is true, then the quantities returned by the quantity function are non-numeric valued, otherwise they are numeric.

:piecewise-continuous
If boolean piecewise-continuous? is true, then the quantities returned by the quantity function are piecewise-continuous.

:step-quantity
If boolean step-quantity? is true, then the quantities returned by the quantity function are step-quantities.

:count-quantity
If boolean count-quantity? is true, then the quantities returned by the quantity function are count-quantities. A count quantity is dimensionless.

The semantics of the form is defined by the following axiom:

displaymath2288

where type is determined by the boolean keywords and defaults to everywhere-continuous.

tex2html_wrap2316


next up previous contents
Next: Forms for defining model Up: Top-level Forms Previous: defRelation

Tom Mostek
Wed Jan 21 13:00:43 CST 1998