[gecode-users] Problems with some REG and some suggestions

Guido Tack tack at gecode.org
Wed Sep 28 15:36:36 CEST 2011


On 27 Sep 2011, at 11:43, TeXitoi wrote:
> I work on about 400 integer variables (about 15 months), and I have
> regex that are applied on different intervals (year, semester, month,
> week...).  To improve the performances, I would like to combine some
> of the constraints on a unique DFA. So, the idea I had was generating
> a regex that affect only a period but that have the length of my
> problem:
>  - first month : myReg + any(nbDaysIn14Month,nbDaysIn14Month)
>  - second month : any(nbDaysIn1Month,nbDaysIn1Month) + myReg +
>        any(nbDaysIn13Month,nbDaysIn13Month)
>  - ...
>  - first semester : ...
>  - ...
> and then I compute the intersection of the DFA.

One thing I noticed (but which may be just because you simplified the problem for presentation) is that you could build expressions for a whole year without any wildcards, e.g.

year = myReg(15,15)

and probably similarly for weeks and semesters.

Cheers,
Guido

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/








More information about the users mailing list