Main Page | Report this Page
Computers Forum Index  »  Computer - Constraints  »  Disjunctive constraints
Page 1 of 1    

Disjunctive constraints

Author Message
Ammar Mechouche
Posted: Mon Mar 31, 2008 9:27 pm
Guest
Quote:
What exactly do you mean? So your variables range on symbolic values,
not on numerical values?


Exactly, the domains of my variables are symbolic values (strings).

Quote:

I guess you also have to implement anteriorTo(x,y) (or does your
constraint language provide already such constraint?).

In case you have to implement it, you may think of adding a third,
boolean variable:

anteriorTo(x,y,B)

where B is true iff x is anterior to y (in your semantics), and is false
otherwise. Beware: this does not sound as a very efficient solution, but
it depends on your problem.

I think there is a more simple way to define symbolic constraints when
we consider a specific domain. For example, we can define the constraint
"anteriorTo" with a set of tuples, where the first element of each tuple
represents an object of the studied domain, which is anterior the object
of the domain represented by the second element. But I have no idea of
the manner to express the disjunction discussed above. The examples you
are giving above are interesting. I have to investigate them in details.

Thanks Marco.
Ammar.
 
Marco Gavanelli
Posted: Mon Mar 31, 2008 9:52 pm
Guest
Ammar Mechouche wrote:
Quote:
What exactly do you mean? So your variables range on symbolic values,
not on numerical values?


Exactly, the domains of my variables are symbolic values (strings).


I guess you also have to implement anteriorTo(x,y) (or does your
constraint language provide already such constraint?).

In case you have to implement it, you may think of adding a third,
boolean variable:

anteriorTo(x,y,B)

where B is true iff x is anterior to y (in your semantics), and is false
otherwise. Beware: this does not sound as a very efficient solution, but
it depends on your problem.

I think there is a more simple way to define symbolic constraints when
we consider a specific domain. For example, we can define the constraint
"anteriorTo" with a set of tuples, where the first element of each tuple
represents an object of the studied domain, which is anterior the object
of the domain represented by the second element. But I have no idea of
the manner to express the disjunction discussed above. The examples you
are giving above are interesting. I have to investigate them in details.

You can also define a reifiable constraint by means of tuples: just add
a further parameter that takes only values 0 and 1. E.g., suppose you
have three blocks, called "one", "two" and "three", and you have that:

anteriorTo("one","two")
anteriorTo("two","three")
anteriorTo("one","three")

you can add a further parameter and define your constraint with the tuples:

anteriorTo("one","two",1)
anteriorTo("two","three",1)
anteriorTo("one","three",1)
anteriorTo("two","one",0)
anteriorTo("three,"one",0)
anteriorTo("three","two",0)
anteriorTo("one","one",0)
anteriorTo("two","two",0)
anteriorTo("three","three",0)

Cheers,
Marco

--
http://www.ing.unife.it/docenti/MarcoGavanelli/
 
 
Page 1 of 1    
All times are GMT
The time now is Sun Nov 29, 2009 11:13 pm