Re: [eclipse-users] declaring constants

From: Nicolas BERGER <Nicolas.Berger_at_univ-nantes.fr>
Date: Fri, 15 Jun 2007 13:43:00 +0200 (CEST)
> Nicolas BERGER wrote:
>> Hi everyone
>>
>> Is it possible to declare constants i.e. variable that are not reduced ?
>> For example, in the following problem, not reducing the domain of D but
>> only the domains of X and Y :
>>
>> [X,Y] $:: [-1.1..0.72],
>> D :: [1,4,7],
>> X +  D #< 3,
>>  Y + D #< 1.
>
> Hi Nicolas,
>
> What exactly do you mean with this?
> Maybe you mean that for each value in the domain of D, there exists a
> value in the domain of X such that the constraint X+D #< 3 is satisfied.
>
> If this is the case, you probably need a quantified CSP solver (QCSP).
>


Have a look at the following *real-life* (robot arm movement) CSP :

    	Tx is 10.0,
    	Ty is 6.0,
    	X0 is 8,
    	Y0 is 4,
    	D $:: [1.99..2.01],

    	A $:: [2.0..8.0],
    	B $:: [2.0..8.0],
    	Alpha $:: [0.. pi],
    	Beta $:: [0.. pi],
    	X  $:: [0..Tx],
    	Y  $:: [0..Ty],
    	I  :: [2..5],
    	J  :: [2..5] ;

	A * sin(Alpha) $= B * sin(Beta - Alpha) + Y,
	A * cos(Alpha) $= X - (B * cos(Beta - Alpha)),
	A * cos(Alpha) $=< Tx,
	X $=< Tx,
	A * sin(Alpha) $=< Ty,
	Y $=< Ty,
	(X - X0)^2 + (Y - Y0)^2 $=< 4,
	A $= (I - 1) * D,
	B $= (J - 1) * D.


D here is a constant term, it doesn't have to be reduced, it is just some
feature of the problem : 1.99 $=< D $=< 2.01. Actually, this problem comes
from a C++ constraint solving library (ELISA) where D can be declared as
of type "IntervalConstant"...

Here what I have first thought of is excluding it from the "locate" var
list :
	locate([A,B,Alpha,Beta,X,Y,I,J],
		[A,B,Alpha,Beta,X,Y,I,J],1e-6,lin).


I suppose it means D is excluded from the search procedure (i.e. won't be
splitted) but I don't know if it excludes it from the propagation of
domain reductions raised by the constraints...



Nicolas.
Received on Fri Jun 15 2007 - 12:45:12 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET