# Gecode/R 0.3.0

**URL:** <https://www.ruby-forum.com/t/gecode-r-0-3-0/107851>\
**Category:** Ruby\
**Created:** [June 26, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/gecode-r-0-3-0/107851 "2007-06-26T21:57:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [June 26, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/gecode-r-0-3-0/107851/1 "2007-06-26T21:57:29Z")

</div>

Gecode/R version 0.3.0 has been released.

[http://gecoder.rubyforge.org/](http://gecoder.rubyforge.org/)

It’s still early in the development, so don’t expect any form of  
backwards compatibility (things will change left and right if needed  
to).

== What is Gecode/R? ==

Gecode/R is a Ruby interface to Gecode[1] which allows you to use  
constraint programming in Ruby. It’s typically useful for problems where  
you otherwise have to do a search through various assignments to find a  
solution. All you have to do is describe the properties of solutions to  
a problem and Gecode will find them.

Examples[2] of solving problems with Gecode/R include problems such as  
verbal arithmetic (recently featured on Ruby Q.) and n-queens.

== Learning more ==

The ambition of the documentation[3] is to keep up with the code, so it  
hopefully covers all of the available features (which in combination  
with the examples should get you going). Tutorials on topics such as  
modelling are currently missing, but questions are welcome.

== Requirements ==

Gecode 1.3.1 is required, it’s easy to install though (see  
installation[4] for links).

== Features ==

- Finite domain integers and booleans.
- Linear, distinct and basic boolean constraints.
- Reification and propagation strength.

== Changes (since 0.2.0) ==

- The constructor of Gecode::Model no longer has to be called by classes  
inheriting from it.
- Added Model#reset! which resets a model after search.
- Added Model#solution which passes the first solution to a block and  
returns the result of that block.
- Added Model#each\_solution which iterates over each solution.
- Added boolean variables. They are created using Model#bool\_var and  
Model#bool\_var\_array .
- Added two options to constraints: propagation strength and reification  
variable.
- Linear and simple relation constraints can now also be specified using  
#equal, #equal\_to, #greater, #greater\_than,… in addition to comparison  
operators.
- Added distinct with offsets.
- Simple relation constraints can now be used to specify relations  
between two variables.
- Added basic boolean domain constraints along with conjunction and  
disjunction.
- Added syntactic sugar for combining reifiable constraints with | and  
&.

[1] [http://www.gecode.org/](http://www.gecode.org/)  
[2] [http://gecoder.rubyforge.org/examples.html](http://gecoder.rubyforge.org/examples.html)  
[3] [http://gecoder.rubyforge.org/documentation/](http://gecoder.rubyforge.org/documentation/)  
[4] [http://gecoder.rubyforge.org/installation.html](http://gecoder.rubyforge.org/installation.html)
