The Event Calculus, Continuous Change and Mathematical Modelling

Một phần của tài liệu Cumputational logic logic programming and beyond p 2 (Trang 483 - 486)

Definition 4 Translation of MT-revision-programs into extended LPs)

3.8 The Event Calculus, Continuous Change and Mathematical Modelling

The techniques using theTrajectory andAntiTrajectory predicates discussed in Section 3.5 are sufficient for modelling domains with very simple forms of con- tinuous change, in particular where an explicit function of time is known for a particular parameter after a particular fluent has been initiated or terminated.

However, this method is in general insufficient for integrating standard mathe- matical modelling techniques with the Event Calculus, for several reasons. First, the majority of mathematical models are expressed as sets of differential equa- tions, and these cannot in general be solved so as to produce explicit functions of time for each parameter involved. Second, there might only be incomplete knowl- edge, expressed perhaps using inequalities, about the mathematical relationship between various parameters and/or their derivatives. Third, the circumstances under which various mathematical relationships hold between parameters might not be (easily) expressible in terms of a single fluent. Fourth, trajectories and antitrajectories do not provide mechanisms for describing continuous change in time intervals before any relevant initiating and/or terminating actions have occurred.

A more general approach is to include domain independent axioms which explicitly utilise the mathematical definitions of continuity and differentiability of real-valued functions of time. Under this approach, which is partly inspired by

Sandewall’s work [54,55] and described in more detail in [42], continuity of real- valued parameters is regarded as a default analogous to default persistence of fluents, so that discontinuities arise only in particular parameters when specific actions occur. For this section, we will assume that time is represented either as the real numbers or as the non-negative real numbers. We will assume that some or all terms of sort P (introduced in Section 3.5) represent real-valued functions of time, and accordingly introduce two new function symbolsV alue: P ×T →Randδ:P → P. The termValue(P, T) represents the numerical value of parameterP at timeT, and the axiomatisation below ensures that the term Value(δ(P), T) represents the numerical value at time T of its first derivative (at all time-points where this exists).

To integrate the standard mathematical concepts of continuity and differ- entiability into the Event Calculus, we need to express them in terms of Value andδ. It is also convenient to introduce the predicatesLeftContinuous⊆ P × T andRightLimit ⊆ P × T to capture the corresponding (standard) mathematical concepts6:

Continuous(p, t) ≡ ∀r∃t1∀t2[[|t−t2|< t10< r] (EC20j)

→ |Value(p, t)−Value(p, t2)|< r]

Differentiable(p, t) (EC21j)

∀r∃t1∀t2[[0<|t−t2|< t10< r]

|(Value(p,t)Value(p,t2)

tt2 )−Value(δ(p), t)|< r]

LeftContinuous(p, t) (EC22j)

∀r∃t1∀t2[[t2< t∧(t−t2)< t10< r]

|Value(p, t)−Value(p, t2)|< r]

RightLimit(p, t, r) (EC23j)

∀r1∃t1∀t2[[t < t2(t2−t)< t10< r1]

→ |Value(p, t2)−r|< r1]

To respect the convention that actions take effect immediately after they occur, it is necessary to axiomatise the mathematical constraint that, at every time-point (including those at which actions occur), the function associated with each parameter is left-hand continuous:

6 A function isleft-continuousif discontinuities occur only between successive intervals wh ere th e first is closed on th e righ t and th e second is open on th e left. For example the function f(t) = 0 for all t 1, f(t) = 2 otherwise, is left-continuous at all time-points, whereas the functionf(t) = 0 for allt <1,f(t) = 2 oth erwise, is not.

Theright-limit of a function at a particular point is the limit value as the point is approached from the right. So, for example, the right-limit of bothf andf at 1 is 2.

LeftContinuous(p, t) (EC24j) To describe instantaneous changes in the values of parameters at times when actions occur, and discontinuities in their corresponding functions of time, the predicatesBreaksTo⊆ A × P × T ×RandBreaks⊆ A × P × T are introduced.

Both are minimised (by circumscribing them in parallel). BreaksTo(A, P, T, R) should be read as ‘at timeT, an occurrence of actionAwill cause parameterP to instantaneously take on valueR’. More precisely, Axiom (EC27j) below states that if A does indeed occur at time T, then R is the value of the right-hand limit ofP atT.Breaks(A, P, T) can be read as ‘at timeT, actionApotentially causes a discontinuity in parameter P’. The following domain-independent axioms make direct use ofBreaksTo andBreaks. Axioms (EC25j) and (EC26j) can be likened to ‘frame axioms’ for parameters. Axiom (EC28j) states the relationship betweenBreaksToandBreaks, and Axiom (EC29j) states that if an action potentially causes a discontinuity in a given parameter, it also potentially causes discontinuities in its higher derivatives.

ơ[Happens(a, t)∧Breaks(a, p, t)]→Continuous(p, t) (EC25j)

ơ[Happens(a, t)∧Breaks(a, δ(p), t)]→Differentiable(p, t) (EC26j) [BreaksTo(a, p, t, r)∧Happens(a, t)]→RightLimit(p, t, r) (EC27j) BreaksTo(a, p, t, r)→Breaks(a, p, t) (EC28j) Breaks(a, p, t)→Breaks(a, δ(p), t) (EC29j) To make useful derivations using this axiomatisation, for any given time point T it is useful to be able to refer to the next point after T at which an action occurs, if there is such a point. Axioms (EC30j), (EC31j) and (EC32j) state that if any action occurs at any time point after T, then the term Next(T) refers to the least such time point. (Such points are somewhat analogous to the

“least natural time points” discussed in [51].)

t <Next(t) (EC30j)

[t < t1 t1<Next(t)] → ơHappens(a, t1) (EC31j) [Happens(a1, t1) t < t1] → ∃a.Happens(a,Next(t)) (EC32j) The above axiomatisation leaves us free to include (unsolved) sets of simul- taneous differential equations in domain descriptions. As a simple illustration, suppose we wish to represent that the rate of change of the level of liquid in a tank is negatively proportional to the flow through a valve in its bottom, and that when the valve is open the flow is in turn proportional to the level (i.e. pressure). We need a single fluent ValveOpen, two parameters Level and

Flow, and actions OpenValve and CloseValve. As well as Happens, Initiates andTerminates facts such as

Initiates(OpenValve,ValveOpen, t) (V1)

Terminates(CloseValve,ValveOpen, t) (V2)

we can represent information about the instantaneous effects of actions on parameters using Breaks,

Breaks(OpenValve,Flow, t) (V3 )

Breaks(OpenValve, δ(Level), t) (V4)

and include mathematical constraints (differential equations) which hold in different circumstances, e.g.

Value(δ(Level), t) =−Value(Flow, t) (V5) HoldsAt(ValveOpen, t)→ ∃r[Value(Flow, t) =r.Value(Level, t)] (V6) In this case the full theory will include the circumscription CIRC[(EC28j) (EC29j)(V3)(V4) ; Breaks,BreaksTo]. The Event Calculus now allows us to infer new boundary conditions for sets of differential equations which become applicable when actions such asOpenValve and CloseValve occur. A variation of this example is discussed in more detail in [42].

The above axiomatisation lays a foundation for integrating the Event Calcu- lus with representational and computational techniques from the field of Qual- itative Reasoning [9] [34]. An Event Calculus based axiomatisation of some of the basic concepts in [34] is given in [42].

Một phần của tài liệu Cumputational logic logic programming and beyond p 2 (Trang 483 - 486)

Tải bản đầy đủ (PDF)

(636 trang)