Information Technology Reference
In-Depth Information
by qualitative variable for its positive and negative aspects. One qualitative
variable can take three values: position , negation , zero:
enum qualitative {pos, neg, zero };
Qualitative add operation can be defined as following:
qualsum (
)
enum qualitative
x,y,z
x,y,z
;
{
if (
x=y
)
z=x
;
if (
x=zero
)
z=y
;
if (
y=zero
)
z=x
;
}
If we have constraint program
main
{
enum qualitative
u, v, w
;
=zero;
qualsum(
w
u, w, v
) ;
qualsum(
u, v, w
) ;
}
We do no need take any tentative search to achieve the only solution, which is
{
u =zero, v =zero, w =zero
}. By qualsum(
u, w, v
) and
w =zero
, we have
u=v
,
which make qualsum(
u, v, w
) reason out
u=w =zero
; Thus
v =u =zero
.
3.10.2 Interval Propagation
In addition to equality relation, the most common relation is the inequality
relation. Especially for the analysis and design of electronic apparatus, the use of
inequality is particularly important. The most basic reasoning of inequality
representation is to test variable value. That is, variable value is known already,
then calculate and check whether variable value satisfies the inequality. Simply
this kind of calculation can only be used for generate-and-test strategy, which has
the lowest efficiency. We have realized stronger inequality reasoning.
A common used inequality reasoning is interval reasoning, i.e. the interval
propagation in constraint network. Given interval limit of some variables, other
variables' interval limit can be reasoned out by ordering relation among variables.
For example, suppose that constraint
x > y
and the interval of variable
x
and
y
are
Search WWH ::




Custom Search