Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

moliware/cspy-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cspy is library that provides a solver for constraint satisfaction problems.

------
Simple use:
>>> from cspy import Solver
>>> from cspy import SolverVariable
>>> s = Solver()
# Create Variable with id and domain
>>> v1 = SolverVariable('1', [1, 2, 3])
>>> v2 = SolverVariable('2', [4, 5, 6])
>>> s.reg_variable(v1)
>>> s.reg_variable(v2)
>>> s.solve()
[{'1': 1, '2': 3}, {'1': 1, '2': 4}, {'1': 1, '2': 5}, {'1': 2, '2': 3}, {'1': 2, 
'2': 4}, {'1': 2, '2': 5}, {'1': 3, '2': 3}, {'1': 3, '2': 4}, {'1': 3, '2': 5}]

------
Install:

# python setup.py install

About

Constraint programming library for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages