1 constraint reasoning for differential models jorge cruz centria - centre for artificial...
TRANSCRIPT
1
Constraint Reasoning for Differential Models
Jorge Cruz
CENTRIA - Centre for Artificial Intelligence
DI/FCT/UNL
June 2009
2
PRESENTATION OUTLINE
• Constraint Reasoning for Differential Models
• Conclusions and Future Work
• Constraint Reasoning
• Examples: Drug Design / Epidemic Study
3
Constraint Satisfaction Problem (CSP):
set of variables
set of domains
set of constraints
Solution:
assignment of values which satisfies all the constraints
Continuous CSP (CCSP):
Intervals of reals [a,b]
Numeric(=,,)
Many
Constraint Reasoning
GOAL Find Solutions;Find an enclosure of the solution space
4
Continuous Constraint Satisfaction Problem (CCSP):
Solution:
assignment of values which satisfies all the constraints
Constraint Reasoning
GOAL Find solutions;Find an enclosure of the solution space
z
[1,5]
y
[,]
[0,2]x
y = x2
z x
x+y+z 5.25
Interval Domains
Numerical Constraints
Many Solutionsx=1, y=1, z=1 ...
x=1, y=1, z=3.25 ...
5
Representation of Continuous Domains
F-interval R
F
[r1..r2]
[f1 .. f2]
r
[r..r]
F-box
6
box split
Solving CCSPs:
Branch and Prune algorithms
constraint propagation
Safe Narrowing Functions
Strategy forisolate canonical solutions
provide an enclosure of the solution space
7
Constraint Reasoning (vs Simulation)
Uses safe methods for narrowing the intervals accordingly to the constraints of the model
Represents uncertainty as intervals of possible values
x y
[1,5][0,2]y = x2
0 0Simulation:1 12 4
no
y4?x1?
Constraint Reasoning: [1,2] [1,4]
8
How to narrow the domains?
Safe methods are based on Interval Analysis techniques
x y
[1,5][0,2]y = x2
x[a,b] x2[a,b]2=[0,max(a2,b2)]
[min(a2,b2),max(a2,b2)]
if a0b
otherwise
If x[0,2]Then y[0,2]2 =[0,max(02,22)]=[0,4]
y[1,5] y[0,4] y[1,5] [0,4] y[1,4]
9
How to narrow the domains?
Safe methods are based on Interval Analysis techniques
x y
[1,5][0,2]y = x2
x[a,b] x2[a,b]2=[0,max(a2,b2)]
[min(a2,b2),max(a2,b2)]
if a0b
otherwise
NFy=x²: Y’ YX2
10
Newton Method for Finding Roots of Univariate Functions
Let f be a real function, continuous in [a,b] and differentiable in (a..b)
Accordingly to the mean value theorem:
r1,r2[a,b] [min(r1,r2),max(r1,r2)] f(r1)=f(r2)+(r1 r2)f’()
If r2 is a root of f then f(r2)=0 and so:
r1,r2[a,b] [min(r1,r2),max(r1,r2)] f(r1)=(r1 r2)f’()
r1,r2[a,b] [min(r1,r2),max(r1,r2)] r2= r1f(r1)/f’()
And solving it in order to r2:
Therefore, if there is a root of f in [a,b] then, from any point r1 in [a,b]the root could be computed if we knew the value of
11
Newton Method for Finding Roots of Univariate Functions
-20
-10
0
10
20
30
0 1 2 3 4 5 6 7 8 9 10
x
f(x)
The idea of the classical Newton method is to start with an initial value r0 and compute a sequence of points ri that converge to a root
To obtain ri+1 from ri the value of is approximated by ri:
ri+1= rif(ri)/f’() rif(ri)/f’(ri)
r0r1r2
r0
r0
r1r2
r1
r2
12
Newton Method for Finding Roots of Univariate Functions
-20
-10
0
10
20
30
0 1 2 3 4 5 6 7 8 9 10
x
f(x)
Near roots the classical Newton method has quadratic convergence
r0
r1=+
However, the classical Newton method may not converge to a root!
13
Interval Extension of the Newton Method
The idea of the Interval Newton method is to start with an initial interval I0 and compute an enclosure of all the r that may be roots
r1,r[a,b] [min(r1,r),max(r1,r)] r= r1f(r1)/f’()
If r is a root within I0 then: r1I0
r r1f(r1)/f’(I0) (all the possible values of are considered)
I0
In particular, with r1=c=center(I0) we get the Newton interval function: r cf(c)/f’(I0) = N(I0)
Since root r must be within the original interval I0, a smaller safe enclosure I1 may be computed by:
I1 = I0 N(I0)
14
Interval Extension of the Newton Method
-20
-10
0
10
20
30
0 1 2 3 4 5 6 7 8 9 10
x
f(x)
The idea of the Interval Newton method is to start with an initial interval I0 and compute an enclosure of all the r that may be roots
r1
I0c
N(I0)
I1
15
How to narrow the domains?
Safe methods are based on Interval Analysis techniques
x y
[1,5][0,2]y = x2
If x[0,2] and y[1,5]
Then y
y[1,5] [0,4] y[1,4]
],[],[
]),([N 401
203351
2
y x2 = 0 F(Y) = Y [0,2]2 F’(Y) = 1
)Y('F
))Y(c(F)Y(c)Y(N yY x[0,2] yx2=0 y
Interval Newton method
16
How to narrow the domains?
Safe methods are based on Interval Analysis techniques
x y
[1,5][0,2]y = x2
NFy=x²: Y’ Y
1
2X)Y(c)Y(c
y x2 = 0 F(Y) = Y [0,2]2 F’(Y) = 1
)Y('F
))Y(c(F)Y(c)Y(N yY x[0,2] yx2=0 y
Interval Newton method
17
How to narrow the domains?
Safe methods are based on Interval Analysis techniques
x y
[1,5][0,2]y = x2
NFy=x²: Y’ YX2
NFy=x²: X’ (XY½)(XY½)+
NFy=x²: Y’ Y
1
2X)Y(c)Y(c
NFy=x²: X’ X
X
)X(cY)X(c
2
2
contractility
Y’ Y
X’ X
correctness
yY yY’ ¬xX y=x2
xX xX’ ¬yY y=x2
18
[1,5]
[,]
[0,2] z
y
x
y = x2
z x
x+y+z 5.25
NFy=x²: Y’ YX2
NFx+y+z5.25: X’ X([,5.25]YZ)
NFx+y+z5.25: Y’ Y([,5.25]XZ)
NFx+y+z5.25: Z’ Z([,5.25]XY)
NFy=x²: X’ (XY½)(XY½)+
NFzx: X’ X(Z[0,])
NFzx: Z’ Z(X[0,])
[1,4]
[1,2]
[,3.25]
[1,3.25]
Solving a Continuous Constraint Satisfaction Problem
Constraint Propagation
19
[1,5]
[,]
[0,2] z
y
x
y = x2
z x
x+y+z 5.25
[1,4]
[1,2]
[,3.25]
[1,3.25]
Solving a Continuous Constraint Satisfaction Problem
Constraint Propagation
[1,3.25]
[1,3.25]
NFy=x²: Y’ YX2
NFx+y+z5.25: X’ X([,5.25]YZ)
NFx+y+z5.25: Y’ Y([,5.25]XZ)
NFx+y+z5.25: Z’ Z([,5.25]XY)
NFy=x²: X’ (XY½)(XY½)+
NFzx: X’ X(Z[0,])
NFzx: Z’ Z(X[0,])
20
z
y
x
y = x2
z x
x+y+z 5.25
[1,3.25]
Solving a Continuous Constraint Satisfaction Problem
Constraint Propagation
[1,3.25]
[1,3.25]
x y z
3.25 y = 3.25y = x2 x+y+z 5.25 z 2- 3.25
<3.25z x
1 1 1 1 1 3.25
1.5 2.25 1.5 x
+ Branching
Stopping Criterion
21
How to deal with change in dynamic models?
Classical constraint methods do not address differential models directly
Typically through differential equations
vdt
dv
]0.1,5.0[)0( v
]0.2,0.1[)1( v
Differential model:
v(t)=v(0)etsolution
x1 = x0eConstraints:
Variables: x0, x1
Domains: [0.5,1][-1,2]
Constraint model:
x0[0.5,2/e] x1[0.5e,2]And without using the solution form?
(non linear models)
22
-2
-1
0
1
2
3
0 0,5 1
Constraint Reasoning for Differential Models
vdt
dv
]0.1,5.0[)0( v
]0.2,0.1[)1( v
All functions from [0,1] to R
23
vdt
dv
]0.1,5.0[)0( v
]0.2,0.1[)1( v
Functions s from [0,1] to R such that:
-2
-1
0
1
2
3
0 0,5 1
)()(
]1,0[ tsdt
tdst
Constraint Reasoning for Differential Models
24
vdt
dv
]0.1,5.0[)0( v
]0.2,0.1[)1( v
Functions s from [0,1] to R such that:
-2
-1
0
1
2
3
0 0,5 1
]0.1,5.0[)0( s
)()(
]1,0[ tsdt
tdst
Constraint Reasoning for Differential Models
25
vdt
dv
]0.1,5.0[)0( v
]0.2,0.1[)1( v
Functions s from [0,1] to R such that:
]0.1,5.0[)0( s
)()(
]1,0[ tsdt
tdst
]0.2,0.1[)1( s
-2
-1
0
1
2
3
0 0,5 1
I0
I1
Constraint Reasoning for Differential Models
26
Extended Continuous Constraint Satisfaction Problem
z
[1,5]
y
[,]
[0,2]x
y = x2
z x
x+y+z 5.25
vdt
dv
)0(v)1(v z
y
CSDP
ODE system
Implicit representation of the trajectory
Trajectory properties
Explicit representation of its properties which can be integrated with the other constraints
Developed safe methods for narrowing the intervals representing the possible property values
NFCSDP: Y’ ...Z’ ...
27
Trajectory Properties
maximum
minimum
timek
k
areakk
firstk
k
timeMaximum
continuous function
t
value
28
Solving a CSDP
Use Narrowing functions for pruning the domains through propagation
00
6
1.5
s1( t)TR1
t
0
0
6
1.5
t
s2( t)TR2
Maintain a safe trajectory enclosure
x1 I1
x2 I2
x3 I3
x4 I4
x5 I5
...
and safe enclosures for each trajectory property:
29
Solving a CSDP
x I
s TR
60
0
1.5
t
TR
Maximum Narrowing Functions
Ia
b
I I [a,b] where a is the maximum lower bound of the point enclosures within [1,3]b is the maximum upper bound of the gap enclosures within [1,3]
tp[1,3] TR (tp) TR (tp) [,c]
[tp1,tp2][1,3] TR ([tp1,tp2]) TR ([tp1,tp2]) [,c] where c is the upper bound of I
)(max31
tst
continuous function
30
00
1
1.5
TR
t
then: ]525.0,225.1[]75.1,75.0[7.0)(
dt
tds
0.408
s(t) [1.25] [0,0.3][1.225,0.525]=[0.8825,1.25]
Assume: s(t) s(0)[0.5,0.5]=[0.75,1.75]t[0,1]For:
0.75
1.75
0.3
t[0,0.3]
Interval Picard Operator
)(7.0)(
tsdt
tds
s(0) [1.25]
s(1) [, ]
t[0,1] s(t) [, ]
Solving a CSDP
31
00
1
1.5
TR
t
Trajectory Narrowing Function
0.3
Interval Picard Operator (gap enclosure):
Interval Taylor Series (point enclosure):
)()!1(
)(!
)()( )1(
1
1)(
1
p
p
k
p
ik
k
ii sp
hts
k
htsts
ti=0 ti+1=0.3 h=0.3 =[0,0.3]
s(0)=[1.25]
)()7.0()()( tsts kk
s()=[0.8825,1.25]
t[0,0.3] s(t) [0.8825,1.25]
]25.1,8825.0[)7.0()!1(
3.0]25.1[)7.0(
!
3.0]25.1[)3.0( 1
1
1
p
p
k
pk
k
pks
p=0 s(0.3)[0.9875,1.0647]
p=1 s(0.3)[1.0069,1.0151]
p=2 s(0.3)[1.0131,1.0138]
)(7.0)(
tsdt
tds
s(0) [1.25]
s(1) [, ]
t[0,1] s(t) [, ]
Solving a CSDP
32
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[-1.0,2.0]
TR =[0,1][-,]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
33
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[-1.0,2.0]
TR =[0][0.5,1.0]:(0,1][-,]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
34
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[-1.0,2.0]
TR =[0][0.5,1.0]:(0,1)[-,]:[1][-1.0,2.0]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
Based on an Interval Taylor Series method
35
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[-1.0,2.0]
TR =[0][0.5,1.0 ]:(0,0.5)[0.45,1.8]:[0.5][0.82,1.65]:(0.5,1)[-,]:[1][-1.0,2.0]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
36
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[-1.0,2.0]
TR =[0][0.5,1.0 ]:(0,0.5)[0.45,1.8]:[0.5][0.82,1.65]:(0.5,1)[0.8,2.9]:[1][1.35,2.0]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
37
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[1.35,2.0]
TR =[0][0.5,1.0 ]:(0,0.5)[0.45,1.8]:[0.5][0.82,1.65]:(0.5,1)[0.8,2.9]:[1][1.35,2.0]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
38
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[1.35,2.0]
TR =[0][0.5,1.0 ]:(0,0.5)[0.45,1.8]:[0.5][0.82,1.22]:(0.5,1)[0.8,2.1]:[1][1.35,2.0]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
39
Example: Constraint Satisfaction Differential Problem
I0=[0.5,1.0]
-2
-1
0
1
2
3
0 0,5 1
I1=[1.35,2.0]
TR =[0][0.5,0.74]:(0,0.5)[0.45,1.3]:[0.5][0.82,1.22]:(0.5,1)[0.8,2.1]:[1][1.35,2.0]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
NF
40
Example: Constraint Satisfaction Differential Problem
I0=[0.5,0.74]
-2
-1
0
1
2
3
0 0,5 1
I1=[1.35,2.0]
TR =[0][0.5,0.74]:(0,0.5)[0.45,1.3]:[0.5][0.82,1.22]:(0.5,1)[0.8,2.1]:[1][1.35,2.0]
ODES,[0,1](xODE) Value0(x0) Value1(x1)
(fixed point)
41
Application to Drug Design
)()()(
1 tDtxpdt
tdx )()(
)(21 typtxp
dt
tdy
Differential model of the drug absorption process:
concentration of the drug in the gastro-intestinal tractconcentration of the drug in the blood stream
drug intake regimen:0.65.0
5.00.0
0
2)(
t
t
if
iftD
Periodic limit cycle (p1=1.2, p2=ln(2)/5):
0
0,5
1
0 1 2 3 4 5 60,5
1
1,5
0 1 2 3 4 5 6
x(t)y(t)
t t
42
Application to Drug Design
Important properties of drug concentration are:
maximum
minimum
time1.1
area1.0
y(t)
CSDP framework can be used for:
Bound the parameters (e.g p1) by imposing bounds on these properties
Should be kept between 0.8 and 1.5Area under curve above 1.0 between 1.2 and 1.3 Cannot exceed 1.1 for more than 4 hours
p1[0.0 , 4.0]
p1[1.3 , 1.4]
43
Application to Drug Design
Important properties of drug concentration are:
maximum
minimum
time1.1
area1.0
y(t)
CSDP framework can be used for:
Compute safe bounds for these properties for chosen parameters
Is guaranteedly kept between 0.881 and 1.462 ([0.8,1.5])Area under curve above 1.0 between 1.282 and 1.3 ([1.2,1.3])Exceeds 1.1 for 3.908 to 3.967 hours (<4.0)
p1[1.3 , 1.4]
44
Application to Epidemic Studies
Susceptibles: can catch the diseaseInfectives: have the disease and can transmit it
The SIR model of epidemics:
)()()(
tItrSdt
tdS )()()(
)(taItItrS
dt
tdI )(
)(taI
dt
tdR
Removed: had the disease and are immune or dead
Parametersr
a
efficiency of the disease transmission
recovery rate from the infection
45
0
200
400
600
800
0 2 4 6 8 10 12 14 16 18 20 22 24
Application to Epidemic Studies
The SIR model of epidemics:
t
S(t)
I(t)
R(t)
Population
Important questions about an infectious disease are:
imax
the maximum number of infectives: imax
tmax
the time that it starts to decline: tmax
tend
when will it ends: tend
rend
how many people will catch the disease: rend
46
0
200
400
600
800
0 2 4 6 8 10 12 14 16 18 20 22 24
Application to Epidemic Studies
The SIR model of epidemics:
t
S(t)
I(t)
R(t)
Population
imax
tmax tend
rend
CSDP framework can be used for:
Bound the parameters according to the information available about the spread of a disease on a particular population (ex: boarding school)
Predict the behaviour of an infectious disease from its parameter ranges
47
Conclusions and Future Work
• the work extends Constraint Reasoning with ODEs
• it relies on safe methods that do not eliminate solutions
• it may support decision in applications where one is interested in finding the range of parameters for which some constraints on the ODE solutions are met
• it is an expressive and declarative constraint approach
• directions for further research:
Explore alternative safe methods
Apply to different models
Extend to PDEs
48
Bibliography • Jorge Cruz. Constraint Reasoning for Differential Models Vol: 126 Frontiers in Artificial Intelligence and Applications, IOS Press 2005
• Ramon E. Moore. Interval Analysis Prentice-Hall 1966
• Eldon Hansen, G. William Walster. Global Optimization Using Interval Analysis Marcel Dekker 2003
• Jaulin, L., Kieffer, M., Didrit, O., Walter, E. Applied Interval Analysis Springer 2001
Links • Interval Computations (http://www.cs.utep.edu/interval-comp/) A primary entry point to items concerning interval computations.
• COCONUT (http://www.mat.univie.ac.at/~neum/glopt/coconut/) Project to integrate techniques from mathematical programming, constraint
programming, and interval analysis.