[gecode-users] Advices for creating new variable type?

Christian Schulte cschulte at kth.se
Tue Apr 26 11:02:00 CEST 2016


Hi Geoffroy,

The key question here is whether you intend to also implement propapators that are specific to a NoteVar.

If yes, then you will have to have a look at the Variable implementation part in MPG.

If not, you can see a NoteVar just as modeling tool for which you provide your own constraint post functions but no dedicated propagators as all can be expressed by constraints over integer variables. Much easier.

I'd try to give the latter a shot first.

Cheers
Christian

--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, cschulte at kth.se
Expert Researcher, SICS, cschulte at sics.se

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Geoffroy Zoetardt
Sent: Tuesday, April 26, 2016 10:28
To: users at gecode.org
Subject: [gecode-users] Advices for creating new variable type?

Hi everyone,

I’m actually developing a binding between Gecode and OpenMusic (composition software made by the IRCAM).
During this project, I want to create new type of variable closer to the musical objects already existing in OpenMusic (OM).
For example, in OM there is a Note object with some attributes such as the pitch, the velocity, the duration and I want to create a NoteVar in Gecode to use all possibilities of constraint programming on Note object.
For now, my idea is to implement each attribute as an IntVar content in the NoteVar object because there are mainly two application that I need to do with NoteVar:
- Be able to apply constraints and search on attribute individually (reason for implementing  them as IntVar).
- Be able to apply constraints and search on the NoteVar object.
Then I would like to have your advices on «  What would be the best idea of implementation for NoteVar to easily apply the constraints and the search on this object? ».
I hope that it is clear enough.
Already thank you!

Geoffroy Zoetardt
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4623 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20160426/8d9a8cdb/attachment.bin>


More information about the users mailing list