Skip to main content

A Python interface to the Schlandals solver

Project description

Installation

pyschlandals is not yet installable from pip. But by cloning the main repository of Schlandals, you can install it in your current python environment. To do so you need to install the Rust toolchain. Once this is done, you should have cargo install. You can then install Maturin with cargo install maturin. Then, from the source directory of pyschlandals, run maturin develop.

Usage

The search and compiler main function are exported in python and can be used directly with the input filename and branching heuristic as follows

from pyschlandals.search import exact
from pyschlandals.compiler import compile
from pyschlandals import BranchingHeuristic

filename = '../tests/instances/bayesian_networks/asia_xray_false.cnf'
print(exact(filename, BranchingHeuristic.MinInDegree))

dac = compile(filename, BranchingHeuristic.MinInDegree)
print(dac.get_circuit_probability())

Documentation for how to access and update circuits parameters will come soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyschlandals-0.0.1.tar.gz (68.8 MB view details)

Uploaded Source

File details

Details for the file pyschlandals-0.0.1.tar.gz.

File metadata

  • Download URL: pyschlandals-0.0.1.tar.gz
  • Upload date:
  • Size: 68.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pyschlandals-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ecd26988da1b9d9f104bf053e62c2e05c3883bdc1a86fad6e8154c0727f9ba4a
MD5 7aea950cbd312ac3eb9487a154b22f03
BLAKE2b-256 e3b2c5115835d83bad455b471742a2ebfa985fe230d608bf0c74e9abfca3dff4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page