The constraint module presented in PyCon Brasil and later on EuroPython 2005 is now available. Here is a trivial example, solving the classical rooks problem:
problem = Problem() numpieces = 8 cols = range(numpieces) rows = range(numpieces) problem.addVariables(cols, rows) for col1 in cols: for col2 in cols: if col1 < col2: problem.addConstraint(lambda row1, row2: row1 != row2, (col1, col2)) solutions = problem.getSolutions()
Have fun!
Update: It was also presented in FISL 2006.
Python hackers, lpsolve5 and glpk4.8 need python bindings.
http://groups.yahoo.com/group/lp_solve/
http://www.gnu.org/software/glpk/glpk.html
Use for forestry, ecology, agricultural, mining, manufacturing, etc. management.
Very useful for developing countries in doing properly time and space management especially in land-based management and natural resources.
Qgis needs you –python hackers!!!
python is one of solutions for non-programmers to create useful and meaning plugin for qgis. Right now qgis plugins is only c++. No python yet in qgis.
So python hackers willing to help. Have a look and join.
http://community.qgis.org/
http://mrcc.com/logs/
PyCon seems to be very interesting and well done. With it I wrote in 30 minutes a sudoku solver.
Grates work!!!
That’s indeed a short solver for sudoku. :-)
I hope you don’t mind if I include that in the examples directory (with credits, of course).
It will be a pleasure for me!