A
Andreas Launila
Gecode/R version 1.0.0 has been released.
http://gecoder.rubyforge.org/
This is the first officially stable release of Gecode/R.
== What is Gecode/R?
Gecode/R is a Ruby interface to the Gecode constraint programming
library[1]. Gecode/R is intended for people with no previous experience
of constraint programming, aiming to be easy to pick up and use.
== Installation
Install Gecode and Gecode/R:
gem install gecoder-with-gecode
== What is Constraint Programming?
Constraint programming means that you describe the problem to the
solver, using variables and constraints, and then let the solver find
the solution. It is useful for solving problems where you have to do a
search through various assignments to find the best solution (or just
any solution). This includes problems such as scheduling and sudoku.
== Example
Examples are located at http://gecoder.rubyforge.org/examples.html . The
following example solves the equation system
x + y = z
x = y - 3
0 <= x,y,z <= 9
require 'rubygems'
require 'gecoder'
solution = Gecode.solve do
# Set up the variables, three integers with domain 0..9.
variables_is_an int_var_array(3, 0..9)
x,y,z = variables
# Describe the problem (in this case the equations).
(x + y).must == z
x.must == y - 3
# Tell it what the variables of the problem are.
branch_on variables
end
puts 'x y z'
puts solution.variables.values.join(' ')
Output:
x y z
0 3 3
== Thanks
A big thank you to the following people who have contributed to getting
Gecode/R to where it is today.
* David Cuadrado - Created the initial raw bindings from Gecode to Ruby.
* Eivind Eklund - Provided the idea that led to the syntax used to
specify the regular expressions used in regexp constraints.
* Google and Ruby Central - Got the project started with funding through
Google Summer of Code 2007.
* James Edward Gray II - Provided superb mentoring during Google Summer
of Code 2007, influencing many decisions made.
* Mikael Lagerkvist - Provided support from the Gecode side.
* Andreas Launila - Created the interface on top of the raw bindings and
the website.
* Adam Rose - Suggested that Gecode/R should use a mixin rather than
inheritance.
[1] http://www.gecode.org/
http://gecoder.rubyforge.org/
This is the first officially stable release of Gecode/R.
== What is Gecode/R?
Gecode/R is a Ruby interface to the Gecode constraint programming
library[1]. Gecode/R is intended for people with no previous experience
of constraint programming, aiming to be easy to pick up and use.
== Installation
Install Gecode and Gecode/R:
gem install gecoder-with-gecode
== What is Constraint Programming?
Constraint programming means that you describe the problem to the
solver, using variables and constraints, and then let the solver find
the solution. It is useful for solving problems where you have to do a
search through various assignments to find the best solution (or just
any solution). This includes problems such as scheduling and sudoku.
== Example
Examples are located at http://gecoder.rubyforge.org/examples.html . The
following example solves the equation system
x + y = z
x = y - 3
0 <= x,y,z <= 9
require 'rubygems'
require 'gecoder'
solution = Gecode.solve do
# Set up the variables, three integers with domain 0..9.
variables_is_an int_var_array(3, 0..9)
x,y,z = variables
# Describe the problem (in this case the equations).
(x + y).must == z
x.must == y - 3
# Tell it what the variables of the problem are.
branch_on variables
end
puts 'x y z'
puts solution.variables.values.join(' ')
Output:
x y z
0 3 3
== Thanks
A big thank you to the following people who have contributed to getting
Gecode/R to where it is today.
* David Cuadrado - Created the initial raw bindings from Gecode to Ruby.
* Eivind Eklund - Provided the idea that led to the syntax used to
specify the regular expressions used in regexp constraints.
* Google and Ruby Central - Got the project started with funding through
Google Summer of Code 2007.
* James Edward Gray II - Provided superb mentoring during Google Summer
of Code 2007, influencing many decisions made.
* Mikael Lagerkvist - Provided support from the Gecode side.
* Andreas Launila - Created the interface on top of the raw bindings and
the website.
* Adam Rose - Suggested that Gecode/R should use a mixin rather than
inheritance.
[1] http://www.gecode.org/